NPC Code:
if (playerchats) {
if (strequals(#c,balance)) setplayerprop #c,Balance: #s(client.bankbalance);
if (startswith(deposit,#c)) {
this.temp=abs(strtofloat(#e(7,-1,#c)));
if (playerrupees<this.temp) setplayerprop #c,You don't have enough money;
else {
playerrupees-=this.temp;
setstring client.bankbalance,#v(strtofloat(#s(client.bankbal ance))+this.temp);
setplayerprop #c,#v(this.temp) Gralats deposited. You now have #s(client.bankbalance) Gralats on the bank.;
}
}
if (startswith(withdraw,#c)) {
this.temp=abs(strtofloat(#e(8,-1,#c)));
this.temp2=strtofloat(#s(client.bankbalance));
if (this.temp2<this.temp) setplayerprop #c, You don't have enough money on the bank!;
else {
playerrupees+=this.temp;
setstring client.bankbalance,#v(this.temp2-this.temp);
setplayerprop #c,#v(this.temp) Gralats withdrawn. You now have #s(client.bankbalance) Gralats on the bank.;
}
}
}