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 10-23-2001, 10:35 AM
Kansuke Kansuke is offline
Registered User
Join Date: Oct 2001
Location: Somewhere... i think
Posts: 129
Kansuke is on a distinguished road
Donations..

How do u make a donations box.. so you can say Donate (ammount) and it saves and only one account (Kansuke) can withdraw from it..
__________________

^ Im making sigs like this for 10g-20g!
Reply With Quote
  #2  
Old 10-23-2001, 10:42 AM
dragoonvenganc dragoonvenganc is offline
Registered User
Join Date: Jul 2001
Location: USA
Posts: 331
dragoonvenganc is on a distinguished road
Send a message via ICQ to dragoonvenganc Send a message via AIM to dragoonvenganc
if (startswith(Donation,#c)){tokenize #c;
setstring donation,#v(#s(donation)+#t(1));
setplayerprop #c, Thank you for Donating;}

if (playersays(withdraw)&&strequals(#a,kansuke)){play errupees=playerrupees+strtofloat(#s(donation));set string donation,;}

that should work i did it fast.. i think startswith is (partstr,fullstr)
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
Reply With Quote
  #3  
Old 10-23-2001, 11:07 AM
Kansuke Kansuke is offline
Registered User
Join Date: Oct 2001
Location: Somewhere... i think
Posts: 129
Kansuke is on a distinguished road
when i say donation 5 it doesn't take away 5 rupees from me but it donates 5g
__________________

^ Im making sigs like this for 10g-20g!
Reply With Quote
  #4  
Old 10-23-2001, 11:26 AM
Kansuke Kansuke is offline
Registered User
Join Date: Oct 2001
Location: Somewhere... i think
Posts: 129
Kansuke is on a distinguished road
should i use playerrupees-=#t;
??
__________________

^ Im making sigs like this for 10g-20g!
Reply With Quote
  #5  
Old 10-23-2001, 08:41 PM
Shard_IceFire Shard_IceFire is offline
Registered User
Shard_IceFire's Avatar
Join Date: Jun 2001
Location: Eastern Harkoonia
Posts: 861
Shard_IceFire is on a distinguished road
Why are there two threads about this!?
__________________

-=Shard IceFire=-
Reply With Quote
  #6  
Old 10-23-2001, 10:09 PM
dragoonvenganc dragoonvenganc is offline
Registered User
Join Date: Jul 2001
Location: USA
Posts: 331
dragoonvenganc is on a distinguished road
Send a message via ICQ to dragoonvenganc Send a message via AIM to dragoonvenganc
lol sorry u said make it so it donates not does it all try this one

if (startswith(Donation,#c)){tokenize #c;
if (playerrupees<=strtofloat(#t(1))){playerrupees=pla yerrupees-#t(1);
setstring donation,#v(#s(donation)+#t(1));
setplayerprop #c, Thank you for Donating;}
else setplayerprop #c, Sorry you do not have enough money;}

try that one

And the 2 forum thing.. because he messed up.. USE ONE FORUM OR DO NOT POST

hope this helps
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
Reply With Quote
  #7  
Old 10-23-2001, 10:20 PM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Quote:
Originally posted by dragoonvenganc
lol sorry u said make it so it donates not does it all try this one

if (startswith(Donation,#c)){tokenize #c;
if (playerrupees<=strtofloat(#t(1))){playerrupees=pla yerrupees-#t(1);
setstring donation,#v(#s(donation)+#t(1));
setplayerprop #c, Thank you for Donating;}
else setplayerprop #c, Sorry you do not have enough money;}

try that one

And the 2 forum thing.. because he messed up.. USE ONE FORUM OR DO NOT POST

hope this helps
I think u have to use strtofloat in the setstring part too


if (startswith(Donation,#c)){tokenize #c;
if (playerrupees<=strtofloat(#t(1))){playerrupees=pla yerrupees-#t(1);
setstring donation,#v(strtofloat(#s(donation))+strtofloat(#t (1)));
setplayerprop #c, Thank you for Donating;}
else setplayerprop #c, Sorry you do not have enough money;}
__________________
No Webhost at the moment
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 04:14 PM.


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