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