![]() |
Very VERY simple donation box.
Uses a serverr.flag. Noticed there wasen't one here at all. I know this is simple and easy, but soom scriptin newbie will be happy it's here.
Has access for only one person to get rupees out. Keep my name in it or else. PHP Code:
|
there's alot of room for improvement but at the very least add else between your two player.chat checks so that it doesn't check every if statement every time.
|
Quote:
|
ya I know it could be better. like i said, easy, simple, complete for the avg n00b. :)
|
Quote:
|
One of the major problems here is that it doesn't check whether the player has the rupees to donate. This is pretty bad but easy enough to fix with a simple if condition.
|
forgot about that lol. here.
PHP Code:
|
I'm not great at reading scripts but what would stop me from donating a decimal value? I realize that it wouldn't subtract the decimal value from the player's rupees but since variables aren't so strict...
|
Quote:
|
You can also donate negative values. Here's an example of a donation box I had laying around.
PHP Code:
|
Quote:
|
Quote:
always cast the serverr into an int also. |
Quote:
|
Quote:
|
well again, simple, not perfect, but now theres a better one in here
|
Not sure why you would use a serverr. flag, though, do you need to send the information clientside? Seems like you can do everything serverside (like in Jerret's example).
|
and actually, just tested with mine, you can do -, but it will still take it from you as a regular in donating, in taking it wont do anyting.
there isnt a reason, ya i could have used this. and saved it on the npc. |
Quote:
No, that would have been a bad idea because then the this. var would have been reset whenever the level was updated. |
o ya xD
sorry, I usually end up posting here after drinking for some reason, every time. :/ Thats probably a bad idea. |
Such things are really not needed in this Code Gallery.
I understand you tho, I was very excited too with my first few scripts |
Definitely not one of my first few, just one of my first few within the last 4-5 years.
|
Quote:
|
| All times are GMT +2. The time now is 10:01 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.