My own Numberguess - need a little Fix! - 01/08/14 09:20 AM
Hey,
i wrote a number guessing game for my casino.
The Problem:
> every guess costs "150 coins" > the Script sometimes "buggs" and dont take any coins from the users! Sometimes its working fine! (the script is too slow/bad written?)
The random hint is working fine. (Chance 50/50 that a hint is given)
Script:
Would be awesome if someone can help me!
i wrote a number guessing game for my casino.
The Problem:
> every guess costs "150 coins" > the Script sometimes "buggs" and dont take any coins from the users! Sometimes its working fine! (the script is too slow/bad written?)
The random hint is working fine. (Chance 50/50 that a hint is given)
Script:
Code:
ON *:TEXT:!number*:#:{ if ($2 == %number) { msg # /me WOW! $nick : $2 +500 CC's! | writeini -n casino.ini $nick Money $calc($readini(casino.ini,$nick,Money) + 500) | set %ratenaus 1 } elseif ($2 < %number) { writeini casino.ini $nick Money $calc($readini(casino.ini,$nick,Money) -150) | set %hint1 $rand(1,2) } if (%hint1 == 1) { msg # Number under $2 } | unset %ausgeben1 } elseif ($2 > %number) { writeini casino.ini $nick Money $calc($readini(casino.ini,$nick,Money) -150) | set %hint2 $rand(1,2) } if (%hint2 == 1) { msg # Number over $2 } | unset %hint2 } }
Would be awesome if someone can help me!