on place: if event-block is chest: set {lock.%location of event-block%} to false if event-block is wooden door: set {lock.%location of event-block%} to falseon rightclick: if event-block is chest: if {lock.%location of event-block%} is false: if player's tool is emerald: if {lock.%location of event-block%} is false: set {lock.%location of event-block%} to true set {locked.%location of event-block%} to location of event-block send "Zalozono zamek" to player set {userlock.%location of event-block%.1} to "%name of player%" remove 1 emerald from player's inventory else: send "zamek juz jest w tej skrzyni" to player cancel event if event-block is wooden door: if {lock.%location of event-block%} is false: if player's tool is emerald: if {lock.%location of event-block%} is false: set {lock.%location of event-block%} to true set {locked.%location of event-block%} to location of event-block send "Zalozono zamek" to player set {userlock.%location of event-block%.1} to "%name of player%" remove 1 emerald from player's inventory else: send "zamek juz jest w tej skrzyni" to player cancel event if {locked.%location of event-block%} is location of event-block: if {lock.%location of event-block%} is true: if {userlock.%location of event-block%.1} is "%name of player%": stop if player's tool is blaze rod: chance of 20%: stop else: cancel event remove 1 blaze rod from player's inventory else: cancel eventon rightclick on chest: if {locked.%location of event-block%} is location of event-block: if {lock.%location of event-block%} is true: if {userlock.%location of event-block%.1} is "%name of player%": stop if player's tool is blaze rod: chance of 20%: stop else: cancel event remove 1 blaze rod from player's inventory else: cancel eventon break: if {locked.%location of event-block%} is location of event-block: if {userlock.%location of event-block%.1} is "%name of player%": set {lock.%location of event-block%} to false stop if player has permission "chest.unlock": set {lock.%location of event-block%} to false stop else: cancel event#command /daj klucz [<player>]:# trigger:# if {_chestlog.%location of event-block%} is true:# if arg is set:# if {userlock.%location of event-block%.2} is not set:# set {userlock.%location of event-block%.2} to %arg%# else:# if {userlock.%location of event-block%.3} is not set:# set {userlock.%location of event-block%.3} to %arg%# else:# if {userlock.%location of event-block%.4} is not set:# set {userlock.%location of event-block%.4} to %arg%# else:# if {userlock.%location of event-block%.5} is not set:# set {userlock.%location of event-block%.5} to %arg%# else:# if {userlock.%location of event-block%.6} is not set:# set {userlock.%location of event-block%.6} to %arg%
Generalnie problem nr 1 jest taki że nie mam pojęcia jak zrobić komende /daj klucz aby umożliwić max 5 osobom dostęp do np skrzyni.
I problem nr 2 to że nie wiem jak to zrobić że zabezpieczając drzwi emeraldem klikając w dolny blok drzwi, to górny blok się nie zabezpiecza (łopatologicznie klikając w dół drzwi są one zamknięte, ale już klikając w górę drzwi można je normalnie otworzyć)
Oczywiście skrypt pisałem sam więc może nie być za super :)
Pytanie
Sabat 1
on place: if event-block is chest: set {lock.%location of event-block%} to false if event-block is wooden door: set {lock.%location of event-block%} to falseon rightclick: if event-block is chest: if {lock.%location of event-block%} is false: if player's tool is emerald: if {lock.%location of event-block%} is false: set {lock.%location of event-block%} to true set {locked.%location of event-block%} to location of event-block send "Zalozono zamek" to player set {userlock.%location of event-block%.1} to "%name of player%" remove 1 emerald from player's inventory else: send "zamek juz jest w tej skrzyni" to player cancel event if event-block is wooden door: if {lock.%location of event-block%} is false: if player's tool is emerald: if {lock.%location of event-block%} is false: set {lock.%location of event-block%} to true set {locked.%location of event-block%} to location of event-block send "Zalozono zamek" to player set {userlock.%location of event-block%.1} to "%name of player%" remove 1 emerald from player's inventory else: send "zamek juz jest w tej skrzyni" to player cancel event if {locked.%location of event-block%} is location of event-block: if {lock.%location of event-block%} is true: if {userlock.%location of event-block%.1} is "%name of player%": stop if player's tool is blaze rod: chance of 20%: stop else: cancel event remove 1 blaze rod from player's inventory else: cancel eventon rightclick on chest: if {locked.%location of event-block%} is location of event-block: if {lock.%location of event-block%} is true: if {userlock.%location of event-block%.1} is "%name of player%": stop if player's tool is blaze rod: chance of 20%: stop else: cancel event remove 1 blaze rod from player's inventory else: cancel eventon break: if {locked.%location of event-block%} is location of event-block: if {userlock.%location of event-block%.1} is "%name of player%": set {lock.%location of event-block%} to false stop if player has permission "chest.unlock": set {lock.%location of event-block%} to false stop else: cancel event#command /daj klucz [<player>]:# trigger:# if {_chestlog.%location of event-block%} is true:# if arg is set:# if {userlock.%location of event-block%.2} is not set:# set {userlock.%location of event-block%.2} to %arg%# else:# if {userlock.%location of event-block%.3} is not set:# set {userlock.%location of event-block%.3} to %arg%# else:# if {userlock.%location of event-block%.4} is not set:# set {userlock.%location of event-block%.4} to %arg%# else:# if {userlock.%location of event-block%.5} is not set:# set {userlock.%location of event-block%.5} to %arg%# else:# if {userlock.%location of event-block%.6} is not set:# set {userlock.%location of event-block%.6} to %arg%Generalnie problem nr 1 jest taki że nie mam pojęcia jak zrobić komende /daj klucz aby umożliwić max 5 osobom dostęp do np skrzyni.
I problem nr 2 to że nie wiem jak to zrobić że zabezpieczając drzwi emeraldem klikając w dolny blok drzwi, to górny blok się nie zabezpiecza (łopatologicznie klikając w dół drzwi są one zamknięte, ale już klikając w górę drzwi można je normalnie otworzyć)
Oczywiście skrypt pisałem sam więc może nie być za super :)
Odnośnik do komentarza
https://skript.pl/temat/4241-par%C4%99-problem%C3%B3w/Udostępnij na innych stronach
2 odpowiedzi na to pytanie
Rekomendowane odpowiedzi