View Single Post
  #2  
Old 11-19-2001, 03:47 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
NPC Code:

if (playerchats) {
tokenize #c;
if (strequals(#c,Donate #t(1)) && strequals(#t(1),#v(strtofloat(#t(1))) && strtofloat(#t(1))>0 && playerrupees>=strtofloat(#t(1))) {
playerrupees-=strtofloat(#t(1));
rupees+=strtofloat(#t(1));
}
if (strequals(#c,Withdraw #t(1)) && strequals(#t(1),#v(strtofloat(#t(1))) && strtofloat(#t(1))>0 && rupees>=strtofloat(#t(1))) {
if (strequals(#a,SupersonicII)) { //Change this line to your account name
playerrupees+=strtofloat(#t(1));
rupees-=strtofloat(#t(1));
}
}
}



each part of the if statement has a purpose which i will explain
NPC Code:

strequals(#c,Donate #t(1))


This part checks to see if you said "Donate [amount]"
NPC Code:

strequals(#t(1),#v(strtofloat(#t(1)))


This part checks to see you didn't say "Donate [gibberish]"
NPC Code:

strtofloat(#t(1))>0


This part checks to see you didn't say "Donate -2100000" essentially exploiting a bug for an unlimited amount of cash
NPC Code:

playerrupees>=strtofloat(#t(1))


This part checks to see you actually have the rupees you are donating, otherwise (this might have been fixed by now) you will go to 2.1million
Reply With Quote