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, ;
}