Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Selling your broken stones help! (https://forums.graalonline.com/forums/showthread.php?t=29161)

IceFire_TK 05-14-2002 11:39 PM

Selling your broken stones help!
 
I have made a stone breaking job where you break stones and sell them, 1g a peice. But i can't figure out how to get it so when you say sell rocks, it gives you 1g for every broken rock you have, then, empty's your inventory of rocks to a fresh 0 so you can re-collect more broken rocks. Help!



ok heres the script-part of the rock that you break. It's at the part where you break it

NPC Code:

if (this.result==100) {
putleaps 2,x+1,y-1;
say2 You broke the rock!;
this.add=1+strtofloat(#s(client.rock1));
setstring client.rock1,#v(this.add);
hidelocal;
}
}



ok using client.rock1 and this.add, how would i do this?!
thanks for the help!


P.S. Please check out my status bar thread in here and help me with it also!

Neonight 05-15-2002 12:12 AM


Jagen:
1.)
setstring #v(strtofloat(#s(client.rock1))+1);

2.)
if(playerchats&&strequals(#c,sell rocks)){
playerrupees+=strtofloat(#s(client.rock1));
setstring client.rock1,0;
}

try that


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

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