Jump to content
  • 0
Zerathul

get zeny amount from new bank system

Question

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

Share this post


Link to post
Share on other sites

13 answers to this question

Recommended Posts

  • 0
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.

Share this post


Link to post
Share on other sites
  • 0
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

Share this post


Link to post
Share on other sites
  • 0

 

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 by Angelmelody

Share this post


Link to post
Share on other sites
  • 0

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?

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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?

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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 by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

 

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 by Angelmelody

Share this post


Link to post
Share on other sites
  • 0

 

 

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.gifbank_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);

Share this post


Link to post
Share on other sites
  • 0

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 :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.