Giter VIP home page Giter VIP logo

blackjack-bot's Introduction

blackjack-bot's People

Contributors

oelna avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

blackjack-bot's Issues

something is wrong, the counting doesnt work correctly

Hello and THX for this nice script!!

i had made some little changes so this script works with "Streamelements" too

at first i renamed all "user1 & user2" in "gamer1 & gamer2" also in the command for the bot:
$(urlfetch https://YOUR-URL/blackjack/blackjack_en.php?gamer1=$(sender)&gamer2=$(1)&command=$(2))

without this little change, Streamelements shown only 1 Name for both Players.

now it seems to work but... look:

•RonXTCdaBass: !bj @beatsueppchenbot new
•StreamElements: beatsueppchenbot drew 2 of Clubs ♣, ronxtcdabass drew Ace of Spades ♠, beatsueppchenbot drew 10 of Spades ♠, ronxtcdabass drew Queen of Clubs ♣, beatsueppchenbot has: 12, ronxtcdabass has: 11, It's beatsueppchenbot's turn!
•BeatsueppchenBot: !bj @ronxtcdabass hit
•StreamElements: Player BeatsueppchenBot drew Jack of Spades ♠, Sum: 10 It's your turn, ronxtcdabass!
•RonXTCdaBass: !bj @beatsueppchenbot hit
•StreamElements: Player RonXTCdaBass drew 4 of Spades ♠, Sum: 4 It's your turn, beatsueppchenbot!
•BeatsueppchenBot: !bj @ronxtcdabass stand
•StreamElements: beatsueppchenbot stands at 12. It's ronxtcdabass's turn with 11.
•RonXTCdaBass: !bj @beatsueppchenbot hit
•StreamElements: Player RonXTCdaBass drew 9 of Clubs ♣, Sum: 13 It's your turn, ronxtcdabass!
•RonXTCdaBass: !bj @beatsueppchenbot stand
•StreamElements: All stand. beatsueppchenbot has 12, ronxtcdabass has 11. beatsueppchenbot won!

or

•RonXTCdaBass: !bj @beatsueppchenbot new
•StreamElements: beatsueppchenbot drew Ace of Spades ♠, ronxtcdabass drew 6 of Hearts ♥, beatsueppchenbot drew Queen of Spades ♠, ronxtcdabass drew 4 of Diamonds ♦, beatsueppchenbot has: 11, ronxtcdabass has: 10, It's beatsueppchenbot's turn!
•BeatsueppchenBot: !bj @ronxtcdabass hit
•StreamElements: Player BeatsueppchenBot drew 10 of Hearts ♥, Sum: 10 It's your turn, ronxtcdabass!
•RonXTCdaBass: !bj @beatsueppchenbot hit
•StreamElements: Player RonXTCdaBass drew 6 of Diamonds ♦, Sum: 6 It's your turn, beatsueppchenbot!
•BeatsueppchenBot: !bj @ronxtcdabass stand
•StreamElements: beatsueppchenbot stands at 11. It's ronxtcdabass's turn with 10.
•RonXTCdaBass: !bj @beatsueppchenbot hit
•StreamElements: Player RonXTCdaBass drew 9 of Diamonds ♦, Sum: 15 It's your turn, ronxtcdabass!
•BeatsueppchenBot: !bj @ronxtcdabass stand
•StreamElements: It's not your turn yet!
•RonXTCdaBass: !bj @beatsueppchenbot hit
•StreamElements: Player RonXTCdaBass drew King of Spades ♠, RonXTCdaBass lost with 25!

it seems the counting doesnt work correctly. :(
what i´ve done wrong? Is this my mistake?

here direct to the script at my webspace:
english version


and i had an idea for ending the game...
for me at
line 250 but before

else {
		// existing match, hit!
// START GIVEUP
	elseif(mb_strtolower($_GET['command']) == 'ende') {
		// show end text
		$data['matchEnded'] = true;

			@unlink(MATCHES.DIRECTORY_SEPARATOR.$filename);
				
		die('/me Player '.$_GET['gamer1'].' gives up. '.BR);
	}
// END GIVEUP

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.