Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-18-2003, 12:31 AM
SilentSkripter1988 SilentSkripter1988 is offline
Banned
Join Date: Aug 2003
Posts: 56
SilentSkripter1988 is on a distinguished road
Cool 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, ;
Reply With Quote
 


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 03:34 AM.


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