#=========# # CubDesk # #=========# options: tag: &7[&8CUB&7] #========================================================================================================================================# on place: if player's tool is bedrock named "&cCubDesk &e- Cuboid EXTRA" with lore "&cCuboid o znacznych rozmiarach dla &6sVIP": if {Cub::Created::%player%} is not set: if {Cub::List::*} exists: loop {Cub::List::*}: set {_} to loop-value if distance between location of player and {Cub::%{_}%::Center} is less than 65: cancel event send "{@tag} &cJestes za blisko innego Cuboida" stop else: cancel event set player's tool to air set {_loc} to block at location (x-coordinate of player, y-coordinate of player, z-coordinate of event-block) set {Cub::%player%::Center} to {_loc} add "%player%" to {Cub::%player%::Members::*} add "%player%" to {Cub::List::*} set {Cuboid::%player%} to "%player%" "%player%".Region.selectLS{location of event-block, 30}; send "{@tag} &eUtworzyles wlasnie Cuboida EXTRA" send "{@tag} &eJego waznosc to &c7 dni" send "{@tag} &eAby ja przedluzyc wpisz &6/cub days" send "{@tag} &eKomendy do zarzadzania pod &6/cubowner" set {Cub::Created::%player%} to true else: cancel event set player's tool to air set {_loc} to block at location (x-coordinate of player, y-coordinate of player, z-coordinate of event-block) set {Cub::%player%::Center} to {_loc} add "%player%" to {Cub::%player%::Members::*} add "%player%" to {Cub::List::*} set {Cuboid::%player%} to "%player%" "%player%".Region.selectLS{location of event-block, 30}; send "{@tag} &eUtworzyles wlasnie Cuboida EXTRA" send "{@tag} &eJego waznosc to &c7 dni" send "{@tag} &eAby ja przedluzyc wpisz &6/cub days" send "{@tag} &eKomendy do zarzadzania pod &6/cubowner" set {Cub::Created::%player%} to true else: send "&cPosiadasz juz Cuboida" if player's tool is plain glass block named "&cCubDesk &e- Cuboid VIP" with lore "&cCuboid o znacznych rozmiarach dla &eVIP": if {Cub::Created::%player%} is not set: if {Cub::List::*} exists: loop {Cub::List::*}: set {_} to loop-value if distance between location of player and {Cub::%{_}%::Center} is less than 65: cancel event send "{@tag} &cJestes za blisko innego Cuboida" stop else: cancel event set player's tool to air set {_loc} to block at location (x-coordinate of player, y-coordinate of player, z-coordinate of event-block) set {Cub::%player%::Center} to {_loc} add "%player%" to {Cub::%player%::Members::*} add "%player%" to {Cub::List::*} set {Cuboid::%player%} to "%player%" "%player%".Region.selectLS{location of event-block, 25}; send "{@tag} &eUtworzyles wlasnie Cuboida VIP" send "{@tag} &eJego waznosc to &c7 dni" send "{@tag} &eAby ja przedluzyc wpisz &6/cub days" send "{@tag} &eKomendy do zarzadzania pod &6/cubowner" set {Cub::Created::%player%} to true else: cancel event set player's tool to air set {_loc} to block at location (x-coordinate of player, y-coordinate of player, z-coordinate of event-block) set {Cub::%player%::Center} to {_loc} add "%player%" to {Cub::%player%::Members::*} add "%player%" to {Cub::List::*} set {Cuboid::%player%} to "%player%" "%player%".Region.selectLS{location of event-block, 25}; send "{@tag} &eUtworzyles wlasnie Cuboida VIP" send "{@tag} &eJego waznosc to &c7 dni" send "{@tag} &eAby ja przedluzyc wpisz &6/cub days" send "{@tag} &eKomendy do zarzadzania pod &6/cubowner" set {Cub::Created::%player%} to true else: send "&cPosiadasz juz Cuboida" if player's tool is sponge named "&cCubDesk &e- Cuboid" with lore "&cCuboid dla zwyklych graczy": if {Cub::Created::%player%} is not set: if {Cub::List::*} exists: loop {Cub::List::*}: set {_} to loop-value if distance between location of player and {Cub::%{_}%::Center} is less than 65: cancel event send "{@tag} &cJestes za blisko innego Cuboida" stop else: cancel event set player's tool to air set {_loc} to block at location (x-coordinate of player, y-coordinate of player, z-coordinate of event-block) set {Cub::%player%::Center} to {_loc} add "%player%" to {Cub::%player%::Members::*} add "%player%" to {Cub::List::*} set {Cuboid::%player%} to "%player%" "%player%".Region.selectLS{location of event-block, 20}; send "{@tag} &eUtworzyles wlasnie Cuboida" send "{@tag} &eJego waznosc to &c7 dni" send "{@tag} &eAby ja przedluzyc wpisz &6/cub days" send "{@tag} &eKomendy do zarzadzania pod &6/cubowner" set {Cub::Created::%player%} to true else: cancel event set player's tool to air set {_loc} to block at location (x-coordinate of player, y-coordinate of player, z-coordinate of event-block) set {Cub::%player%::Center} to {_loc} add "%player%" to {Cub::%player%::Members::*} add "%player%" to {Cub::List::*} set {Cuboid::%player%} to "%player%" "%player%".Region.selectLS{location of event-block, 20}; send "{@tag} &eUtworzyles wlasnie Cuboida" send "{@tag} &eJego waznosc to &c7 dni" send "{@tag} &eAby ja przedluzyc wpisz &6/cub days" send "{@tag} &eKomendy do zarzadzania pod &6/cubowner" set {Cub::Created::%player%} to true else: send "&cPosiadasz juz Cuboida" #========================================================================================================================================# command /cubgive [] []: executable by: console trigger: if arg 1 is not set: send "{@tag} &cWybierz jeden z Cuboidow:" send "{@tag} &enormal, vip, extra" if arg 1 is "normal": if arg 2 is not set: send "{@tag} &cWpisz nazwe gracza" else: if arg 2 is not online: send "{@tag} &cGracz nie jest online" else: give arg-2 sponge named "&cCubDesk &e- Cuboid" with lore "&cCuboid dla zwyklych graczy" send "{@tag} &aPrzekazano Cuboid graczowi" if arg 1 is "vip": if arg 2 is not set: send "{@tag} &cWpisz nazwe gracza" else: if arg 2 is not online: send "&{@tag} cGracz nie jest online" else: give arg-2 plain glass block named "&cCubDesk &e- Cuboid VIP" with lore "&cCuboid o znacznych rozmiarach dla &eVIP" send "{@tag} &aPrzekazano Cuboid graczowi" if arg 1 is "extra": if arg 2 is not set: send "{@tag} &cWpisz nazwe gracza" else: if arg 2 is not online: send "{@tag} &cGracz nie jest online" else: give arg-2 bedrock named "&cCubDesk &e- Cuboid EXTRA" with lore "&cCuboid o znacznych rozmiarach dla &6sVIP" send "{@tag} &aPrzekazano Cuboid graczowi" #========================================================================================================================================# command /cubowner [] []: trigger: if {Cub::List::*} exists: loop {Cub::List::*}: if loop-value is not "%player%": send "{@tag} &cNie jestes wlascicielem zadnego Cuboida" stop else: send "{@tag} &cNie jestes wlascicielem zadnego Cuboida" stop if arg 1 is "help": send "{@tag} &3/cubowner delete &e- usuwanie Cuboida" send "{@tag} &3/cubowner add &e- Dodawanie gracza do Cuboida" send "{@tag} &3/cubowner remove &e- Usuwanie gracza z Cuboida" send "{@tag} &3/cubowner members &e- Lista dodanych osob do Cuboida" if arg 1 is "delete": if arg 2 is not set: loop {Cub::List::*}: if loop-value is "%player%": if {CubAccept::%player%} is not set: set {CubAccept::%player%} to true send "{@tag} &cWpisz ponownie &6/cubowner delete" send "{@tag} &cAby potwierdzic usuniecie Cuboida" send "{@tag} &cMasz na to &a5 sekund" wait 5 second delete {CubAccept::%player%} else: set {_} to loop-value delete {Cub::%player%::Center} loop {Cub::%player%::Members::*}: remove loop-value-2 from {Cub::%player%::Members::*} delete {Cuboid::%loop-value-2%} delete {Cub::%player%::Members::*} remove "%player%" from {Cub::List::*} delete {Cub::Created::%player%} delete {Cuboid::%player%} delete {CubAccept::%player%} send "{@tag} &cCuboid zostal usuniety" if arg 1 is "add": if arg 2 is set: if arg 2 is online: loop {Cub::%player%::Members::*}: if loop-value is "%arg 2%": send "{@tag} &cTen gracz jest juz dodany do twojego Cuboida" stop loop {Cub::List::*}: set {_} to loop-value if loop-value is "%arg 2%": send "{@tag} &cTen gracz ma wlasny Cuboid" else: loop {Cub::%{_}%::Members::*}: if loop-value-2 is "%arg 2%": send "{@tag} &cGracz jest juz dodany do jakiegos Cuboida" else: add "%arg 2%" to {Cub::%player%::Members::*} set {Cuboid::%arg 2%} to "%player%" send "{@tag} &aDodano gracza do Cuboida" else: send "{@tag} &cTen gracz nie jest online" else: send "{@tag} &cWprowadz nick gracza" if arg 1 is "remove": if arg 2 is not set: send "{@tag} &cWprowadz nick gracza" else: if arg 2 is not online: send "{@tag} &cTen gracz nie jest online" else: loop {Cub::%player%::Members::*}: if loop-value is "%arg 2%": remove "%arg 2%" from {Cub::%player%::Members::*} delete {Cuboid::%arg 2%} send "{@tag} &cUsunieto gracza &e%arg 2% &cz Cuboida" if arg 1 is "members": send "{@tag} &aCzlonkowie Cuboida: &e%{Cub::%player%::Members::*}%" #========================================================================================================================================# command /cub: trigger: if {Cuboid::%player%} is set: send "{@tag} &9Czekaj na przeniesienie" set {_loc} to location of player wait 3 seconds teleport player to {Cub::%{Cuboid::%player%}%::Center} send "{@tag} &9Zostales przeniesiony do Cuboidu" else: send "{@tag} &cNie posiadasz Cuboida" #========================================================================================================================================# on place: set {_r} to Region.getAt{location of event-block}; if {_r} is set: if "%{_r}%" is not "%{Cuboid::%player%}%": cancel event send "{@tag} &cTen teren jest prywatny" stop #========================================================================================================================================# on break: set {_r} to Region.getAt{location of event-block}; if {_r} is set: if "%{_r}%" is "%{Cuboid::%player%}%" or "": stop else: cancel event send "{@tag} &cTen teren jest prywatny" stop #========================================================================================================================================# on right click on chest: set {_r} to Region.getAt{location of event-block}; if {_r} is set: if "%{_r}%" is not "%{Cuboid::%player%}%": cancel event send "{@tag} &cTen teren jest prywatny" stop