Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Actual cells skript for PickLocked by gamie0412#4763
- #=================================================================================================
- every hour:
- if {timeleft-b-1} is higher than 0:
- remove 1 from {timeleft-b-1}
- if {timeleft-b-1} is less than 1:
- set {_member} to first element out of all members of region "b-2"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-2 %all members of region ""b-2""%"
- set {b_2-claimed} to false
- if {timeleft-b-2} is higher than 0:
- remove 1 from {timeleft-b-2}
- if {timeleft-b-2} is less than 1:
- set {_member} to first element out of all members of region "b-2"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-2 %all members of region ""b-2""%"
- set {b_2-claimed} to false
- if {timeleft-b-3} is higher than 0:
- remove 1 from {timeleft-b-3}
- if {timeleft-b-3} is less than 1:
- set {_member} to first element out of all members of region "b-3"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-3 %all members of region ""b-3""%"
- set {b_3-claimed} to false
- if {timeleft-b-4} is higher than 0:
- remove 1 from {timeleft-b-4}
- if {timeleft-b-4} is less than 1:
- set {_member} to first element out of all members of region "b-4"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-4 %all members of region ""b-4""%"
- set {b_4-claimed} to false
- if {timeleft-b-5} is higher than 0:
- remove 1 from {timeleft-b-5}
- if {timeleft-b-5} is less than 1:
- set {_member} to first element out of all members of region "b-5"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-5 %all members of region ""b-5""%"
- set {b_5-claimed} to false
- if {timeleft-b-6} is higher than 0:
- remove 1 from {timeleft-b-6}
- if {timeleft-b-6} is less than 1:
- set {_member} to first element out of all members of region "b-6"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-6 %all members of region ""b-6""%"
- set {b_6-claimed} to false
- if {timeleft-b-7} is higher than 0:
- remove 1 from {timeleft-b-7}
- if {timeleft-b-7} is less than 1:
- set {_member} to first element out of all members of region "b-7"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-7 %all members of region ""b-7""%"
- set {b_7-claimed} to false
- if {timeleft-b-8} is higher than 0:
- remove 1 from {timeleft-b-8}
- if {timeleft-b-8} is less than 1:
- set {_member} to first element out of all members of region "b-8"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-8 %all members of region ""b-8""%"
- set {b_8-claimed} to false
- if {timeleft-b-9} is higher than 0:
- remove 1 from {timeleft-b-9}
- if {timeleft-b-9} is less than 1:
- set {_member} to first element out of all members of region "b-9"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-9 %all members of region ""b-9""%"
- set {b_9-claimed} to false
- if {timeleft-b-10} is higher than 0:
- remove 1 from {timeleft-b-10}
- if {timeleft-b-10} is less than 1:
- set {_member} to first element out of all members of region "b-10"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-10 %all members of region ""b-10""%"
- set {b_10-claimed} to false
- if {timeleft-b-11} is higher than 0:
- remove 1 from {timeleft-b-11}
- if {timeleft-b-11} is less than 1:
- set {_member} to first element out of all members of region "b-11"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-11 %all members of region ""b-11""%"
- set {b_11-claimed} to false
- if {timeleft-b-12} is higher than 0:
- remove 1 from {timeleft-b-12}
- if {timeleft-b-12} is less than 1:
- set {_member} to first element out of all members of region "b-12"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-12 %all members of region ""b-12""%"
- set {b_12-claimed} to false
- if {timeleft-b-13} is higher than 0:
- remove 1 from {timeleft-b-13}
- if {timeleft-b-13} is less than 1:
- set {_member} to first element out of all members of region "b-13"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-13 %all members of region ""b-13""%"
- set {b_13-claimed} to false
- if {timeleft-b-14} is higher than 0:
- remove 1 from {timeleft-b-14}
- if {timeleft-b-14} is less than 1:
- set {_member} to first element out of all members of region "b-14"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-14 %all members of region ""b-14""%"
- set {b_14-claimed} to false
- if {timeleft-b-15} is higher than 0:
- remove 1 from {timeleft-b-15}
- if {timeleft-b-15} is less than 1:
- set {_member} to first element out of all members of region "b-15"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-15 %all members of region ""b-15""%"
- set {b_15-claimed} to false
- if {timeleft-b-16} is higher than 0:
- remove 1 from {timeleft-b-16}
- if {timeleft-b-16} is less than 1:
- set {_member} to first element out of all members of region "b-16"
- set {cells::%{uuid::%%{_member}%%}%} to 0
- wait 3 ticks
- execute console command "rg removemember -w ul_PickLocked b-16 %all members of region ""b-16""%"
- set {b_16-claimed} to false
- command /test:
- trigger:
- set {timeleft-b-16} to 2
- command /hi:
- trigger:
- set {cells::%{uuid::%%player%%}%} to 0
- on join:
- set {uuid::%player%} to player's uuid
- #=================================================================================================
- command /claimed:
- permission: cells.start
- trigger:
- set {b_6-claimed} to false
- set {b_7-claimed} to false
- set {b_8-claimed} to false
- set {b_9-claimed} to false
- set {b_10-claimed} to false
- set {b_11-claimed} to false
- set {b_12-claimed} to false
- set {b_13-claimed} to false
- set {b_14-claimed} to false
- set {b_15-claimed} to false
- set {b_16-claimed} to false
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_1":
- if {b_1-claimed} is true:
- if player is member of region "b-1":
- open virtual chest inventory with size 3 named "&cCell b-1" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-1} to 0
- set {b_1-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-1"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-1}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-1}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-1}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_1":
- if {b_1-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-1" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-1"
- execute console command "rg addmember -w ul_PickLocked b-1 %player%"
- add 24 to {timeleft-b-1}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_1-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is higher than 0:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_1-claimed} is true:
- if player is member of region "b-1":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-1":
- open virtual chest inventory with size 3 named "&cCell b-1" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-1""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-1}%hours left"
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_2":
- if {b_2-claimed} is true:
- if player is member of region "b-2":
- open virtual chest inventory with size 3 named "&cCell b-2" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-2} to 0
- set {b_2-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-2"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-2}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-2}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-2}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_2":
- if {b_2-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-2" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-2"
- execute console command "rg addmember -w ul_PickLocked b-2 %player%"
- add 24 to {timeleft-b-2}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_2-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is 1:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_2-claimed} is true:
- if player is member of region "b-2":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-2":
- open virtual chest inventory with size 3 named "&cCell b-2" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-2""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-2}%hours left"
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_3":
- if {b_3-claimed} is true:
- if player is member of region "b-3":
- open virtual chest inventory with size 3 named "&cCell b-3" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-3} to 0
- set {b_3-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-3"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-3}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-3}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-3}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_3":
- if {b_3-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-3" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-3"
- execute console command "rg addmember -w ul_PickLocked b-3 %player%"
- add 24 to {timeleft-b-3}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_3-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is 1:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_3-claimed} is true:
- if player is member of region "b-3":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-3":
- open virtual chest inventory with size 3 named "&cCell b-3" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-3""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-3}%hours left"
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_4":
- if {b_4-claimed} is true:
- if player is member of region "b-4":
- open virtual chest inventory with size 3 named "&cCell b-4" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-4} to 0
- set {b_4-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-4"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-4}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-4}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-4}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_4":
- if {b_4-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-4" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-4"
- execute console command "rg addmember -w ul_PickLocked b-4 %player%"
- add 24 to {timeleft-b-4}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_4-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is 1:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_4-claimed} is true:
- if player is member of region "b-4":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-4":
- open virtual chest inventory with size 3 named "&cCell b-4" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-4""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-4}%hours left"
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_5":
- if {b_5-claimed} is true:
- if player is member of region "b-5":
- open virtual chest inventory with size 3 named "&cCell b-5" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-5} to 0
- set {b_5-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-5"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-5}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-5}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-5}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_5":
- if {b_5-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-5" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-5"
- execute console command "rg addmember -w ul_PickLocked b-5 %player%"
- add 24 to {timeleft-b-5}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_5-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is 1:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_5-claimed} is true:
- if player is member of region "b-5":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-5":
- open virtual chest inventory with size 3 named "&cCell b-5" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-5""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-5}%hours left"
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_6":
- if {b_6-claimed} is true:
- if player is member of region "b-6":
- open virtual chest inventory with size 3 named "&cCell b-6" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-6} to 0
- set {b_6-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-6"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-6}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-6}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-6}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_6":
- if {b_6-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-6" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-6"
- execute console command "rg addmember -w ul_PickLocked b-6 %player%"
- add 24 to {timeleft-b-6}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_6-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is 1:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_6-claimed} is true:
- if player is member of region "b-6":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-6":
- open virtual chest inventory with size 3 named "&cCell b-6" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-6""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-6}%hours left"
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_7":
- if {b_7-claimed} is true:
- if player is member of region "b-7":
- open virtual chest inventory with size 3 named "&cCell b-7" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-7} to 0
- set {b_7-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-7"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-7}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-7}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-7}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_7":
- if {b_7-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-7" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-7"
- execute console command "rg addmember -w ul_PickLocked b-7 %player%"
- add 24 to {timeleft-b-7}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_7-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is 1:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_7-claimed} is true:
- if player is member of region "b-7":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-7":
- open virtual chest inventory with size 3 named "&cCell b-7" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-7""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-7}%hours left"
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_8":
- if {b_8-claimed} is true:
- if player is member of region "b-8":
- open virtual chest inventory with size 3 named "&cCell b-8" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-8} to 0
- set {b_8-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-8"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-8}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-8}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-8}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_8":
- if {b_8-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-8" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-8"
- execute console command "rg addmember -w ul_PickLocked b-8 %player%"
- add 24 to {timeleft-b-8}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_8-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is 1:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_8-claimed} is true:
- if player is member of region "b-8":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-8":
- open virtual chest inventory with size 3 named "&cCell b-8" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-8""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-8}%hours left"
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_9":
- if {b_9-claimed} is true:
- if player is member of region "b-9":
- open virtual chest inventory with size 3 named "&cCell b-9" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-9} to 0
- set {b_9-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-9"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-9}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-9}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-9}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_9":
- if {b_9-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-9" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-9"
- execute console command "rg addmember -w ul_PickLocked b-9 %player%"
- add 24 to {timeleft-b-9}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_9-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is 1:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_9-claimed} is true:
- if player is member of region "b-9":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-9":
- open virtual chest inventory with size 3 named "&cCell b-9" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-9""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-9}%hours left"
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_10":
- if {b_10-claimed} is true:
- if player is member of region "b-10":
- open virtual chest inventory with size 3 named "&cCell b-10" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-10} to 0
- set {b_10-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-10"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-10}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-10}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-10}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_10":
- if {b_10-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-10" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-10"
- execute console command "rg addmember -w ul_PickLocked b-10 %player%"
- add 24 to {timeleft-b-10}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_10-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is 1:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_10-claimed} is true:
- if player is member of region "b-10":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-10":
- open virtual chest inventory with size 3 named "&cCell b-10" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-10""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-10}%hours left"
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_11":
- if {b_11-claimed} is true:
- if player is member of region "b-11":
- open virtual chest inventory with size 3 named "&cCell b-11" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-11} to 0
- set {b_11-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-11"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-11}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-11}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-11}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_11":
- if {b_11-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-11" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-11"
- execute console command "rg addmember -w ul_PickLocked b-11 %player%"
- add 24 to {timeleft-b-11}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_11-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is 1:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_11-claimed} is true:
- if player is member of region "b-11":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-11":
- open virtual chest inventory with size 3 named "&cCell b-11" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-11""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-11}%hours left"
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_12":
- if {b_12-claimed} is true:
- if player is member of region "b-12":
- open virtual chest inventory with size 3 named "&cCell b-12" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-12} to 0
- set {b_12-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-12"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-12}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-12}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-12}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_12":
- if {b_12-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-12" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-12"
- execute console command "rg addmember -w ul_PickLocked b-12 %player%"
- add 24 to {timeleft-b-12}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_12-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is 1:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_12-claimed} is true:
- if player is member of region "b-12":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-12":
- open virtual chest inventory with size 3 named "&cCell b-12" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-12""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-12}%hours left"
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_13":
- if {b_13-claimed} is true:
- if player is member of region "b-13":
- open virtual chest inventory with size 3 named "&cCell b-13" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-13} to 0
- set {b_13-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-13"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-13}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-13}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-13}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_13":
- if {b_13-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-13" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-13"
- execute console command "rg addmember -w ul_PickLocked b-13 %player%"
- add 24 to {timeleft-b-13}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_13-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is 1:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_13-claimed} is true:
- if player is member of region "b-13":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-13":
- open virtual chest inventory with size 3 named "&cCell b-13" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-13""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-13}%hours left"
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_14":
- if {b_14-claimed} is true:
- if player is member of region "b-14":
- open virtual chest inventory with size 3 named "&cCell b-14" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-14} to 0
- set {b_14-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-14"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-14}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-14}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-14}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_14":
- if {b_14-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-14" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-14"
- execute console command "rg addmember -w ul_PickLocked b-14 %player%"
- add 24 to {timeleft-b-14}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_14-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is 1:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_14-claimed} is true:
- if player is member of region "b-14":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-14":
- open virtual chest inventory with size 3 named "&cCell b-14" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-14""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-14}%hours left"
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_15":
- if {b_15-claimed} is true:
- if player is member of region "b-15":
- open virtual chest inventory with size 3 named "&cCell b-15" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-15} to 0
- set {b_15-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-15"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-15}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-15}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-15}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_15":
- if {b_15-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-15" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-15"
- execute console command "rg addmember -w ul_PickLocked b-15 %player%"
- add 24 to {timeleft-b-15}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_15-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is 1:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_15-claimed} is true:
- if player is member of region "b-15":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-15":
- open virtual chest inventory with size 3 named "&cCell b-15" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-15""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-15}%hours left"
- #=================================================================================================
- on leftclick on iron door:
- if event-block is in region "b_16":
- if {b_16-claimed} is true:
- if player is member of region "b-16":
- open virtual chest inventory with size 3 named "&cCell b-16" to player
- format gui slot 18 of player with barrier named "&cUnrent cell" with lore "&7Click to unrent your cell!" and "&7Warning: you won't get any money back" and "&7when unrenting your cell" to run:
- open virtual chest inventory with size 3 named "&c&lAre you sure?" to player
- format gui slot 11 of player with green wool named "&cUnrent cell" with lore "&7Warning: this can not be undone!" to run:
- set {timeleft-b-16} to 0
- set {b_16-claimed} to false
- execute console command "rg removemember -w ul_PickLocked -a b-16"
- set {cells::%{uuid::%%player%%}%} to 0
- message "&6&lCELLS &8» &7You just unrented your cell"
- close player's inventory
- play sound "minecraft:block.anvil.land" with volume 5 to player
- format gui slot 15 of player with red wool named "&cDon't unrent cell" with lore "&7Nevermind, don't unrent my cell" to run:
- close player's inventory
- format gui slot 13 of player with paper named "&a%{timeleft-b-16}% hours left" with lore "&7Click to extend your time by" and "&724 hours for &c$150" to run:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- add 24 to {timeleft-b-16}
- wait 3 ticks
- message "&6&lCELLS &8» &7You have extended your cell time by 24 hours, you now have &a%{timeleft-b-16}%&7 hours left"
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to do this"
- on rightclick on iron door:
- if event-block is in region "b_16":
- if {b_16-claimed} is false:
- open virtual chest inventory with size 3 named "&cCell b-16" to player
- format gui slot 13 of player with iron door named "&aCell available for rent" with lore "&8This cell is available for rent" and "&7Click to buy for" and "&7$150 each 24h" to run:
- if {cells::%{uuid::%%player%%}%} is 0:
- if balance of player is higher than or equal to 150:
- remove 150 from player's balance
- message "&6&lCELLS &8» &7You just bought cell b-16"
- execute console command "rg addmember -w ul_PickLocked b-16 %player%"
- add 24 to {timeleft-b-16}
- add 1 to {cells::%{uuid::%%player%%}%}
- set {b_16-claimed} to true
- close player's inventory
- stop
- if balance of player is less than 150:
- message "&6&lCELLS &8» &7You don't have enough money to buy this cell"
- stop
- if {cells::%{uuid::%%player%%}%} is 1:
- message "&6&lCELLS &8» &7You can only have 1 cell at the same time!"
- stop
- if {b_16-claimed} is true:
- if player is member of region "b-16":
- toggle event-block
- play sound "minecraft:block.iron_door.close" with volume 10 to player
- if player is not member of region "b-16":
- open virtual chest inventory with size 3 named "&cCell b-16" to player
- format gui slot 13 of player with barrier named "&cCell not available for rent" with lore "&7This cell is rented by" and "&7%all members of region ""b-16""%"
- format gui slot 4 of player with paper named "&a%{timeleft-b-16}%hours left"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement