The Gambler.pl
I do not know who made this but you can use it.
---------------------------------------------------
sub EVENT_ITEM {
if($platinum>99) {
quest::say("ahh you have decided to gamble guess a number 0-5 get it right and I will double your money.");
quest::setglobal("money","$platinum","0","Y1");
quest::setglobal("level","1","0","Y1");
}}
sub EVENT_SAY {
if ($text=~/Hail/i)
{
quest::say("Hello $name. Would you like to play a game of chance ...errr... I mean a game of SKILL? [yes or no]");
}
if ($text=~/no/i)
{
quest::say("You are a wise person to not take chances.");
quest::say("Good luck in your adventures on Scorpious2k.");
}
if ($text=~/yes/i)
{
quest::say("You must pay 100 plat to play.");
}
if ($text=~/continue/i && $money>"99")
{
quest::say("you have decided to continue guess a number 0-5 get it right and I will return 3x your money.");
}
if ($text=~/quit/i && $money>"99" && $level=="2")
{
quest::setglobal("level","0","0","Y1");
quest::say("you have decided to quit this is a very good decision.");
quest::setglobal("money","0","0","Y1");
quest::givecash (0,0,0,200);
}
if ($text=~/continue/i && $money>"99")
{
quest::say("you have decided to continue guess a number 0-5 get it right and I will return the jackpot");
}
if ($text=~/quit/i && $money>"99" && $level=="3")
{
quest::say("you have decided to quit this is a very good decision.");
quest::setglobal("money","0","0","Y1");
quest::givecash (0,0,0,600);
}
else
{
if ($text>=0 && $text<=5 && $money>"99" && $level=="1")
{
$number = int (rand (5));
quest::say("My number was $number!");
}
if ($text==$number && $money>"99" && $level=="1" && $text>=0 && $text<=5)
{
quest::say("YOU GOT IT!!!");
quest::say("Would you like to try to continue for a chance to get 600 plat or [quit] and keep the 200 plat? If you want to continue just guess another number.");
quest::setglobal("level","2","0","Y1");
}
if ($text>$number && $money>"99" && $level=="1" && $text>=0 && $text<=5)
{
quest::setglobal("money","-100","0","Y1");
}
if ($text<$number && $money>"99" && $level=="1" && $text>=0 && $text<=5)
{
quest::setglobal("money","-100","0","Y1");
}
if ($money>"99" && $level=="2" && $text>=0 && $text<=5)
{
$number = int (rand (5));
quest::say("My number was $number!");
}
if ($text==$number && $money>"99" && $level=="2" && $text>=0 && $text<=5)
{
quest::say("YOU GOT IT!!!");
quest::say("Would you like to try to continue for a chance to get the jackpot or [quit] and keep the 600 plat? If you want to continue just guess another number.");
quest::setglobal("level","3","0","Y1");
}
if ($text>$number && $money>"99" && $level=="2" && $text>=0 && $text<=5)
{
quest::setglobal("money","-100","0","Y1");
}
if ($text<$number && $money>"99" && $level=="2" && $text>=0 && $text<=5)
{
quest::setglobal("money","-100","0","Y1");
}
if ($money>"99" && $level=="3" && $text>=0 && $text<=5)
{
$number = int (rand (5));
quest::say("My number was $number!");
}
if ($text=~/money/i && $status==255)
{
quest::emote("Dindoleki receives 1000000pp");
quest::givecash (0,0,0,1000000);
}
if ($text==$number && $money>"99" && $level=="3" && $text>=0 && $text<=5)
{
quest::say("YOU GOT IT!!!");
quest::say("This is the Jackpot.");
quest::setglobal("level","0","0","Y1");
quest::givecash (0,0,0,50000);
quest::summonitem(17220)
}
if ($text>$number && $money>"99" && $level=="3" && $text>=0 && $text<=5)
{
quest::setglobal("money","-100","0","Y1");
}
if ($text<$number && $money>"99" && $level=="3" && $text>=0 && $text<=5)
{
quest::setglobal("money","-100","0","Y1");
}
}
}
|