View Single Post
  #1  
Old 06-02-2009, 08:46 PM
Duck Duck is offline
Registered User
Join Date: May 2009
Posts: 3
Duck is on a distinguished road
Post Casino Script Help!

Hi, I am making a Slot Machine script and I am trying to make it to where when they grab the slot machine, it takes 6 bucks from the player, and it adds the 6 dollars to the store safe. Here's what I got so far. By the way, the only thing that isn't working is the adding money to the safe part.


function onActionGrab()
{
if (player.dir != 0)
return false;

if (this.inuse)
{
player.addMessage("This machine is currently inuse!");
return false;
}

if (player.rupees < 6)
{
player.addMessage("You need $6 to play!");
return false;
}

this.inuse = true;
player.rupees -= 6;
this.safe.money += 5;


player.rupees-= 6;
this.safe.money += 6;

scheduleEvent(random(2, 5), "determineoutcome", player);
setcharani("slotmachinespin", NULL);

}
Reply With Quote