#=========# # CubDesk # #=========# options: tag: &7[&8CUB&7] vipPermissions: cub.rgvip # Uprawnienie dla Cuboida (VIP) jezeli zmienna {Cub::vipPermissions} jest "true" cubVipMessage: &cTen region jest dla rangi VIP extraPermissions: cub.rgextra # Uprawnienie dla Cuboida (EXTRA) jezeli zmienna {Cub::extraPermissions} jest "true" cubExtraMessage: &cTen region jest dla rangi sVIP variables: # Zmiany mozna dokonac z poziomu gry komenda: /cubperm {Cub::vipPermissions} = false # True - Wlacza sprawdzanie uprawnien gracza przed postawieniem Cuboida, False - zostawia bez zmian {Cub::extraPermissions} = false # True - Wlacza sprawdzanie uprawnien gracza przed postawieniem Cuboida, False - zostawia bez zmian #========================================================================================================================================# command /cubperm [] []: trigger: if player doesn't have permissions "cub.admin": send "&4Nie masz uprawnien" else: if arg 1 is "vip": if arg 2 is "true": set {Cub::vipPermissions} to true send "{@tag} &cUstawiono Cuboid &eVIP &cna ""z uprawnieniami""" stop if arg 2 is "false": set {Cub::vipPermissions} to false send "{@tag} &cUstawiono Cuboid &eVIP &cna ""bez uprawnien""" stop if arg 1 is "extra": if arg 2 is "true": set {Cub::vipPermissions} to true send "{@tag} &cUstawiono Cuboid &eEXTRA &cna ""z uprawnieniami""" stop if arg 2 is "false": set {Cub::vipPermissions} to false send "{@tag} &cUstawiono Cuboid &eEXTRA &cna ""bez uprawnien""" stop else: send "{@tag} &cNie prawidlowa wartosc &6(true/false)" else: send "{@tag} &cNie prawidlowa wartosc &6(vip/extra)" #========================================================================================================================================# on place: if player's tool is bedrock named "&cCubDesk &e- Cuboid EXTRA" with lore "&cCuboid o znacznych rozmiarach 59x59": if {Cub::Created::%player%} is not set: if {Cub::extraPermissions} is true: if player doesn't have permissions "{@extraPermissions}": cancel event send "{@tag} {@cubExtraMessage}" stop 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} set {Cub::%player%::StartTime} to now set {Cub::%player%::EndTime} to now add 7 days to {Cub::%player%::EndTime} 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} set {Cub::%player%::StartTime} to now set {Cub::%player%::EndTime} to now add 7 days to {Cub::%player%::EndTime} 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 49x49": if {Cub::Created::%player%} is not set: if {Cub::vipPermissions} is true: if player doesn't have permissions "{@vipPermissions}": cancel event send "{@tag} {@cubVipMessage}" stop 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} set {Cub::%player%::StartTime} to now set {Cub::%player%::EndTime} to now add 7 days to {Cub::%player%::EndTime} 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} set {Cub::%player%::StartTime} to now set {Cub::%player%::EndTime} to now add 7 days to {Cub::%player%::EndTime} 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 o zwyklych rozmiarach 39x39": 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} set {Cub::%player%::StartTime} to now set {Cub::%player%::EndTime} to now add 7 days to {Cub::%player%::EndTime} 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} set {Cub::%player%::StartTime} to now set {Cub::%player%::EndTime} to now add 7 days to {Cub::%player%::EndTime} 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 o zwyklych rozmiarach 39x39" 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 49x49" 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 59x59" 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: delete {Cub::%player%::Center} loop {Cub::%player%::Members::*}: remove loop-value-2 from {Cub::%player%::Members::*} set {Cuboid::%loop-value-2%} to "" delete {Cub::%player%::Members::*} delete {Cub::%player%::StartTime} delete {Cub::%player%::EndTime} remove "%player%" from {Cub::List::*} "%player%".Region.delete{}; delete {Cub::Created::%player%} set {Cuboid::%player%} to "" 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 not "%{Cuboid::%player%}%": 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