Thread: Et idea
View Single Post
  #10  
Old 02-26-2002, 08:08 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
here is the whole thing i made

NPC Code:

if (playerchats&&startswith(~give,#c)) {
tokenize #c;
if (tokenscount==3) {
if (timevar-strtofloat(#s(this.lastused))>=720) {
if (!strequals(#t(1),#a)) {
if (strtofloat(#t(2)) in |1,100|) {
setstring this.give,#t(2);
with (getplayer(#t(1))) {
playerrupees+=strtofloat(#t(2));
say2 You recieved #t(2) gralats.;
with (getnpc(Event)) {
setstring this.give,done;
}
}
if (strequals(#s(this.give),done)) {
with (getplayer(#a)) {
playerrupees-=strtofloat(#t(2));
}
}
addstring this.log,#a gave #t(1) #t(2) gralats;
setstring this.lastused,#v(timevar);
} else {
say2 Must be between 1 and 100 gralats.;
addstring this.log,ERROR: #a tried to gave #t(1) #t(2) gralats; }
} else {
say2 You can't give yourself gralats.;
addstring this.log,ERROR: #a tried to give themself gralats; }
} else {
say2 This event has already been used#bwithin the last hour. Please wait.;
addstring this.log,ERROR: #a tried to give gralats withing less than a hour; }
} else { say2 Wrong syntax.; }
setplayerprop #c, ;
}

__________________
Staff on Renegade


email: [email protected]
aim: papivicente

Last edited by TDK_RC6; 02-26-2002 at 08:30 AM..
Reply With Quote