Graal Forums

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

CrazedMerlin 06-16-2001 01:59 AM

Agh, help please
 
How do i make it so like
your rupees cant be more then the flag
player.rupees=
because i want it so you can only hold a certain amoun of rupees when you start but you can do quests that set like
player.rupees=1000
so you can hold up to 1000....

AlexH 06-16-2001 02:36 AM

Try this

if (playerenters) {set rupees}
if (rupees&&playerrupees>1000) {playerrupees=1000}

CrazedMerlin 06-16-2001 02:54 AM

no but i want the max amount of rupees to be the flag
like if the flag is player.rupees=5000
i want the max rupees to be 5000 if the flag is player.rupees=1000 i want the max rupees to be 1000...

grim_squeaker_x 06-16-2001 05:01 PM

NPC Code:
if (playerenters||timeout)
if (!(isweapon&&hasweapon(-moneysystem))) {
setstring player.maxmoney,1000;
toweapons -moneysystem;
}
else if (playerrupees>strtofloat(#s(player.maxmoney))) playerrupees=strtofloat(#s(player.maxmoney));
timeout=0.05;
}



CrazedMerlin 06-17-2001 07:05 AM

Quote:

Originally posted by grim_squeaker_x
NPC Code:
if (playerenters||timeout)
if (!(isweapon&&hasweapon(-moneysystem))) {
setstring player.maxmoney,1000;
toweapons -moneysystem;
}
else if (playerrupees>strtofloat(#s(player.maxmoney))) playerrupees=strtofloat(#s(player.maxmoney));
timeout=0.05;
}



Thanks! :)


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

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