• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Dialog Bank Storage

Originally, ap0calypse, made this system for me, so all credits to him. I decided to upload the system because I thought It would be useful to users. Anyway, here are the triggers.



  • Bank System Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- === Setup System === --------
      • -------- There can only be a maximum of 672 stored items for each player --------
      • -------- (which is 84 pages with 8 items/page or 96 pages with 7 items/page) --------
      • Set bankItemsPerPage = 6
      • Set bankPageAmount = 6
      • -------- Item colors (will overwrite default item colors) --------
      • Set bankColor1 = |c00ff8800
      • -------- "Next Page" color --------
      • Set bankColor2 = |c00666fff
      • -------- "Cancel" color --------
      • Set bankColor3 = |c00aa0000
      • -------- === Add Events === --------
      • For each (Integer bankLoop) from 1 to 12, do (Actions)
        • Loop - Actions
          • Custom script: set udg_bankDialog[udg_bankLoop] = DialogCreate()
          • Trigger - Add to Dialog Buttons <gen> the event (Dialog - A dialog button is clicked for bankDialog[bankLoop])
          • Trigger - Add to Esc Pressed <gen> the event (Player - (Player(bankLoop)) skips a cinematic sequence)
  • Setup Dialogs
    • Events
    • Conditions
    • Actions
      • Dialog - Clear bankDialog[bankPlayerId]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • bankInt1 Equal to 0
        • Then - Actions
          • -------- === Main Dialog === --------
          • Dialog - Change the title of bankDialog[bankPlayerId] to ((Name of (Player(bankPlayerId))) + 's Bank)
          • Dialog - Create a dialog button for bankDialog[bankPlayerId] labelled (bankColor1 + Withdraw Items)
          • Set bankDialogButton[(8099 + bankPlayerId)] = (Last created dialog Button)
          • Dialog - Create a dialog button for bankDialog[bankPlayerId] labelled (bankColor1 + Deposit Items)
          • Set bankDialogButton[(8111 + bankPlayerId)] = (Last created dialog Button)
          • Dialog - Create a dialog button for bankDialog[bankPlayerId] labelled (bankColor3 + Cancel)
          • Set bankDialogButton[(8087 + bankPlayerId)] = (Last created dialog Button)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • bankInt1 Equal to 1
            • Then - Actions
              • -------- === Withdraw Dialog === --------
              • -------- Dialog --------
              • Dialog - Change the title of bankDialog[bankPlayerId] to ((Name of (Player(bankPlayerId))) + ('s Bank (Page + ((String((bankPlayerCurrentPage[bankPlayerId] + 1))) + ))))
              • Set bankInt3 = 0
              • For each (Integer bankLoop) from (bankPlayerCurrentPage[bankPlayerId] x bankItemsPerPage) to (((bankPlayerCurrentPage[bankPlayerId] + 1) x bankItemsPerPage) - 1), do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • bankPlayerItems[bankPlayerId] Greater than bankLoop
                    • Then - Actions
                      • Set bankInt2 = ((672 x (bankPlayerId - 1)) + ((bankPlayerCurrentPage[bankPlayerId] x bankItemsPerPage) + bankInt3))
                      • Set bankInt3 = (bankInt3 + 1)
                      • Dialog - Create a dialog button for bankDialog[bankPlayerId] labelled (((String(bankInt3)) + . ) + (bankColor1 + bankItemName[bankInt2]))
                      • Set bankDialogButton[bankInt2] = (Last created dialog Button)
                    • Else - Actions
                      • Set bankLoop = 700
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • bankPlayerPages[bankPlayerId] Greater than 1
                • Then - Actions
                  • Dialog - Create a dialog button for bankDialog[bankPlayerId] labelled (bankColor2 + > Next Page >)
                  • Set bankDialogButton[(8063 + bankPlayerId)] = (Last created dialog Button)
                  • Dialog - Create a dialog button for bankDialog[bankPlayerId] labelled (bankColor2 + < Previous Page <)
                  • Set bankDialogButton[(8075 + bankPlayerId)] = (Last created dialog Button)
                • Else - Actions
              • Dialog - Create a dialog button for bankDialog[bankPlayerId] labelled (bankColor3 + Cancel)
              • Set bankDialogButton[(8087 + bankPlayerId)] = (Last created dialog Button)
            • Else - Actions
              • -------- === Deposit Dialog === --------
              • Set bankIsDepositing[bankPlayerId] = True
              • Dialog - Change the title of bankDialog[bankPlayerId] to ((Name of (Player(bankPlayerId))) + 's Inventory)
              • Set bankInt3 = 0
              • For each (Integer bankLoop) from 1 to 6, do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Item carried by bankHero[bankPlayerId] in slot bankLoop) Not equal to No item
                    • Then - Actions
                      • Set bankInt2 = (((bankPlayerId - 1) x 12) + bankLoop)
                      • Set bankInt3 = (bankInt3 + 1)
                      • Dialog - Create a dialog button for bankDialog[bankPlayerId] labelled (((String(bankInt3)) + . ) + (bankColor1 + (Name of (Item carried by bankHero[bankPlayerId] in slot bankLoop))))
                      • Set bankDialogButton[bankInt2] = (Last created dialog Button)
                    • Else - Actions
              • Dialog - Create a dialog button for bankDialog[bankPlayerId] labelled (bankColor3 + Cancel)
              • Set bankDialogButton[(8087 + bankPlayerId)] = (Last created dialog Button)
      • Dialog - Show bankDialog[bankPlayerId] for (Player(bankPlayerId))
  • Dialog Buttons
    • Events
    • Conditions
    • Actions
      • Set bankPlayerId = (Player number of (Triggering player))
      • -------- === Next Page === --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to bankDialogButton[(8063 + bankPlayerId)]
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • bankPlayerCurrentPage[bankPlayerId] Equal to (bankPlayerPages[bankPlayerId] - 1)
            • Then - Actions
              • Set bankPlayerCurrentPage[bankPlayerId] = 0
            • Else - Actions
              • Set bankPlayerCurrentPage[bankPlayerId] = (bankPlayerCurrentPage[bankPlayerId] + 1)
          • Set bankInt1 = 1
          • Trigger - Run Setup Dialogs <gen> (checking conditions)
          • Skip remaining actions
        • Else - Actions
      • -------- === Previous Page === --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to bankDialogButton[(8075 + bankPlayerId)]
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • bankPlayerCurrentPage[bankPlayerId] Equal to 0
            • Then - Actions
              • Set bankPlayerCurrentPage[bankPlayerId] = (bankPlayerPages[bankPlayerId] - 1)
            • Else - Actions
              • Set bankPlayerCurrentPage[bankPlayerId] = (bankPlayerCurrentPage[bankPlayerId] - 1)
          • Set bankInt1 = 1
          • Trigger - Run Setup Dialogs <gen> (checking conditions)
          • Skip remaining actions
        • Else - Actions
      • -------- === Cancel === --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to bankDialogButton[(8087 + bankPlayerId)]
        • Then - Actions
          • Dialog - Hide bankDialog[bankPlayerId] for (Triggering player)
          • Set bankIsDepositing[bankPlayerId] = False
          • Set bankLoop = 13
          • Skip remaining actions
        • Else - Actions
      • -------- === Withdraw Items-menu === --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to bankDialogButton[(8099 + bankPlayerId)]
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • bankRememberPage[bankPlayerId] Equal to False
            • Then - Actions
              • Set bankPlayerCurrentPage[bankPlayerId] = 0
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • bankPlayerCurrentPage[bankPlayerId] Greater than or equal to bankPlayerPages[bankPlayerId]
                • Then - Actions
                  • Set bankPlayerCurrentPage[bankPlayerId] = (bankPlayerCurrentPage[bankPlayerId] - 1)
                • Else - Actions
          • Set bankInt1 = 1
          • Trigger - Run Setup Dialogs <gen> (checking conditions)
          • Skip remaining actions
        • Else - Actions
      • -------- === Deposit Items-menu === --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to bankDialogButton[(8111 + bankPlayerId)]
        • Then - Actions
          • Set bankInt1 = 2
          • Trigger - Run Setup Dialogs <gen> (checking conditions)
          • Skip remaining actions
        • Else - Actions
      • -------- === Withdraw Items === --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • bankIsDepositing[bankPlayerId] Equal to False
        • Then - Actions
          • For each (Integer bankLoop) from 0 to (bankItemsPerPage - 1), do (Actions)
            • Loop - Actions
              • Set bankInt2 = (((bankPlayerId - 1) x 672) + ((bankPlayerCurrentPage[bankPlayerId] x bankItemsPerPage) + bankLoop))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to bankDialogButton[bankInt2]
                • Then - Actions
                  • Item - Show bankStoredItem[bankInt2]
                  • Hero - Give bankStoredItem[bankInt2] to bankHero[bankPlayerId]
                  • Set bankPlayerItems[bankPlayerId] = (bankPlayerItems[bankPlayerId] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • bankPlayerItems[bankPlayerId] Equal to (bankItemsPerPage x (bankPlayerPages[bankPlayerId] - 1))
                    • Then - Actions
                      • Set bankPlayerPages[bankPlayerId] = (bankPlayerPages[bankPlayerId] - 1)
                    • Else - Actions
                  • Set bankLoop = 20
                • Else - Actions
          • -------- Recycle --------
          • For each (Integer bankLoop) from bankInt2 to (bankInt2 + bankPlayerItems[bankPlayerId]), do (Actions)
            • Loop - Actions
              • Set bankStoredItem[bankLoop] = bankStoredItem[(bankLoop + 1)]
              • Set bankItemName[bankLoop] = bankItemName[(bankLoop + 1)]
              • Set bankItemCharges[bankLoop] = bankItemCharges[(bankLoop + 1)]
          • Skip remaining actions
        • Else - Actions
      • -------- === Deposit Items === --------
      • For each (Integer bankLoop) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set bankIsDepositing[bankPlayerId] = False
          • Set bankInt2 = (((bankPlayerId - 1) x 672) + bankPlayerItems[bankPlayerId])
          • Set bankInt3 = (((bankPlayerId - 1) x 12) + bankLoop)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to bankDialogButton[bankInt3]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • bankPlayerItems[bankPlayerId] Equal to 672
                      • bankPlayerItems[bankPlayerId] Equal to (bankItemsPerPage x bankPageAmount)
                • Then - Actions
                  • Game - Display to (All players) the text: |c00ffcc00Error:|r ...
                  • Skip remaining actions
                • Else - Actions
              • Set bankPlayerItems[bankPlayerId] = (bankPlayerItems[bankPlayerId] + 1)
              • Set bankStoredItem[bankInt2] = (Item carried by bankHero[bankPlayerId] in slot bankLoop)
              • Set bankItemName[bankInt2] = (Name of (Item carried by bankHero[bankPlayerId] in slot bankLoop))
              • Set bankItemCharges[bankInt2] = (Charges remaining in (Item carried by bankHero[bankPlayerId] in slot bankLoop))
              • Hero - Drop the item from slot bankLoop of bankHero[bankPlayerId]
              • Item - Hide bankStoredItem[bankInt2]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • bankPlayerItems[bankPlayerId] Equal to ((bankItemsPerPage x bankPlayerPages[bankPlayerId]) + 1)
                • Then - Actions
                  • Set bankPlayerPages[bankPlayerId] = (bankPlayerPages[bankPlayerId] + 1)
                • Else - Actions
              • Set bankLoop = 6
            • Else - Actions
  • Esc Pressed
    • Events
    • Conditions
    • Actions
      • Set bankInt1 = 0
      • Set bankPlayerId = (Player number of (Triggering player))
      • Trigger - Run Setup Dialogs <gen> (checking conditions)


First, gather some items into the standard inventory of your predefined unit. Second, press Esc and when a dialog box opens, choose Deposit. Deposit opens a second dialog, where dialog buttons for every item that your predefined unit carries are shown. Lastly, click any of the dialog buttons, except Cancel, to store an item.

In order to view your stored items or get them back, click Withdraw instead after you press Esc. Then do the same as if you pressed Deposit.


The system no longer destroys or recreates items to work. Instead, it hides items to store and shows the items again to retrieve.

Bug Fixing
1. Fixed item charge glitch

Added New Features:
1. Access to Withdraw and Deposit dialogs via commands for faster access
2. Saves item cooldown
Contents

Dialog Bank Storage (Map)

Reviews
A nice system that could be useful. The system could offer an alternative metod of using it. Bank System Setup leaks one dialog. The system could detect which players are present and create dialogs and register events only for them.

Moderator

M

Moderator

Reviewed by Maker, Dialog Bank Storage, 29th Dec 2012

A nice system that could be useful.

The system could offer an alternative metod of using it.
Bank System Setup leaks one dialog.
The system could detect which players are present and create
dialogs and register events only for them.
 
Top