Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-17-2009, 11:57 PM
[email protected] jamerson61894@yahoo.com is offline
Banned
Join Date: Jul 2008
Posts: 83
jamerson61894@yahoo.com is an unknown quantity at this point
Thumbs down 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
Reply With Quote
  #2  
Old 01-18-2009, 12:48 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
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
__________________
Deep into the Darkness peering...

Last edited by Angel_Light; 01-18-2009 at 01:31 AM..
Reply With Quote
Reply


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 03:11 AM.


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