Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Rupees (STEFAN) (https://forums.graalonline.com/forums/showthread.php?t=15280)

Kansuke 10-23-2001 12:13 PM

Rupees (STEFAN)
 
Im adding a donations box to my racetrack..
so people can donate cash if they want.. i was wondering how this is done because the npcserver might block this or something... is it just playerrupees
or is it somehting more complicated that has to do with the npcserver

joseyisleet 10-23-2001 05:52 PM

Ummm.........
if (playerlaysitem){take greenrupee;take bluerupee;take redrupee; take goldrupee;}
if (created){timeout=.05;}
if (timeout){message #v(rupees) has been donated!;timeout=.05;}
if (playerchats&&strequals(#g,race track owner)&&strequals(#c,take donations)){playerrupees=playerrupees+rupees;rupee s=0;timeout=.05;}

joseyisleet 10-23-2001 05:55 PM

or........
if (playerchats&&startswith(Donate,#c)){tokenize #c;}
if (tokenscount==2){
if (playerrupees=>#t(1)){rupees+=#t(1);playerrupees-=#t(1);}

something like these?

joseyisleet 10-23-2001 06:00 PM

messed up on teh bottom
try
// NPC made by Josey Hunt
if (playerchats&&startswith(Donate,#c)){tokenize #c;}
if (tokenscount==2){i=strtofloat(#t(1));
if (playerrupees=>i){rupees+=i);playerrupees-=i;
}}

joseyisleet 10-23-2001 06:06 PM

I'm really tired cause I've been playing Unreal Tournament fo days in a row, so don't gripe if neither works, *****!
Well back to more killing :D:D:D:D:D

Slaktmaster 10-23-2001 06:10 PM

Minimum timeout with NPC server is 0.1

BocoC 10-24-2001 06:59 AM

Quote:

Originally posted by Slaktmaster
Minimum timeout with NPC server is 0.1
Only for serverside scripts. Clientside scripts can be 0.05


All times are GMT +2. The time now is 08:20 AM.

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