get zeny amount from new bank system

Zerathul

New member
Messages
6
Points
0
hi everyone,

For a own NPC I need to know how much zeny the player has in the bank.

I have try it with variable name such as #bankstorage, #kafrabank, #bankvault and so on.

They were all 0.
(In the bank are more than 0 zeny)
 

How do I get out in the script, how much zeny has the player in the Bank?

Thanks for your help

 
query_sql "SELECT `bank_vault` FROM `account_data` WHERE `account_id`="+getcharid(3),.@bank;mes "You have "+ .@bank +"z in the bank";next;Zeny -=1000;query_sql "UPDATE `account_data` SET `bank_vault`=`bank_vault`+1000 WHERE `account_id`="+getcharid(3);mes "1000z has been deposited to your bank From your wallet.";close; 

Here you Go.

 
Thanks, one step further^^


I get in my test still 0.

My test script:

-  script  bankvalue#newbe01::value  -1,{  OnPCLoginEvent:  query_sql "SELECT bank_vault FROM account_data WHERE account_id="+getcharid(3),.@bank;  mes "your bank vault: " + @bank + " Zeny.";  close;  end;} 
and the result:

http://www.directupload.net/file/d/3715/kbtvmo63_jpg.htm
mes "your bank vault: " + .@bank + " Zeny.";

 
Last edited by a moderator:
hi everyone,

I write again because now i have a problem with saving the bank_vault.

I store the value with said SQL query in the database, but the ingame bank-display does not refresh.

When I select - after the update query - the value, then I get the new value.

If I deposit money through the bank or take off, then the old value for the calculation is used, and overwrite the database value.

How can I tell the (ingame) Bank that it has a new value?

 
You can't actually do much regarding this via scripting. SQL values are saved from time to time, so there's not much else to do unless you force to save the char or get his bank vault data saved on RAM from the server process itself.

 
This option should store the value in the database.
However, I need a way to read the new bank value from the database or directly modify the ingame bank value.

As a workaround, I have my script modified so that it works with the Zeny-value from the char.

Currently there is really no way to influence the ingame Bank by script?

 
This option should store the value in the database.

However, I need a way to read the new bank value from the database or directly modify the ingame bank value.

As a workaround, I have my script modified so that it works with the Zeny-value from the char.

Currently there is really no way to influence the ingame Bank by script?
It's need a  new script command to refresh banking zeny  in  RAM

 
try this plugin

http://upaste.me/7ba18d

tested with

Code:
prontera,155,186,7	script	kldjhfksdjhf	100,{	dispbottom Zeny +" "+ bank_vault();}
honestly ... developer should added a constant for this variable ...
 
Last edited by a moderator:

Attachments

Last edited by a moderator:
try this plugin

http://upaste.me/7ba18d

tested with

prontera,155,186,7 script kldjhfksdjhf 100,{ dispbottom Zeny +" "+ bank_vault();}honestly ... developer should added a constant for this variable ...
As I understood,What he really need  is  bank_deposit script command

attachicon.gif
bank_op.c

i use this bank_op.c plugin and it freezes when i use this script.  But the bank_vault sucessfully updated.

    set Zeny,Zeny - @deposit;

     set Zeny,Zeny - @cost;

     bank_deposit(@deposit);

 
or is there a banker npc that could replace that banking feature of the new clients? because:

1. My previous game client supports banking

2. I reverted to older clients for some reason and the bank is nit there.

3. players cant access their bank vault any

more.

hep me pls
default_smile.png


 
Back
Top