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 05-14-2002, 11:39 PM
IceFire_TK IceFire_TK is offline
Banned
Join Date: Nov 2001
Location: O' Canada
Posts: 375
IceFire_TK is on a distinguished road
Send a message via AIM to IceFire_TK Send a message via Yahoo to IceFire_TK
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!
Reply With Quote
  #2  
Old 05-15-2002, 12:12 AM
Neonight Neonight is offline
where da wmdz at
Neonight's Avatar
Join Date: Jun 2001
Location: Windsor, Illinois
Posts: 3,665
Neonight is on a distinguished road
Send a message via AIM to Neonight

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
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 07:32 PM.


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