Thread: Cash Plz!!
View Single Post
  #48  
Old 08-09-2005, 10:37 PM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
NPC Code:
if (playerchats) {
if (startswith(/give,#c)) {
tokenize #c,;
if (tokenscount == 3) {
setstring this.giver,#a;
if (playerrupees >= strtofloat(#t(1)) && strtofloat(#s(clientr.money)) >= strtofloat(#t(1))) {
with (getplayer(#t(3))) {
if (!playeristrial) {
playerrupees += strtofloat(#t(1));
setstring clientr.money,#v(playerrupees);
setplayerprop #c,#s(this.giver) gave you $#t(1)!;
with (getplayer(#s(this.giver))) {
playerrupees -= strtofloat(#t(1));
setstring clientr.money,#v(playerrupees);
setplayerprop #c,Gave $#t(1) to #t(3)!;
}
}else
if (playeristrial) {
with (getplayer(#s(this.giver))) {
setplayerprop #c,Can not give money to trials.;
}
}
else
if (!playerrupees >= strtofloat(#t(1)) || !strtofloat(#s(clientr.money)) >= strtofloat(#t(1))) {
setplayerprop #c,You don't have that much.;
}
}
}
}else
if (!tokenscount == 3) {
setplayerprop #c,Correct format: /give "ammount" to "account";
}
}
}


Walla! Didn't test it (not like I can) and it's also assuming that clientr.money is the money string on Zone.
Reply With Quote