![]() |
Safe script
if (created||timeout) {
message Tips: #s(server.BHE); timeout=0.5; } if (playerchats&&strequals(#a,Birdwell)||strequals(#a ,Brandons account)||strequals(#a,Dark Dragon Guardian)){} if (startswith(/take,#c)) { tokenize #c; if (strtofloat(#s(server.BHE))>=strtofloat(#t(1))){ if (strtofloat(#t(1))>0){ playerrupees+=strtofloat(#t(1)); setstring server.BHE,#v(strtofloat(#s(server.BHE))-strtofloat(#t(1))); setplayerprop #c,Took #t(1)!; message Tips: -#t(1); sleep 3; message Tips: #s(server.BHE); }else setplayerprop #c,Can't take that!; }} if (playerchats) { if (startswith(/tip,#c)){ tokenize #c; if (playerrupees>=strtofloat(#t(1))){ if (strtofloat(#t(1))>0){ playerrupees-=strtofloat(#t(1)); setstring server.BHE,#v(strtofloat(#s(server.BHE))+strtofloa t(#t(1))); setplayerprop #c, Tipped #t(1)!; message Tips: +#t(1); sleep 3; message Tips: #s(server.BHE); } } } the script works but it gives out money to ppl not in the list to be able to take it. help please |
Quote:
|
Quote:
|
1. KSI-GS (Rule 2a and Rule 8).
2. You may want to check that they're adding / taking an integer value. 3. The timeout isn't necessary... |
Quote:
Alissalee: The thing I was pointing out with this that I guess I should have actually hilited it that you need to watch your groupings. You had this: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
If the player chats and the account is Birdwell or if (no action) and the account is Brandons Account or (no action) and the account is Dark Dragon Guardian. Meaning that the playerchats (the trigger) had no effect on Brandons Account or Dark Dragon Guardian since neither of them had the playerchats attached to them. That is the long way of explaining it. Hope it helped. |
In addition to everything already said, I'd suggest only re-displaying the tip amount when the NPC is created or when the tip amount has changed. It's unnecessary to have such a timeout-display unless you have some other script changing it (which does not seem to be the case).
|
thank you it works right.
|
| All times are GMT +2. The time now is 09:53 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.