Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Shop Till and Donations Box (https://forums.graalonline.com/forums/showthread.php?t=60145)

juice188 07-24-2005 06:25 PM

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.

Bl0nkt 07-25-2005 04:34 AM

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.

Lance 07-25-2005 05:25 AM

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.

xManiamaNx 07-25-2005 05:30 AM

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.

Bl0nkt 07-25-2005 09:57 AM

Juice, who are you and where can I talk to you outside of the forums?

xAndrewx 07-25-2005 11:10 AM

Also, add a detection of what they say.
Make sure they can't say "-#" (( -1 etc))

Bl0nkt 07-25-2005 08:53 PM

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) {

:]

excaliber7388 07-27-2005 03:16 AM

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 :D not a full script though, sorry, you should learn from this, not copy it and paste it, even though you will ;)

Bl0nkt 07-27-2005 04:43 AM

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 :D 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 ;]

Inverness 07-27-2005 04:57 AM

abs(variable) would turn it into absolute value. Preventing the use of negatives.

juice188 07-27-2005 11:28 PM

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]


All times are GMT +2. The time now is 10:02 AM.

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