Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Banks? (https://forums.graalonline.com/forums/showthread.php?t=23878)

psi 02-16-2002 11:48 AM

Banks?
 
can someone plz tell me what the bank script is to add and deposit money?

Python523 02-16-2002 12:25 PM

use tokenize and strings

TDO2000 02-16-2002 04:50 PM

1. Please read guidlines and rules

2.
NPC Code:

if (playerchats) {
tokenize #c;
if (startswith(deposit,#c)) {
this.deposit=strtofloat(#t(1));
if (this.deposit>playerrupees) this.deposit=playerrupees;
setstring bankaccount,#v(this.deposit);
playerrupees-=this.deposit;
}
}



something like this should do it

neomaximus2k 02-16-2002 06:25 PM

Quote:

Originally posted by TDO2000
1. Please read guidlines and rules

2.
NPC Code:

if (playerchats) {
tokenize #c;
if (startswith(deposit,#c)) {
this.deposit=strtofloat(#t(1));
if (this.deposit>playerrupees) this.deposit=playerrupees;
setstring bankaccount,#v(this.deposit);
playerrupees-=this.deposit;
}
}



something like this should do it


Nice sketch dude, but erm is that a grate on his face??

TDO2000 02-16-2002 07:06 PM

Quote:

Originally posted by neomaximus2k



Nice sketch dude, but erm is that a grate on his face??

^_^ normally u can't see his face bc he looks to the other side ;)

psi 02-17-2002 01:37 AM

and that script will make sure that no one else can take ur money?

psi 02-17-2002 01:43 AM

it doesnt work... it lets u take out an infinite amount......

neomaximus2k 02-17-2002 02:34 AM

Quote:

Originally posted by psi
it doesnt work... it lets u take out an infinite amount......
You have to use erm strings, to get it working correctly, i have a script i may post it l8r

royce 02-17-2002 07:27 AM

I would highly rmend using a client string for storing the money;) .


All times are GMT +2. The time now is 02:54 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.