Zerathul 0 Posted August 15, 2014 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 Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted August 15, 2014 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. Quote Share this post Link to post Share on other sites
0 Zerathul 0 Posted August 15, 2014 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 Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted August 15, 2014 (edited) 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."; Edited August 15, 2014 by Angelmelody 1 evilpuncker reacted to this Quote Share this post Link to post Share on other sites
0 Zerathul 0 Posted August 15, 2014 Now it worksThanks for your help Quote Share this post Link to post Share on other sites
0 Zerathul 0 Posted August 22, 2014 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? Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted August 22, 2014 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. Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted August 23, 2014 (edited) Are you sure? In game bank and mysql are synchronous unless you didn't enable this option Edited August 23, 2014 by Angelmelody Quote Share this post Link to post Share on other sites
0 Zerathul 0 Posted August 24, 2014 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? Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted August 27, 2014 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 Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted August 27, 2014 (edited) 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 ... Edited August 27, 2014 by AnnieRuru 1 1 kyeme and evilpuncker reacted to this Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted September 2, 2014 (edited) 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 bank_op.c Edited September 2, 2014 by Angelmelody Quote Share this post Link to post Share on other sites
0 astralprojection 35 Posted September 27, 2014 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 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); Quote Share this post Link to post Share on other sites
0 astralprojection 35 Posted September 27, 2014 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 Quote Share this post Link to post Share on other sites
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.
How do I get out in the script, how much zeny has the player in the Bank?
Thanks for your help
Share this post
Link to post
Share on other sites