Siema Wszystkim, Mam taki problem z moim skryptem że jak clajmuje chunka... i potem odklajmuje to jak przyjdzie inny gracz i sklajmuje tego samego chunka co ja miałem to ja nadal mogę tam niszczyć.... I proszę żeby tam dorobić takie coś żeby nie wlewała się woda na sklajmowanego chunka... Daje + Kto pomoże
# ----------------------------------------------------------------------------------------------
options:
World: world2
# The world default players can claim.
spawn_region: spawn
# If you have WorlGuard and you have a region 'Spawn', you can protect the region of command "/chunk"
# ----------------------------------------------------------------------------------------------
variables:
{landclaims.%player%} = 0
{claimedland.%player%} = 0
# ----------
# Max chunks
# ----------
{_nowy} = 4
{_kamien} = 4
{_zelazo} = 8
{_zloto} = 12
{_diament} = 18
{_obsydian} = 24
{_ender} = 40
{_aether} = 60
{_boski} = 100
{_vip} = 12
{_supporter} = 12
{_youtube} = 24
on join:
if {played.%player%} is not set:
set {played.%player%} to true
every 1 ticks in world "{@World}":
loop all players:
{chunk.%chunk at location of loop-player%} is not set:
{landnotify.%loop-player%} is not "&6» Ten chunk jest wolny.":
set action bar of loop-player to "&cTen chunk jest wolny."
set {landnotify.%loop-player%} to "&6» Ten chunk jest wolny."
{landnotify.%loop-player%} is not {chunk.%chunk at location of loop-player%}:
{chunk.%chunk at location of loop-player%} is not set:
{landnotify.%loop-player%} is not "&6» Ten chunk jest wolny.":
set action bar of loop-player to "&cTen chunk jest wolny."
set {landnotify.%loop-player%} to "&6» Ten chunk jest wolny."
set {land.unclaim.%loop-player%} to true
{chunk.%chunk at location of loop-player%} is set:
set action bar of loop-player to "&cTen chunk nalezy do gracza &6%{chunk.%chunk at location of loop-player%}%."
set {landnotify.%loop-player%} to {chunk.%chunk at location of loop-player%}
{landnotify.%loop-player%} is not set:
{chunk.%chunk at location of loop-player%} is not set:
set action bar of loop-player to "&cTen chunk jest wolny."
set {landnotify.%loop-player%} to "&6» Ten chunk jest wolny."
set {land.unclaim.%loop-player%} to true
on command "/chunk":
wait 2 ticks
if "%region at player%" contains "{@spawn_region}":
message "ChunkClaim &9> &7Nie mozesz tu claimowac!"
#startfold
command /chunk [<text>] [<offlineplayer>]:
description: Wszystkie komendy /chunk list
usage: &c/chunk (claim, unclaim, add, remove)
trigger:
argument 1 is not set:
if player has permission "centrumbudowy.boski":
set {Max-Land.%player%} to {_boski}
else if player has permission "centrumbudowy.aether":
set {Max-Land.%player%} to {_aether}
else if player has permission "centrumbudowy.ender":
set {Max-Land.%player%} to {_ender}
else if player has permission "centrumbudowy.obsydian":
set {Max-Land.%player%} to {_obsydian}
else if player has permission "centrumbudowy.diament":
set {Max-Land.%player%} to {_diament}
else if player has permission "centrumbudowy.zloto":
set {Max-Land.%player%} to {_zloto}
else if player has permission "centrumbudowy.zelazo":
set {Max-Land.%player%} to {_zelazo}
else if player has permission "centrumbudowy.kamien":
set {Max-Land.%player%} to {_kamien}
else if player has permission "centrumbudowy.nowy":
set {Max-Land.%player%} to {_nowy}
if player has permission "centrumbudowy.vip":
set {Max-Land.%player%} to {Max-Land.%player%} + {_vip}
if player has permission "centrumbudowy.supporter":
set {Max-Land.%player%} to {Max-Land.%player%} + {_supporter}
if player has permission "centrumbudowy.youtuber":
set {Max-Land.%player%} to {Max-Land.%player%} + {_youtube}
if player has permission "centrumbudowy.chunk.unlimited":
set {Max-Land.%player%} to -1
message "-----------------------------------------------------"
message "Twoje chunki &9> &7%{claimedland.%player%}%/%{Max-Land.%player%}%"
message "Aby zobaczyc wiecej informacji wpisz &e/chunk pomoc"
message "-----------------------------------------------------"
#subfold @help
argument 1 is "help" or "h" or "pomoc":
message "-----------------------------------------------------"
message "/chunk &9> &7Wyswietla liczbe twoich chunkow"
message "/chunk claim &9> &7Claimowanie chunka"
message "/chunk unclaim &9> &7Odclaimowanie chunka"
message "/chunk info &9> &7Wyswietla informacje o chunku"
message "/chunk add <player> &9> &7Dodaje gracza do chunka"
message "/chunk remove <player> &9> &7Usuwa gracza z chunka"
# message "/chunk map &9> &7Minimapa"
if player has permission "centrumbudowy.chunk.bypass":
message "/chunk bypass &9> &7Superuser w kazdym chunku"
message "-----------------------------------------------------"
#subfold @info
argument 1 is "info" or "i":
if {chunk.%chunk at location of player%} is set:
message "-----------------------------------------------------"
message "Wlasciciel &9> &7 %{chunk.%chunk at location of player%}%"
message "Dostep &9> &7 %{land.%chunk at location of player%::*}%"
stop
message "-----------------------------------------------------"
message "&6Ten chunk jest wolny."
stop
#subfold @error
argument 1 is "error":
if player has permission "centrumbudowy.chunk.bypass":
message "&cNieprawidlowe uzycie. Wpisz '/chunk [info, list, teleport, delhome, claim, unclaim, add, remove, bypass, map] (player)'"
else:
message "&cNieprawidlowe uzycie. Wpisz '/chunk [info, list, teleport, delhome, claim, unclaim, add, remove, bypass, map] (player)'"
message "&7 () = Opcjonalne, [] = Wymagane."
stop
#subfold @claim
argument 1 is "claim" or "c":
if {chunk.%chunk at location of player%} is set:
message "&cTen chunk juz do kogos nalezy."
stop
else:
if player has permission "centrumbudowy.boski":
set {Max-Land.%player%} to {_boski}
else if player has permission "centrumbudowy.aether":
set {Max-Land.%player%} to {_aether}
else if player has permission "centrumbudowy.ender":
set {Max-Land.%player%} to {_ender}
else if player has permission "centrumbudowy.obsydian":
set {Max-Land.%player%} to {_obsydian}
else if player has permission "centrumbudowy.diament":
set {Max-Land.%player%} to {_diament}
else if player has permission "centrumbudowy.zloto":
set {Max-Land.%player%} to {_zloto}
else if player has permission "centrumbudowy.zelazo":
set {Max-Land.%player%} to {_zelazo}
else if player has permission "centrumbudowy.kamien":
set {Max-Land.%player%} to {_kamien}
else if player has permission "centrumbudowy.nowy":
set {Max-Land.%player%} to {_nowy}
if player has permission "centrumbudowy.vip":
set {Max-Land.%player%} to {Max-Land.%player%} + {_vip}
if player has permission "centrumbudowy.supporter":
set {Max-Land.%player%} to {Max-Land.%player%} + {_supporter}
if player has permission "centrumbudowy.youtuber":
set {Max-Land.%player%} to {Max-Land.%player%} + {_youtube}
if player has permission "centrumbudowy.chunk.unlimited":
set {Max-Land.%player%} to -1
if {claimedland.%player%} is {Max-Land.%player%}:
message "&cOsiagnales limit zclaimowanych chunkow."
else if {claimedland.%player%} is less than {Max-Land.%player%}:
add name of player to {land.%chunk at location of player%::*}
set {chunk.%chunk at location of player%} to name of player
set {chunk.%chunk at location of player%.%player%} to true
add 1 to {claimedland.%player%}
message "&6Pomyslnie zclaimowano chunk."
log "%player% w swiecie %world% na %player's location%" to "LandClaim/Claim.log"
if {home.%player%} is not set:
set {home.%player%} to location of the player
else if player has permission "centrumbudowy.chunk.unlimited":
add name of player to {land.%chunk at location of player%::*}
set {chunk.%chunk at location of player%} to name of player
set {chunk.%chunk at location of player%.%player%} to true
add 1 to {claimedland.%player%}
message "&6Pomyslnie zclaimowano chunk."
log "%player% w swiecie %world% na %player's location%" to "LandClaim/Claim.log"
if {home.%player%} is not set:
set {home.%player%} to location of the player
stop
#subfold @unclaim
argument 1 is "unclaim" or "u":
if {chunk.%chunk at location of player%} is not set:
message "&cTen chunk nie nalezy do nikogo."
stop
if {chunk.%chunk at location of player%} is not name of player:
if {bypassland.%player%} is not true:
message "&cTen chunk nie nalezy do Ciebie."
stop
else:
if {bypassland.%player%} is true:
remove 1 from {claimedland.%{chunk.%chunk at location of player%}%}
remove name of player to {land.%chunk at location of player%::*}
clear {land.%chunk at location of player%::*}
clear {chunk.%chunk at location of player%}
delete {loc.chunks.%player%::%chunk at location of player%}
message "&6Pomyslnie odclaimowano chunk."
stop
message "&cTen chunk nie nalezy do Ciebie."
# message "&cTen chunk nalezy do %{chunk.%chunk at location of player%}%"
else:
remove 1 from {claimedland.%player%}
loop {land.%chunk at location of player%::*}:
clear {chunk.%chunk at location of player%::*}
delete {land.%chunk at location of player%::*}
message "&6Pomyslnie odclaimowano chunk."
if {home.%player%} is set:
delete {home.%player%}
clear {chunk.%chunk at location of player%}
delete {loc.chunks.%player%::%chunk at location of player%}
stop
# subfold @add
argument 1 is "add" or "dodaj":
if {chunk.%chunk at location of player%} is not set:
message "&cTen chunk nie nalezy do nikogo."
stop
if {chunk.%chunk at location of player%} is not name of player:
if {bypassland.%player%} is true:
if {land.%chunk at location of player%::%{_playersearch}%} is argument 2:
message "&cTen gracz jest juz dodany do tego chunka."
stop
else:
add "%argument 2%" to {land.%chunk at location of player%::*}
set {chunk.%chunk at location of player%.%argument 2%} to true
message "&6Pomyslnie dodano %argument 2% do chunka."
stop
else:
message "&cTen chunk nie nalezy do Ciebie."
stop
if {chunk.%chunk at location of player%} is argument 2:
message "&cNie mozna dodac tego gracza."
stop
set {_playersearch} to 0
loop 10000 times:
if {land.%chunk at location of player%::%{_playersearch}%} is argument 2:
message "&cTen gracz jest juz dodany do tego chunka."
stop
else:
add 1 to {_playersearch}
if {_playersearch} is 10000:
message "&6Pomyslnie dodano %argument 2% do chunka."
add "%argument 2%" to {land.%chunk at location of player%::*}
set {chunk.%chunk at location of player%.%argument 2%} to true
stop #subfold @remove
argument 1 is "wyrzuc" or "remove":
if argument 2 is not set:
make player execute command "chunk error"
stop
if {chunk.%chunk at location of player%} is not set:
message "&cTen chunk nie nalezy do nikogo."
stop
if {chunk.%chunk at location of player%} is not name of player:
if {bypassland.%player%} is not true:
message "&cTen chunk nie nalezy do Ciebie."
stop
else:
if {bypassland.%player%} is true:
if {land.%chunk at location of player%::%{_playersearch}%} is argument 2:
message "&cTen gracz jest juz dodany do tego chunka."
stop
else:
add "%argument 2%" to {land.%chunk at location of player%::*}
set {chunk.%chunk at location of player%.%argument 2%} to true
message "&6Pomyslnie dodano %name of argument 2% do chunka."
stop
if {chunk.%chunk at location of player%} is argument 2:
message "&cNie mozna usunac siebie z chunka."
stop
loop {land.%chunk at location of player%::*}:
if loop-value is argument 2:
clear {chunk.%chunk at location of player%.%argument 2%}
delete {land.%chunk at location of player%::%loop-index%}
exit loop
clear {chunk.%chunk at location of player%.%argument 2%}
message "&6Pomyslnie usunieto %argument 2% z chunka."
stop #subfold @bypass
argument 1 is "bypass":
player has permission "centrumbudowy.chunk.bypass":
if {bypassland.%player%} is true:
clear {bypassland.%player%}
message "&6Tryb dostepu wylaczony."
stop
set {bypassland.%player%} to true
message "&6Tryb dostepu wlaczony."
stop
message "&cNie masz uprawnien do tej komendy."
stop
#subfold @list
argument 1 is "list" or "l":
argument 2 is not set:
loop {loc.chunks.%player%::*}:
set {_loc} to {loc.chunks.%player%::%loop-index%}
set {_chunk} to chunk at location of {_loc}
set {_chunk.name} to {chunk.name.%{_chunk}%}
{_count} is not set:
set {_count} to 0
add 1 to {_count}
{chunk.name.%{_chunk}%} is not set:
set {chunk.name.%{_chunk}%} to "%{_count}%"
set {_chunk.name} to {chunk.name.%{_chunk}%}
{_chunk.name} is not set:
set {_chunk.name} to "&cBez nazwy"
send "&a%{_count}% ----- %{_chunk}% ----- %{_chunk.name}%" to player
stop
argument 2 is set:
loop {loc.chunks.%argument 2%::*}:
set {_loc} to loop-value
set {_chunk} to chunk at location of {_loc}
set {_chunk.name} to {chunk.name.%{_chunk}%}
{_count} is not set:
set {_count} to 0
{_chunk.name} is not set:
set {_chunk.name} to "&cBez nazwy"
{chunk.%{_chunk}%.%player%} is true:
add 1 to {_count}
send "&a%{_count}% ----- %{_chunk}% ----- %{_chunk.name}%" to player
stop
#subfold @map
argument 1 is "mapatest":
message "------------ [ Mini Mapa ] ------------"
set {_mapX} to 11
set {_mapY} to 6
set {_m} to ""
loop 13 times:
loop 23 times:
set {_x} to {_mapX} * 16
set {_y} to {_mapY} * 16
set {_chunk2} to chunk at block {_y} blocks north {_x} blocks west of player
if {loc.chunks::%{_chunk2}%} isn't set:
set {_result} to ""
else:
set {_result} to {loc.chunks::%{_chunk2}%}
# Pozycja gracza na minimapie
if {_chunk2} is chunk at player:
set {_m} to "%{_m}%&2â–"
# Chunk gracza
else if {_result} is {loc.chunks.%player%::%{_chunk2}%}:
set {_m} to "%{_m}%&aâ–"
else if {_result} is "":
set {_m} to "%{_m}%&7â–"
else:
set {_m} to "%{_m}%&câ–"
add -1 to {_mapX}
message "%{_m}%" to player
set {_m} to ""
add -1 to {_mapY}
set {_mapX} to 11
set {_n} to "N"
set {_s} to "S"
set {_e} to "E"
set {_w} to "W"
if facing of player is north:
set {_n} to "&4N&6"
else if facing of player is south:
set {_s} to "&4S&6"
else if facing of player is west:
set {_w} to "&4W&6"
else if facing of player is east:
set {_e} to "&4E&6"
message " "
message "&aâ– Twoj claim; &2â– Ty; &câ– Inny gracz; &6\%{_n}%/"
message "&7â– Wolna strefa &6%{_w}%+%{_e}%"
message " "
#endfold
on place:
if {bypassland.%player%} is true:
stop
loop blocks in radius 10 of block:
if {chunk.%chunk at location of loop-block%} is set:
if {chunk.%chunk at location of loop-block%.%player%} is true:
exit loop
else:
cancel event
message "&cBrak uprawnien na chunku!"
stop
on quit:
if {bypassland.%player%} is true:
clear {bypassland.%player%}
on place:
if {bypassland.%player%} is true:
stop
if {chunk.%chunk at location of block%} is set:
if {chunk.%chunk at location of block%.%player%} is true:
stop
message "&cTen chunk nalezy do &7%{chunk.%chunk at location of block%}%&c."
cancel event
on break:
if {bypassland.%player%} is true:
stop
if {chunk.%chunk at location of block%} is set:
if {chunk.%chunk at location of block%.%player%} is true:
stop
message "&cTen chunk nalezy do &7%{chunk.%chunk at location of block%}%&c."
cancel event
on right click:
if {bypassland.%player%} is true:
stop
if {chunk.%chunk at location of block%} is set:
if {chunk.%chunk at location of block%.%player%} is true:
stop
message "&cTen chunk nalezy do &7%{chunk.%chunk at location of block%}%&c."
cancel event
on right click on horse:
if {bypassland.%player%} is true:
stop
if {chunk.%chunk at location of event-player%} is set:
{chunk.%chunk at location of event-player%} is not event-player:
{chunk.%chunk at location of event-player%.%event-player%} is set:
stop
send "&cBrak uprawnien na chunku!" to event-player
cancel event
stop trigger
on place of tnt:
if {bypassland.%player%} is true:
stop
loop blocks in radius 10 of block:
if {chunk.%chunk at location of loop-block%} is set:
if {chunk.%chunk at location of loop-block%.%player%} is true:
exit loop
else:
cancel event
message "&cBrak uprawnien na chunku!"
stop
on explode:
entity is creeper
loop blocks in radius 10 of entity:
if {chunk.live.%chunk at location of loop-block%} is set:
cancel event
set {_safe} to true
{_safe} is set:
create safe explosion of force 3 at event-location
on damage of a entity:
victim is a chicken or a cow or a mooshroom or a horse or a sheep or a pig or a wolf or a ocelot or a villager or a squid or a item frame
attacker is a player
victim is a cow:
attacker's tool is a empty bucket
stop
if {bypassland.%attacker%} is true:
stop
loop blocks in radius 3 of victim:
if {chunk.%chunk at location of loop-block%} is set:
if {chunk.%chunk at location of loop-block%.%attacker%} is true:
stop
send "&cBrak uprawnien na chunku!" to attacker
cancel event
stop
on break glass:
if {bypassland.%player%} is true:
stop
if {chunk.%chunk at location of event-player%} is set:
{chunk.%chunk at location of event-player%} is not event-player:
{chunk.%chunk at location of event-player%.%event-player%} is set:
stop
send "&cTen chunk nalezy do &7%{chunk.%chunk at location of block%}%&c." to event-player
cancel event
stop trigger
on right click on lead:
if {bypassland.%player%} is true:
stop
if {chunk.%chunk at location of event-player%} is set:
{chunk.%chunk at location of event-player%} is not event-player:
{chunk.%chunk at location of event-player%.%event-player%} is set:
stop
send "&cTen chunk nalezy do &7%{chunk.%chunk at location of block%}%&c." to event-player
cancel event
stop trigger
on enderman pickup:
if {chunk.live.%chunk at location of block%} is set:
cancel event
Pytanie
kondziu2k 0
Siema Wszystkim, Mam taki problem z moim skryptem że jak clajmuje chunka... i potem odklajmuje to jak przyjdzie inny gracz i sklajmuje tego samego chunka co ja miałem to ja nadal mogę tam niszczyć.... I proszę żeby tam dorobić takie coś żeby nie wlewała się woda na sklajmowanego chunka... Daje + Kto pomoże
Odnośnik do komentarza
https://skript.pl/temat/20785-skrypt-na-claim-chank%C3%B3w-naprawa/Udostępnij na innych stronach
1 odpowiedź na to pytanie
Rekomendowane odpowiedzi