Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Script help please! (https://forums.graalonline.com/forums/showthread.php?t=83740)

[email protected] 01-17-2009 11:57 PM

Script help please!
 
Hi, I have a script that makes you make money for my server.

It is only temperary but it is a way to make money for now.

Basically, it shows the block.png image, and it makes it to where if you press "a" when you walk up to the block, it gives you money. It works fine but there is a glitch that I need help fixing. You can hold a and it gives you on average, 30 more bucks a minute, so i was hoping someone could help me fix it.

here is the script:


message Grab me to make money!;
function OnActionGrab();
if (actiongrab) {
player.rupees +=5;
hide;
sleep 3.6;
show;
}



you press a, it disappears for 2-3 seconds, and gives you money.

I need help making it to where you cant just press a. Where you have to keep pressing "A".

tHANKS

-jamerson

Angel_Light 01-18-2009 12:48 AM

PHP Code:

function onActionGrabbed()
{
  if (
this.give == 0)
  {
    
this.give 1;
    
player.rupees += 5;
    
sleep3.6);
    
this.give 0;
  }


Just set up a test variable. =]

oh and for the function just put this in a weapon and add it to the player
What you could do so you keep pressing "A" is instead of onKeyPressed, you could use a timeout with keydown().

http://forums.graalonline.com/forums...ad.php?t=78114
http://forums.graalonline.com/forums...ad.php?t=76516


All times are GMT +2. The time now is 01:11 AM.

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