![]() |
Contribution, a Safe!
Heres a safe script I made, if anyone wants to use it or correct any errors in it, go ahead.
// NPC made by Silent Skripter *Scripting* if (created) { } if (playertouchsme) { } if (playerchats && strcontains(#c,/pay)){ tokenize #c; this.rupeeadd = strtofloat(#t(1)); if (playerrupees >= this.rupeeadd){ if (this.rupeeadd > 0){ playerrupees -= this.rupeeadd; this.safemoney += this.rupeeadd; setcharprop #c,#v(this.safemoney) dollars in safe!; timeout=5; } } } if (playerchats && strcontains(#c,/take)){ tokenize #c; this.takemoney = strtofloat(#t(1)); if (this.safemoney >= this.takemoney){ if (this.takemoney > 0){ if (strequals(#a,Your Account Here!)){ playerrupees += this.takemoney; this.safemoney -= this.takemoney; setplayerprop #c, Took #v(this.takemoney) dollars out of safe!; setcharprop #c, #v(this.safemoney) left in safe! timeout = 5; } } } } if (timeout){ setcharprop #c, ; |
use [code] tags
|
/pay -50
|
Read the script, /pay -50 wont work. It makes sure the number is at least 1.
|
/pay 2.5
|
Fixed.
|
You have some errors in your script.
setcharprop #c, #v(this.safemoney) left in safe!; if (timeout){ setcharprop #c, ; } Also learn how to style, or use the style button in editor :o |
Quote:
|
Quote:
|
| All times are GMT +2. The time now is 01:33 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.