options: prefix: &8[&6Regions&8] prefixErr: &8[&cRegions&8] condition flag %string% in %string% is %string%: check: if {Regions::%expression-2%} is set: loop {Regions::Flag::%expression-2%::*}: if loop-index is expression-1: if expression-3 is "deny": continue if {Regions::Flag::%expression-2%::%loop-index%} is "%expression-3%" or "false": continue if expression-3 is "allow": continue if {Regions::Flag::%expression-2%::%loop-index%} is "%expression-3%" or "true": continue expression region of %player%: get: loop blocks in radius 2 around expression-1: loop {Regions::*}: if {Regions::Location::%loop-value-2%::%location of loop-block%} is set: if loop-value-2 is not "": return loop-value-2 else: return "Wildrness" else: return "Wildrness" expression region of block %location%: get: loop {Regions::*}: if {Regions::Location::%loop-value%::%expression-1%} is set: if loop-value-2 is not "": return loop-value-2 else: return "Wildrness" else: return "Wildrness" expression region %string% corner number 1: get: return {Regions::Pos1::%expression-1%} expression region %string% corner number 2: get: return {Regions::Pos2::%expression-1%} command region [] [] [] []: aliases: regions trigger: if arg 1 is "create": if {Regions::%arg 2%} is not set: set {Regions::%arg 2%} to arg 2 send "{@prefix} Region &6%{Regions::%arg 2%}%&8 created!" if arg 1 is "wand": if {Regions::%arg 2%} is set: give player stick named "&aWand For %{Regions::%arg 2%}%" send "{@prefix} Region &6%{Regions::%arg 2%}%'s&8 wand has been given to you!" else: send "{@prefixErr} Region &c%arg 2%&8 doesn't exist!" if arg 1 is "setupregion" or "regionsetup" or "setup" or "save" or "saveregion" or "regionsave": if {Regions::%arg 2%} is set: if {Regions::Pos1::%arg 2%::TEMP} is set: if {Regions::Pos2::%arg 2%::TEMP} is set: if arg 3 is not set: send "{@prefix} Running Checks..." set {Regions::Pos1::%arg 2%} to {Regions::Pos1::%arg 2%::TEMP} set {Regions::Pos2::%arg 2%} to {Regions::Pos2::%arg 2%::TEMP} set {_amountofblocks} to amount of blocks in {Regions::Pos1::%arg 2%} and {Regions::Pos2::%arg 2%} if {_amountofblocks} is bigger than or equal to 250: send "{@prefix} Making proccess slower! &6(There is: &e%{_amountofblocks}% blocks&6!)" else: send "{@prefix} Continuing with normal proccess &6(&eThere is: &e%{_amountofblocks}% blocks&6!)" loop all blocks within {Regions::Pos1::%arg 2%} and {Regions::Pos2::%arg 2%}: if {_amountofblocks} is bigger than or equal to 250: wait 1 tick set {Regions::Location::%arg 2%::%location of loop-block%} to location of loop-block set {Regions::RegionAt::%location of loop-block%} to arg 2 send "{@prefix} Finished!" else if arg 3 is "-utd": set {_amountofblocks} to amount of blocks in {Regions::Pos1::%arg 2%} and {Regions::Pos2::%arg 2%} set y coord of {Regions::Pos1::%arg 2%} to 255 set y coord of {Regions::Pos2::%arg 2%} to 0 send "{@prefix} Making proccess slower! &6(There is: &e%{_amountofblocks}% blocks&6!)" set {_time} to {_amountofblocks} / 0.2 if {_time} is bigger than 60: send "{@prefix} Time to finish: %{_time} / 60% minutes (Not Exactly)" else if {_time} is smaller than or equal to 60: send "{@prefix} Time to finish: %{_time}% seconds" loop all blocks within {Regions::Pos1::%arg 2%} and {Regions::Pos2::%arg 2%}: wait 2 tick set {Regions::Location::%arg 2%::%location of loop-block%} to location of loop-block set {Regions::RegionAt::%location of loop-block%} to arg 2 send "{@prefix} Finished!" else: send "{@prefixErr} Position 2 aren't set!" else: send "{@prefixErr} Position 1 aren't set!" else: send "{@prefixErr} Region &c%arg 2%&8 doesn't exist!" if arg 1 is "flags" or "flag": if {Regions::%arg 2%} is set: if arg 4 is set: if arg 4 is "true" or "false" or "allow" or "deny": set {Regions::Flag::%arg 2%::%arg 3%} to arg 4 send "{@prefix} The flag &6%arg 3%&8 state is: &6%arg 4%&8 in region: &6%arg 2%" else: send "{@prefixErr} You must put &c([true/false] or [allow/deny])" else: send "{@prefixErr} You must put &c([true/false] or [allow/deny])" else: send "{@prefixErr} Region &c%arg 2%&8 doesn't exist!" if arg 1 is "saveinventory" or "inventory": if {Regions::%arg 2%} is set: set {_slot} to 0 loop 36 times: set {Regions::Inventory::%arg 2%::%{_slot}%} to slot {_slot} of player add 1 to {_slot} set {Regions::Inventory::%arg 2%::Helmet} to helmet of player set {Regions::Inventory::%arg 2%::Chestplate} to chestplate of player set {Regions::Inventory::%arg 2%::Leggings} to leggings of player set {Regions::Inventory::%arg 2%::Boots} to boots of player set {Regions::HasInventory::%arg 2%} to true send "{@prefix} Region &6%arg 2%&8 inventory saved!" else: send "{@prefixErr} Region &c%arg 2%&8 doesn't exist!" # EXAMPLE FLAG # on place: if {Regions::%region of player%} is set: loop {Regions::Flag::%region of player%::*}: if loop-index is "place": if {Regions::Flag::%region of player%::%loop-index%} is "deny" or "false": cancel event on break: if {Regions::%region of player%} is set: loop {Regions::Flag::%region of player%::*}: if loop-index is "break": if {Regions::Flag::%region of player%::%loop-index%} is "deny" or "false": cancel event on damage: if {Regions::%region of victim%} is set: loop {Regions::Flag::%region of victim%::*}: if loop-index is "damage": if {Regions::Flag::%region of victim%::%loop-index%} is "deny" or "false": cancel event # END OF EXAMPLE FLAG # # REGION ENTER, REGION EXIT # every 0.8 seconds: if amount of all players is not 0: loop all players: set {_oldregion} to region of loop-player wait 0.8 seconds set {Regions::Delay::%loop-player%} to true if region of loop-player != {_oldregion}: if region of loop-player is set: if {_oldregion} is not "": send "{@prefix} Exiting region: &6%{_oldregion}%" to loop-player if {Regions::IsinRegionWithInventory::%loop-player%} is true: clear {Regions::IsinRegionWithInventory::%loop-player%} set {_slot} to 0 loop 36 times: set slot {_slot} of loop-player to {Regions::Inventory::%loop-player%::%{_slot}%} add 1 to {_slot} set helmet of loop-player to {Regions::Inventory::%loop-player%::Helmet} set chestplate of loop-player to {Regions::Inventory::%loop-player%::Chestplate} set leggings of loop-player to {Regions::Inventory::%loop-player%::Leggings} set boots of loop-player to {Regions::Inventory::%loop-player%::Boots} send "{@prefix} Gived back your inventory!" to loop-player if region of loop-player is not "": send "{@prefix} Entering region: &6%region of loop-player%" to loop-player send loop-player title "&8Entering Region" with subtitle "&6%region of loop-player%" for 1.5 seconds if {Regions::HasInventory::%region of loop-player%} is true: send "{@prefix} Giving you inventory of region &6%region of loop-player%" to loop-player set {Regions::IsinRegionWithInventory::%loop-player%} to true set {_slot} to 0 loop 36 times: set {Regions::Inventory::%loop-player%::%{_slot}%} to slot {_slot} of loop-player add 1 to {_slot} set {Regions::Inventory::%loop-player%::Helmet} to helmet of loop-player set {Regions::Inventory::%loop-player%::Chestplate} to chestplate of loop-player set {Regions::Inventory::%loop-player%::Leggings} to leggings of loop-player set {Regions::Inventory::%loop-player%::Boots} to boots of loop-player clear loop-player's inventory set {_slotV2} to 0 loop 36 times: set slot {_slotV2} of loop-player to {Regions::Inventory::%region of loop-player%::%{_slotV2}%} add 1 to {_slotV2} set helmet of loop-player to {Regions::Inventory::%region of loop-player%::Helmet} set chestplate of loop-player to {Regions::Inventory::%region of loop-player%::Chestplate} set leggings of loop-player to {Regions::Inventory::%region of loop-player%::Leggings} set boots of loop-player to {Regions::Inventory::%region of loop-player%::Boots} stop trigger else: send "{@prefix} Entering Wildrness" to loop-player else: send "{@prefix} Exiting Wildness" to loop-player send "{@prefix} Entering region: &6%region of loop-player%" to loop-player send loop-player title "&8Entering Region" with subtitle "&6%region of loop-player%" for 1.5 second if {Regions::HasInventory::%region of loop-player%} is true: send "{@prefix} Giving you inventory of region &6%region of loop-player%" to loop-player set {Regions::IsinRegionWithInventory::%loop-player%} to true set {_slot} to 0 loop 36 times: set {Regions::Inventory::%loop-player%::%{_slot}%} to slot {_slot} of loop-player add 1 to {_slot} set {Regions::Inventory::%loop-player%::Helmet} to helmet of loop-player set {Regions::Inventory::%loop-player%::Chestplate} to chestplate of loop-player set {Regions::Inventory::%loop-player%::Leggings} to leggings of loop-player set {Regions::Inventory::%loop-player%::Boots} to boots of loop-player clear loop-player's inventory set {_slotV2} to 0 loop 36 times: set slot {_slotV2} of loop-player to {Regions::Inventory::%region of loop-player%::%{_slotV2}%} add 1 to {_slotV2} set helmet of loop-player to {Regions::Inventory::%region of loop-player%::Helmet} set chestplate of loop-player to {Regions::Inventory::%region of loop-player%::Chestplate} set leggings of loop-player to {Regions::Inventory::%region of loop-player%::Leggings} set boots of loop-player to {Regions::Inventory::%region of loop-player%::Boots} clear {inWamd::%loop-player%} stop else: if {inWamd::%loop-player%} is true: stop trigger if {inWamd::%loop-player%} is not set: set {inWamd::%loop-player%} to true send "{@prefix} Entering Wildness" to loop-player if {Regions::IsinRegionWithInventory::%loop-player%} is true: clear {Regions::IsinRegionWithInventory::%loop-player%} set {_slot} to 0 loop 36 times: set slot {_slot} of loop-player to {Regions::Inventory::%loop-player%::%{_slot}%} add 1 to {_slot} set helmet of loop-player to {Regions::Inventory::%loop-player%::Helmet} set chestplate of loop-player to {Regions::Inventory::%loop-player%::Chestplate} set leggings of loop-player to {Regions::Inventory::%loop-player%::Leggings} set boots of loop-player to {Regions::Inventory::%loop-player%::Boots} send "{@prefix} Gived back your inventory!" to loop-player stop trigger # END OF REGION ENTER, REGION EXIT # on left click: if name of player's held item contains "&aWand For": cancel event set {_name} to name of player's held item replace all "&aWand For " in {_name} with "" set {Regions::Pos1::%{_name}%::TEMP} to location of clicked block send "{@prefix} Sucessfully set the location of &6Position 1" on right click: if name of player's held item contains "&aWand For": cancel event set {_name} to name of player's held item replace all "&aWand For " in {_name} with "" set {Regions::Pos2::%{_name}%::TEMP} to location of clicked block send "{@prefix} Sucessfully set the location of &6Position 2"