Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function addVaultIcon(p: player, icon: text):
- add {_icon} to {vaulticons::*}
- function removeVaultIcon(p: player, icon: text):
- remove {_icon} from {vaulticons::*}
- command /addvaultitem [<text>]:
- trigger:
- addVaultIcon(player, arg 1)
- command /removevaultitem [<text>]:
- trigger:
- removeVaultIcon(player, arg 1)
- function openVault(p: player, number: number):
- open virtual chest inventory with size 6 named "Vault Inventory ##%{_number}%" to {_p}
- format a gui slot 45 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 46 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 47 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 48 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 49 of {_p} with gray dye named "&cGo back" to run function vaultList({_p})
- format a gui slot 50 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 51 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 52 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 53 of {_p} with black stained glass pane named "&7" to do nothing
- wait 1 tick
- set {_num} to 0
- loop {vaults::%{_number}%::%{_p}%::*}:
- set slot {_num} of {_p}'s current inventory to loop-value
- add 1 to {_num}
- function renameVault(p: player, number: number):
- set {vaulrenaming::%{_p}%} to {_number}
- if {renamechat::%{_p}%} is not set:
- close {_p}'s inventory
- set {renamechat::%{_p}%} to true
- play skellett sound "ENTITY_EXPERIENCE_ORB_PICKUP" for {_p} with volume 1 with pitch 1
- message centered "" and "&6&lVault Renaming" and "" and " &fYou are currently in the process of renaming your vault" and " &fto enter a name &etype &fin chat, or type &ccancel &fto cancel" and "" to {_p}
- function changeVaultIcon(p: player, number: number):
- open virtual chest inventory with size 6 named "Vault Icon ##%{_number}%" to {_p}
- format a gui slot 0 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 1 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 2 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 3 of {_p} with black stained glass pane named "&7" to do nothing
- if {vaulticon::%{_p}%::%{_number}%} is not set:
- format a gui slot 4 of {_p} with chest named "&fChest" to do nothing
- else if {vaulticon::%{_p}%::%{_number}%} is set:
- format a gui slot 4 of {_p} with {vaulticon::%{_p}%::%{_number}%} named "&f%{vaulticon::%{_p}%::%{_number}%}%" to do nothing
- format a gui slot 5 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 6 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 7 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 8 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 45 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 46 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 47 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 48 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 49 of {_p} with gray dye named "&cGo back" to run function vaultList({_p})
- format a gui slot 50 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 51 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 52 of {_p} with black stained glass pane named "&7" to do nothing
- format a gui slot 53 of {_p} with black stained glass pane named "&7" to do nothing
- set {_i} to 9
- loop {vaulticons::*}:
- set {_itemtype} to "%loop-value%" parsed as item
- format a gui slot {_i} of {_p} with {_itemtype} named "&e%loop-value%" to run:
- set {vaulticon::%{_p}%::%{_number}%} to {_itemtype}
- set slot 4 of player's current inventory to {_itemtype}
- add 1 to {_i}
- function vaultList(p: player):
- open virtual chest inventory with size 3 named "Select a vault" to {_p}
- set {_i} to 10
- set {_number} to 1
- loop 7 times:
- if {vaultname::%{_p}%::%{_number}%} is not set:
- set {vaultname::%{_p}%::%{_number}%} to "&6&lVault"
- if {vaulticon::%{_p}%::%{_number}%} is not set:
- format a gui slot {_i} of {_p} with chest named "%{vaultname::%{_p}%::%{_number}%}% &6##%{_number}%" with lore "" and "&fContains &a&l%amount of {vaults::%{_number}%::%{_p}%::*}% &fslot(s)" and "" and "&fLeft-Click to &e&lOPEN" and "&fRight-Click to &e&lCHANGE ICON" and "&fMiddle-Click to &e&lCHANGE NAME" to run function openVault({_p}, {_number}) with "left" click
- else if {vaulticon::%{_p}%::%{_number}%} is set:
- format a gui slot {_i} of {_p} with {vaulticon::%{_p}%::%{_number}%} named "%{vaultname::%{_p}%::%{_number}%}% &6##%{_number}%" with lore "" and "&fContains &a&l%amount of {vaults::%{_number}%::%{_p}%::*}% &fslot(s)" and "" and "&fLeft-Click to &e&lOPEN" and "&fRight-Click to &e&lCHANGE ICON" and "&fMiddle-Click to &e&lCHANGE NAME" to run function openVault({_p}, {_number}) with "left" click
- if {vaulticon::%{_p}%::%{_number}%} is not set:
- format a gui slot {_i} of {_p} with chest named "%{vaultname::%{_p}%::%{_number}%}% &6##%{_number}%" with lore "" and "&fContains &a&l%amount of {vaults::%{_number}%::%{_p}%::*}% &fslot(s)" and "" and "&fLeft-Click to &e&lOPEN" and "&fRight-Click to &e&lCHANGE ICON" and "&fMiddle-Click to &e&lCHANGE NAME" to run function changeVaultIcon({_p}, {_number}) with "right" click
- else if {vaulticon::%{_p}%::%{_number}%} is set:
- format a gui slot {_i} of {_p} with {vaulticon::%{_p}%::%{_number}%} named "%{vaultname::%{_p}%::%{_number}%}% &6##%{_number}%" with lore "" and "&fContains &a&l%amount of {vaults::%{_number}%::%{_p}%::*}% &fslot(s)" and "" and "&fLeft-Click to &e&lOPEN" and "&fRight-Click to &e&lCHANGE ICON" and "&fMiddle-Click to &e&lCHANGE NAME" to run function changeVaultIcon({_p}, {_number}) with "right" click
- if {vaulticon::%{_p}%::%{_number}%} is not set:
- format a gui slot {_i} of {_p} with chest named "%{vaultname::%{_p}%::%{_number}%}% &6##%{_number}%" with lore "" and "&fContains &a&l%amount of {vaults::%{_number}%::%{_p}%::*}% &fslot(s)" and "" and "&fLeft-Click to &e&lOPEN" and "&fRight-Click to &e&lCHANGE ICON" and "&fMiddle-Click to &e&lCHANGE NAME" to run function renameVault({_p}, {_number}) with "middle" click
- else if {vaulticon::%{_p}%::%{_number}%} is set:
- format a gui slot {_i} of {_p} with {vaulticon::%{_p}%::%{_number}%} named "%{vaultname::%{_p}%::%{_number}%}% &6##%{_number}%" with lore "" and "&fContains &a&l%amount of {vaults::%{_number}%::%{_p}%::*}% &fslot(s)" and "" and "&fLeft-Click to &e&lOPEN" and "&fRight-Click to &e&lCHANGE ICON" and "&fMiddle-Click to &e&lCHANGE NAME" to run function renameVault({_p}, {_number}) with "middle" click
- add 1 to {_number}
- add 1 to {_i}
- on inventory close:
- if inventory name of player's current inventory contains "Vault ##1":
- loop 44 times:
- set {vaults::1::%player%::%loop-number - 1%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
- wait 2 ticks
- else if inventory name of player's current inventory contains "Vault ##2":
- loop 44 times:
- set {vaults::2::%player%::%loop-number - 1%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
- wait 2 ticks
- else if inventory name of player's current inventory contains "Vault ##3":
- loop 44 times:
- set {vaults::3::%player%::%loop-number - 1%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
- wait 2 ticks
- else if inventory name of player's current inventory contains "Vault ##4":
- loop 44 times:
- set {vaults::4::%player%::%loop-number - 1%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
- wait 2 ticks
- else if inventory name of player's current inventory contains "Vault ##5":
- loop 44 times:
- set {vaults::5::%player%::%loop-number - 1%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
- wait 2 ticks
- else if inventory name of player's current inventory contains "Vault ##6":
- loop 44 times:
- set {vaults::6::%player%::%loop-number - 1%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
- wait 2 ticks
- else if inventory name of player's current inventory contains "Vault ##7":
- loop 44 times:
- set {vaults::7::%player%::%loop-number - 1%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
- wait 2 ticks
- command /vault [<number>]:
- trigger:
- if arg 1 is not set:
- vaultList(player)
- command /addblacklist [<text>]:
- permission: add.words
- trigger:
- if arg 1 is set:
- if {blacklistwords::*} does not contain arg 1:
- add arg 1 to {blacklistwords::*}
- send "&fAdded word %arg 1%" to player
- else:
- send "&cWord already added" to player
- else if arg 1 is not set:
- send "&c/addblacklist <word>" to player
- command /listblacklist:
- permission: add.words
- trigger:
- send "%{blacklistwords::*}%" to player
Add Comment
Please, Sign In to add comment