#======================== ##### Gui #======================== ListofBanks: type: inventory inventory: chest title: Central Bank of Suncrest gui: true slots: - [] [] [] [] [] [] [] [] [] - [] [] [] [] [] [] [] [] [] - [] [] [] [] [] [] [] [] [] bankicon: type: item material: emerald display name: <&color[#3d85c6]><[obj].get[1]> Bank lore: - Bank Owner: <&color[#3d85c6]><[obj].get[2]> - Legal Entity: <&color[#3d85c6]><[obj].get[3]> #======================== ##### Commands #======================== PlayerBankGui: type: command name: bank description: Suncrest Banks. usage: /bank account create|deposit|withdraw|close account number tab completions: 1: account 2: create|deposit|withdraw|close 3: ACCNumber script: - if : - narrate "NO! IT ALREADY EXISTS >:C" - else: - define char1 - define char2 - define char3 - define char4 - flag server savedaccnumber:<[char1]>-<[char2]>-<[char3]>-<[char4]> - narrate "<[char1]>-<[char2]>-<[char3]>-<[char4]>" DevBanksGui: type: command name: devbank description: Suncrest Banks Developer Portal. usage: /devbank list|create|delete|help tab completions: 1: list|create|delete|help usage: /devbank script: - choose : - case list: - if !: - narrate "<&color[#3d85c6]>CB of Suncrest | You do not have permission to do that!" - stop - else: - if > 1: - narrate "<&color[#3d85c6]>CB of Suncrest | Too many arguments provided!" - else: - if >= 1: - inventory open d:ListofBanks - foreach as:obj: - give bankicon quantity:1 to: - stop - else: - narrate "<&color[#3d85c6]>CB of Suncrest | There are no banks." - playsound sound:BLOCK_NOTE_BLOCK_BASS pitch:5 - stop - case create: - if !: - narrate "<&color[#3d85c6]>CB of Suncrest | You do not have permission to do that!" - stop - if = 1: - narrate "<&color[#3d85c6]>CB of Suncrest | Please specify a name for the <&color[#6fa8dc]>bank, the <&color[#6fa8dc]>bank owner's name, and, the <&color[#6fa8dc]>legal entity's name." - else: - if = 2: - narrate "<&color[#3d85c6]>CB of Suncrest | Please specify the <&color[#6fa8dc]>bank owner's name and <&color[#6fa8dc]>legal entity's name." - else: - if = 3: - narrate "<&color[#3d85c6]>CB of Suncrest | Please specify the <&color[#6fa8dc]>legal entity's name." - else: - if = 4: - define playerName - define playerToRegister ].if_null[null]> - if <[playerToRegister]> == null: - narrate "<&color[#3d85c6]>CB of Suncrest | Can't find player by the name '<&color[#6C9808]><[playerName]>'!" - stop - foreach as:obj: - if <[playerName]> == <[obj].get[2]>: - narrate "<&color[#3d85c6]>CB of Suncrest | <&color[#6C9808]><[playerName]> Already owns a bank." - stop - narrate "<&m>----<&color[#3d85c6]> Central Bank of Suncrest <&m>----" - narrate "| Bank Name: <&color[#6C9808]>" - narrate "| Owner's Username: <&color[#6C9808]><[playerName]>" - narrate "| Legal Entity: <&color[#6C9808]>" - narrate "<&m>-----------------------------------" - playsound sound:BLOCK_ANVIL_USE pitch:5 - flag server bankscreated:++ - flag server bankname: - flag server bankowner:<[playerName]> - flag server legalentity: - flag server bankssaveddata:->:||]> - else: - if > 4: - narrate "<&color[#3d85c6]>CB of Suncrest | Too many arguments provided!" - case delete: - if !: - narrate "<&color[#3d85c6]>CB of Suncrest | You do not have permission to do that!" - stop - if = 1: - narrate "<&color[#3d85c6]>CB of Suncrest | Please specify a name for the <&color[#6fa8dc]>bank, the <&color[#6fa8dc]>bank owner's name, and, the <&color[#6fa8dc]>legal entity's name." - else: - if = 2: - narrate "<&color[#3d85c6]>CB of Suncrest | Please specify the <&color[#6fa8dc]>bank owner's name and <&color[#6fa8dc]>legal entity's name." - else: - if = 3: - narrate "<&color[#3d85c6]>CB of Suncrest | Please specify the <&color[#6fa8dc]>legal entity's name." - else: - if = 4: - define playerName - define playerToRegister ].if_null[null]> - if <[playerToRegister]> == null: - narrate "<&color[#3d85c6]>CB of Suncrest | Can't find player by name '<&color[#6C9808]><[playerName]>'!" - stop - playsound sound:BLOCK_ANVIL_USE pitch:5 - flag server bankscreated:-- - flag server bankname: - flag server bankowner:<[playerName]> - flag server legalentity: - flag server bankssaveddata:<-:||]> - narrate "<&color[#3d85c6]>CB of Suncrest | Bank deleted, all clients refunded!" - else: - if > 4: - narrate "<&color[#3d85c6]>CB of Suncrest | Too many arguments provided!" - case help: - if !: - narrate "<&color[#3d85c6]>CB of Suncrest | You do not have permission to do that!" - stop - if = 1: - narrate "<&m>--------<&color[#3d85c6]> Central Bank of Suncrest <&m>--------" - narrate "<&color[#6fa8dc]>/bank - Displays this message." - narrate "<&color[#6fa8dc]>/bank list - Lists all banks of Suncrest." - narrate "<&color[#6fa8dc]>/bank create <&color[#3d85c6]>{bank name} {bank owner} {legal entity} - Create a bank." - narrate "<&color[#6fa8dc]>/bank delete <&color[#3d85c6]>{bank name} {bank owner} {legal entity} - Deletes the bank and refunds all clients." - narrate "<&m>--------------------------------------" - narrate "Scripted with 🖤 by SpaceSlayer_" - narrate "<&m>--------------------------------------" - else: - if > 1: - narrate "<&color[#3d85c6]>CB of Suncrest | Too many arguments provided!" - default: - execute as_player "bank help"