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 07-24-2005, 06:25 PM
juice188 juice188 is offline
.b o n e s.
juice188's Avatar
Join Date: Feb 2005
Location: united states
Posts: 313
juice188 is on a distinguished road
Send a message via AIM to juice188 Send a message via Yahoo to juice188
Question Shop Till and Donations Box

Can anyone help me with making a shop till box or a donations box on Graal? Like the script for donating money and putting money that has been used to purchase something in a box and put the people who can withdraw from it.
__________________

"Taking offers on a silver coin!"
Reply With Quote
  #2  
Old 07-25-2005, 04:34 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
Quote:
Originally Posted by juice188
Can anyone help me with making a shop till box or a donations box on Graal? Like the script for donating money and putting money that has been used to purchase something in a box and put the people who can withdraw from it.
What currency are you using? Graalets, customized money system? Tell me and I'll make it for you.
Reply With Quote
  #3  
Old 07-25-2005, 05:25 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Bl0nkt
What currency are you using? Graalets, customized money system? Tell me and I'll make it for you.
No, you won't. Read the rules.
Reply With Quote
  #4  
Old 07-25-2005, 05:30 AM
xManiamaNx xManiamaNx is offline
Supreme Dictator
xManiamaNx's Avatar
Join Date: Nov 2002
Location: 127.0.0.1
Posts: 385
xManiamaNx is on a distinguished road
Send a message via MSN to xManiamaNx Send a message via Yahoo to xManiamaNx
Donation box... function onPlayerChats() { check that their chat starts with something like /donate. If so, have it check that they have enough money to donate. If they do, increase a server string, db npc string, or a this.string. A this.string should be avoided though, as it would get reset if the level is updated. After increasing the string, decrease their money count. It would be a good iidea to check that they are donating an amount that is > 0. Withdrawing is the oppodite of donating, but with an added account check so only certain people can withdraw.

Shop Till would also be similar, but it would have to add weapons to players when it removes the money from them.
__________________
Maniaman

Play Maloria Now: [2.3] [3]
Maloria Website

Reply With Quote
  #5  
Old 07-25-2005, 09:57 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
Juice, who are you and where can I talk to you outside of the forums?
Reply With Quote
  #6  
Old 07-25-2005, 11:10 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Also, add a detection of what they say.
Make sure they can't say "-#" (( -1 etc))
__________________
Reply With Quote
  #7  
Old 07-25-2005, 08:53 PM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
Quote:
Originally Posted by xAndrewx
Also, add a detection of what they say.
Make sure they can't say "-#" (( -1 etc))
if (tokenscount == 2 && strtofloat(#t(1)) > 0) {

:]
Reply With Quote
  #8  
Old 07-27-2005, 03:16 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
here's some real help, not people saying figure it out for yourself:but i won't give you a full script try something that has playersaysnumber
like this:
if(strcontains(#c,donate)){rupees=rupees+playersay snumber}
you would have to add A LOT, but i can't give you a full script =\ sorry. try making it so the player has more than 0 rupees, and they lose rupees when they say it you also might want something to display the rupees:
while(rupees>-1){message #v(rupees)}
would work not a full script though, sorry, you should learn from this, not copy it and paste it, even though you will
Reply With Quote
  #9  
Old 07-27-2005, 04:43 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
Quote:
Originally Posted by excaliber7388
here's some real help, not people saying figure it out for yourself:but i won't give you a full script try something that has playersaysnumber
like this:
if(strcontains(#c,donate)){rupees=rupees+playersay snumber}
you would have to add A LOT, but i can't give you a full script =\ sorry. try making it so the player has more than 0 rupees, and they lose rupees when they say it you also might want something to display the rupees:
while(rupees>-1){message #v(rupees)}
would work not a full script though, sorry, you should learn from this, not copy it and paste it, even though you will
Wow... the thing I made is practically 4 paragraphs long.
Oh, and the variable is playerrupees ;]
Reply With Quote
  #10  
Old 07-27-2005, 04:57 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
abs(variable) would turn it into absolute value. Preventing the use of negatives.
__________________
Reply With Quote
  #11  
Old 07-27-2005, 11:28 PM
juice188 juice188 is offline
.b o n e s.
juice188's Avatar
Join Date: Feb 2005
Location: united states
Posts: 313
juice188 is on a distinguished road
Send a message via AIM to juice188 Send a message via Yahoo to juice188
Quote:
Originally Posted by Bl0nkt
Juice, who are you and where can I talk to you outside of the forums?
u can contact me on aim as Tidustrife0 or MSN as [email protected]
__________________

"Taking offers on a silver coin!"
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 01:22 AM.


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