|
Joined: Feb 2006
Posts: 95
Babel fish
|
OP
Babel fish
Joined: Feb 2006
Posts: 95 |
I have no clue if this will work, I just spent too much time with it already... While doing it I forgot to add brackets... Will somebody please patch this up... on *:TEXT:!blackjack:#:{
set %blackjacker $nick
set %card1 $rand(1,13) | set %card2 $rand(1,13)
.msg $chan %blackjacker drew cards %card1 , %card2 , %card3
.msg $chan %blackjacker has a card total of $calc( %card1 + %card2 )
set %card.total $calc( %card1 + %card2 )
.msg $chan %blackjacker, would you like to hit or stand?
on *:TEXT:hit:#:if ($nick == %blackjacker) set %card3 $rand(1,13)
.msg $chan %blackjacker hit and got %card3
.msg $chan %blackjacker has a card total of $calc( %card.total + %card3 )
set %card.total $calc( %card.total + %card3 )
if (%card.total > 21) .msg $chan %blackjacker has BUSTED! game over...
else .msg chan %blackjacker has a card total of %card.total
.msg $chan %blackjacker, would you like to hit again or stand?
on *:TEXT:hit again:#:if ($nick == %blackjacker) set %card4 $rand(1,13)
.msg $chan %blackjacker hit and got %card4
.msg $chan %blackjacker has a card total of $calc( %card.total + %card4 )
set %cardtotal $calc( %card.total + %card4)
if (%cardtotal > 21) .msg $chan %blackjacker has BUSTED! game over...
else .msg chan %blackjacker has a card total of $calc( %card.total + %card3 )
on *:TEXT:stand:#:if ($nick == %blackjacker) .msg $chan %blackjacker has stood..
.msg $chan Dealer is up..
set %dealer1 $rand(1,13) | set %dealer2 $rand(1,13)
.msg $chan Dealer drew cards %dealer1 , %dealer2
.msg $chan Dealer has a card total of $calc( %dealer1 + %dealer2 )
set %dealer.total $calc( %dealer1 + %dealer2 )
if (%dealer.total > 21) .msg $chan Dealer busts, %blackjacker Wins!
else set %dealer3 $rand(1,13)
.msg $chan dealer draws %dealer3
.msg $chan dealer has a card total of $calc( %dealer.total + %dealer3 )
set %dealer.total $calc( %dealer.total + %dealer3 )
if (%dealer.total > 21) .msg $chan Dealer busts, %blackjacker Wins!
else set %dealer4 $rand(1,13)
.msg $chan dealer draws %dealer4
.msg $chan dealer has a card total of $calc( %dealer.total + %dealer4 )
if (%dealer.total > 21) .msg $chan Dealer busts, %blackjacker Wins!
else set %dealer5 $rand(1,13)
.msg $chan dealer draws %dealer5
.msg $chan dealer has a card total of $calc( %dealer.total + %dealer5 )
if (%dealer.total > 21) .msg $chan Dealer busts, %blackjacker Wins! And also I would like to make the 11 to apear J(for jack), 12 to be Q, 13 to be K...
Last edited by blk; 14/02/06 04:09 AM.
-blk-
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
You should really read up on how to use { } brackets, type /help aliases and scroll down to The { } brackets.
|
|
|
|
Joined: Feb 2006
Posts: 95
Babel fish
|
OP
Babel fish
Joined: Feb 2006
Posts: 95 |
-blk-
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
So you know how to fix your own script but you want us to do it for you?
|
|
|
|
Joined: Feb 2006
Posts: 95
Babel fish
|
OP
Babel fish
Joined: Feb 2006
Posts: 95 |
-blk-
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
You've got be kidding me. 
|
|
|
|
Joined: Mar 2005
Posts: 212
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 212 |
on *:TEXT:!blackjack:#:{
set %blackjacker $nick
set %card1 $rand(1,13)
set %card2 $rand(1,13)
.msg $chan %blackjacker drew cards %card1 , %card2 , %card3
.msg $chan %blackjacker has a card total of $calc(%card1 + %card2)
set %card.total $calc(%card1 + %card2)
.msg $chan %blackjacker, would you like to hit or stand?
}
on *:TEXT:hit:#:{
if ($nick == %blackjacker) {
set %card3 $rand(1,13)
.msg $chan %blackjacker hit and got %card3
.msg $chan %blackjacker has a card total of $calc(%card.total + %card3)
set %card.total $calc(%card.total + %card3)
}
if (%card.total > 21) {
.msg $chan %blackjacker has BUSTED! game over...
}
else {
.msg chan %blackjacker has a card total of %card.total
.msg $chan %blackjacker, would you like to hit again or stand?
}
}
on *:TEXT:hit again:#:{
if ($nick == %blackjacker) {
set %card4 $rand(1,13)
.msg $chan %blackjacker hit and got %card4
.msg $chan %blackjacker has a card total of $calc(%card.total + %card4)
set %cardtotal $calc( %card.total + %card4)
}
if (%cardtotal > 21) {
.msg $chan %blackjacker has BUSTED! game over...
}
else {
.msg chan %blackjacker has a card total of $calc( %card.total + %card3 )
}
}
on *:TEXT:stand:#:{
if ($nick == %blackjacker) {
.msg $chan %blackjacker has stood..
.msg $chan Dealer is up..
set %dealer1 $rand(1,13) | set %dealer2 $rand(1,13)
.msg $chan Dealer drew cards %dealer1 , %dealer2
.msg $chan Dealer has a card total of $calc( %dealer1 + %dealer2 )
set %dealer.total $calc( %dealer1 + %dealer2 )
}
if (%dealer.total > 21) {
.msg $chan Dealer busts, %blackjacker Wins!
}
else {
set %dealer3 $rand(1,13)
.msg $chan dealer draws %dealer3
.msg $chan dealer has a card total of $calc( %dealer.total + %dealer3 )
set %dealer.total $calc( %dealer.total + %dealer3 )
}
if (%dealer.total > 21) {
.msg $chan Dealer busts, %blackjacker Wins!
}
else {
set %dealer4 $rand(1,13)
.msg $chan dealer draws %dealer4
.msg $chan dealer has a card total of $calc( %dealer.total + %dealer4 )
}
if (%dealer.total > 21) {
.msg $chan Dealer busts, %blackjacker Wins!
}
else {
set %dealer5 $rand(1,13)
.msg $chan dealer draws %dealer5
.msg $chan dealer has a card total of $calc( %dealer.total + %dealer5 )
}
if (%dealer.total > 21) {
.msg $chan Dealer busts, %blackjacker Wins!
}
}
at a glance i dont think it will work brackets or no brackets just a hunch
|
|
|
|
Joined: Feb 2006
Posts: 95
Babel fish
|
OP
Babel fish
Joined: Feb 2006
Posts: 95 |
Thanks  .. even though my script has a handfull of flaws... I didn't do that bad... lol Can anybody help me fix it? :tongue:
-blk-
|
|
|
|
Joined: Feb 2006
Posts: 95
Babel fish
|
OP
Babel fish
Joined: Feb 2006
Posts: 95 |
Nevermind, scratch this, ill just use another blackjack script.. I just wanted to take a stab at it..
-blk-
|
|
|
|
Joined: Feb 2006
Posts: 95
Babel fish
|
OP
Babel fish
Joined: Feb 2006
Posts: 95 |
If anybody wants to fix it, i dont care... Thanks for helpin though 
-blk-
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
Just FYI, you can edit your posts on these forums 2 hours after making them so you don't need to make 3 consecutive posts in a few minutes.
|
|
|
|
Joined: Feb 2006
Posts: 95
Babel fish
|
OP
Babel fish
Joined: Feb 2006
Posts: 95 |
I know that, maybe I just didn't want to :tongue:
-blk-
|
|
|
|
Joined: Mar 2005
Posts: 212
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 212 |
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
im writting a script to play monopoly in a channel, i was wondering if someone can fix it up for me and make the rest of the bits that i have missed. heres the code on *:TEXT:!monopoly:#:{
msg # you are added to the game $nick
} :-) *** warning for any one to lame to realise i was being sarcastic ***
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
on *:TEXT:!play:#:{
msg $nick Your game is now being auto-played by $me
msg $nick .
msg $nick ..
msg $nick ...
if ($r(0,1)) msg $nick CONGRATULATIONS, YOU WON THE GAME!! :D
else msg $nick Sorry, you lost the game. :'(
}
-genius_at_work
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
mahahahahahahahahaha 
|
|
|
|
|