Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-20-2001, 07:45 AM
r_u_f_u_s r_u_f_u_s is offline
Registered User
Join Date: Nov 2001
Posts: 220
r_u_f_u_s is on a distinguished road
Please help me with this script.

if(playertouchsme)
{
money=strtofloat(#s(server.shopmoney));
if (money >=1) {
setstring server.shopmoney,#v(money);
playerrupees+=money;

}
}


This is part of a script for a money bag that I am making. When money is made, it will be added to the server.shopmoney flag, but what I need to know is how to get it so that when the player touches the npc they will receive the amount of money in the server.shopmoney flag... (like if it's server.shopmoney=200 and they touch it they will get 200 rupees.) I got the giving money part figured out (I think), but I need someone to help me so that when the player touches it it will give the money, but at the same time it will set the server.shopmoney flag = to 0 (server.shopmoney=0)

Please help, I can't figure it out
__________________
- ¤Mâ×Îmû§¤ - Owner of Delteria - (borrowing account)
Reply With Quote
  #2  
Old 12-20-2001, 09:15 AM
r_u_f_u_s r_u_f_u_s is offline
Registered User
Join Date: Nov 2001
Posts: 220
r_u_f_u_s is on a distinguished road
Wow, no one can help me? I just need to know how to set the server.shopmoney flag to 0 once the playertouches that npc.
__________________
- ¤Mâ×Îmû§¤ - Owner of Delteria - (borrowing account)
Reply With Quote
  #3  
Old 12-20-2001, 08:26 PM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by r_u_f_u_s
Wow, no one can help me? I just need to know how to set the server.shopmoney flag to 0 once the playertouches that npc.
set nothing to the string like this:

setstring server.shopmoney,;
Reply With Quote
  #4  
Old 12-20-2001, 10:05 PM
ShockwaveISTHEBEST ShockwaveISTHEBEST is offline
Registered User
Join Date: Nov 2001
Location: never never land
Posts: 208
ShockwaveISTHEBEST is on a distinguished road
Send a message via AIM to ShockwaveISTHEBEST Send a message via Yahoo to ShockwaveISTHEBEST
lol what a aaaljkshfhha iiiii;oeeinjasd;fk
__________________
[img]http://rick.*******ers.net/ss/users/jerrytyrrell64/Shockwave%20Sig%2003.jpg[/img]
Reply With Quote
  #5  
Old 12-20-2001, 10:06 PM
ShockwaveISTHEBEST ShockwaveISTHEBEST is offline
Registered User
Join Date: Nov 2001
Location: never never land
Posts: 208
ShockwaveISTHEBEST is on a distinguished road
Send a message via AIM to ShockwaveISTHEBEST Send a message via Yahoo to ShockwaveISTHEBEST
Sorry my other personality avercame me.
__________________
[img]http://rick.*******ers.net/ss/users/jerrytyrrell64/Shockwave%20Sig%2003.jpg[/img]
Reply With Quote
  #6  
Old 12-20-2001, 11:28 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
here ya go.

NPC Code:

if(playertouchsme)
{
money=strtofloat(#s(server.shopmoney));
if (money >=1) {
playerrupees+=money;
setstring server.shopmoney,0;
}
}



i think thats what you wanted...be more spacific....u confuse me...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 01:30 AM.


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