Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.