Jump to content
  • 0

Script Problem


Limestone

Question


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

Hi!

i'm making now a bank script
but i dont know how to do this
 
2rfcw9l.png
 
if i add a bank note in my account
it shows a total of how many bank notes i have after the transaction
for example i have 1 bank note already in my account
if i add 1 bank note again
it will show how many bank notes in my account after the transaction

 

thanks!

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

if it's variable ...

mes "Your bank note = "+#BANKNOTES;

if it's item ...

mes "Your bank note = "+countitem( 12345 );     // 12345 = banknote id
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

yes, it a variable. i tried already what you have written in your post, but it stills show how much bank notes before the transaction.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

show your script ....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

        mes "[ ^ffa500Bank Exchange^000000 ]";
        mes "Very well, how much ^ffffBank Notes^000000";
        mes "would you like to deposit?";
        mes "Please note, that each ^fdd017Bank";
        mes "Note^000000 is equivalent to ^ff0000100000^000000z.";
        next;
        input @deposit,0,countitem(8051);
        if(@deposit < 1) goto DepoB;
        mes "[ ^ffa500Bank Exchange^000000 ]";
        mes "You currently have ^ff0000"+countitem(8051)+"^000000 ^fdd017Bank Note^000000";
        mes "in your account.";
        mes "By finishing this transaction,";
        mes "you will gain:
        mes "^ff0000"+@deposit+"^000000 ^fdd017Bank Note^000000";
        mes "and have a total of:";
        < ------ this part is what i'm missing -------- >
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  


mes "and have a total of:";

mes "^ff0000"+( @deposit + countitem(8051) )+"^000000 ^fdd017Bank Note^000000";

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

emistry i try your script and convert to this, but it shows not exact amount of my #BANKNOTES

 

"+@deposit+#BANKNOTES+"


thanks, i already fixed my problem! :)



Emistry i have 1 problem again, how can i set this script.

 

if i put 100000z = 1 bank note

 

case 2:
        mes "[ ^ffa500Bank Exchange^000000 ]";
        mes "Very well, what type of exchange";
        mes "would you like to do?";
        next;
        switch(select("^ff0000Zeny^000000 -> ^fdd017Bank Note^000000:^fdd017Bank Note^000000 -> ^ff0000Zeny^000000:Nevermind.")){
        case 1:
                mes "[ ^ffa500Bank Exchange^000000 ]";
                mes "How much zeny do you want to";
                mes "transfer into ^fdd017Bank Notes^000000?";
                mes "Please note, that each ^fdd017Bank";
                mes "Note^000000 is equivalent to ^ff0000100000^000000z.";
                next;
                input @zeny,0,Zeny;
                if(Zeny < 99999){
                mes "[ ^ffa500Bank Exchange^000000 ]";
                mes "I'm sorry, but you don't have";
                mes "enought zeny for the transaction.";
                mes "Please input a valid amount.";
                close;
                }
            else 
                if(@Zeny < 99999){
                mes "[ ^ffa500Bank Exchange^000000 ]";
                mes "Please input an amount greater";
                mes "than 99,999.";
                close;
                }
                else {
                mes "[ ^ffa500Bank Exchange^000000 ]";
                mes "Are you sure you want to";
                mes "exchange ^ff0000"+@zeny+"^000000 z for ^ff0000"+@bank_note+"^000000 ^fdd017Bank Note^000000?";
                }
                next;
                switch(select("Yep, go ahead.:No, I changed my mind.")){
                case 1:
                        mes "[ ^ffa500Bank Exchange^000000 ]";
                        mes "Okay then, would you like ^ff0000"+@zeny+"^000000 ^fdd017Bank Note^000000 ";
                        mes "to be placed in your inventory or your account?";
                        next;
                        switch(select("Inventory - ^ffa500"+countitem(8051)+"^000000 + ^ffa500"+@bank_note+"^000000 ^fdd017Bank Notes^000000:Account - ^ffa500"+(#BANKNOTES)+"^000000 + ^ffa500"+@bank_note+"^000000 ^fdd017Bank Notes^000000:Nevermind")){
                        case 1:
                                mes "[ ^ffa500Bank Exchange^000000 ]";
                                mes "...";
                                next;
                                set @exchange, @zeny / 100000;
                                set Zeny,Zeny-(100000*@exchange);
                                getitem 8051,@exchange;
                                mes "[ ^ffa500Bank Exchange^000000 ]";
                                mes "Exchange Complete.";
                                close;
                        case 2:
                                mes "[ ^ffa500Bank Exchange^000000 ]";
                                mes "...";
                                next;
                                mes "[ ^ffa500Bank Exchange^000000 ]";
                                mes "Exchange Complete.";
                                mes "Your total account balance is now ^ff0000"+#BANKNOTES+"^000000 ^fdd017Bank Notes^000000.";
                                close;
                        case 3:
                                mes "[ ^ffa500Bank Exchange^000000 ]";
                                mes "Come back soon.";
                                close;
                        }
                case 2:
                        mes "[ ^ffa500Bank Exchange^000000 ]";
                        mes "Come back soon.";
                        close;
                }            
Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...