Well gambling bot is working sort of. It skips the second quest::say and returns any plat you give it also it always rolls a 0.
heres the script i have so far
#Script for a gambling bot based on random numbers
sub EVENT_SAY {
if ($text =~/Hail/i)
{ quest::say ("Greetings $name. Would you like to place a [wager]?"); }
if (&text =~/wager/i)
{ quest::say ("You place a wager anywhere from one to ten platinum. I then generate a random number between 0 and 10. It works like this. Wager multiplied by the number generated. If you wish to try your luck give me the number of platinum you wish to wagerand i will generate a number for you.");}
sub EVENT_ITEM {
if($platinum == 1)
{
$random_result = 0;
my $random_result = int(rand(10))+1;}
{ quest::say("You rolled a $random_result!");}
{ quest::givecash("0","0","0","$platinum*$random_res ult")}
}
}
|