• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Simple bank script

Black Eternity

Lord of Eternity
57
Posts
11
Years
    • Seen Jun 30, 2016
    #This post has been edited since the script has been completed to my standards.
    #Thanks to Maruno for help

    The full script is here: http://www.pokecommunity.com/showthread.php?t=299771


    This is the old post
    Spoiler:
     
    Last edited:

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    You put else rather than elsif. See if that works.
     

    Black Eternity

    Lord of Eternity
    57
    Posts
    11
    Years
    • Seen Jun 30, 2016
    Unfortunately I get the same result, even if I set $game_variables[014] to any number via the debug menu, the script does not recognize it.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Where is MINDEPOSIT set?

    In pbWithdrawBank, you need to use Kernel.pbMessageChooseNumber when choosing the number.
     

    Black Eternity

    Lord of Eternity
    57
    Posts
    11
    Years
    • Seen Jun 30, 2016
    MINDEPOSIT is set in script section "Settings"

    Thanks, I see that I messed up in pbWithdrawBank with kernel.MessageChooseNumber
    and had to change $game_variables[014] to 016 for the correct one to be used.

    All works now.

    Now i must ask, do you have any info on drawing a new moneybox? like pbDisplayCoinsWindow?
     

    Lord Varion

    Guess who's back?
    2,642
    Posts
    15
    Years
    • Age 29
    • Seen Jan 6, 2015
    I've made a bank system using simple events;
    If you want some help with it?


    EDit: never mind, I see you've done it.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Now i must ask, do you have any info on drawing a new moneybox? like pbDisplayCoinsWindow?
    I figured things out when I created the coins window. The big thing to watch out for is making sure your new window won't overlap with either the money or coins window (if you want to show either/both of them at the same time) - if you're only ever going to show your window on its own, that makes things easier. I'm going to assume the easier case.

    The script section PokemonMessages is what you want. Normally I wouldn't advise touching this, and even though the following instructions are fairly simple, I take no responsibility for any mucking-up that happens. In a nutshell, you're copying how the gold window works.

    First, find def pbDisplayGoldWindow, copy-paste it and turn it into what you want.

    Next, pick a letter or two to use to display your new window. For example, \G shows the money window, and \CN shows the coins window. Make sure it's not already being used by something else. Now find the longest line in that script section, which begins: while text[/(?:\\([WwFf]|[Ff][Ff]|... This line lists all the message commands available. A little over halfway into it is \\([Gg]|[Cc][Nn]|[Ww][Dd]|, and hopefully my colouring helps you see what's going on. Take your letter or two and put it straight after the coins part (including another vertical pipe to separate them). There's an example of a one-letter command and a two-letter command.

    Now an easier part. A little further down, find the line which says: elsif control=="g". Copy-paste the three lines of this part and rename all the things accordingly. This includes goldwindow - call it something else, remember what you called it, and read the next paragraph.

    Finally, there are two other lines to add in. Basically, find goldwindow=nil and goldwindow.dispose if goldwindow, and copy-paste them both and rename the things to what you chose in the previous paragraph.

    Done!



    My explanation could have been more eloquent. I'm tired.
     

    Black Eternity

    Lord of Eternity
    57
    Posts
    11
    Years
    • Seen Jun 30, 2016
    Thank you so much Maruno! I was able to get the bankwindow on the first try!
    I greatly appreciate your help.
     
    Back
    Top