command /kale [<text>] [<text>]:
permission: kale.admin
trigger:
if arg 1 is set:
if arg 1 is "kose" or "köşe" or "kosesec" or "köşeseç":
if arg 2 is set:
if arg 2 is "1" or "0":
#set {kose1} to location at round(player's x-coords), round(player's y-coords), round(player's z-coords)
set {kose1} to player's location
send "&7Köşe-1 &8[&e%{kose1}%&8] &7kordinatlarına ayarlandı!"
else if arg 2 is "2":
#set {kose2} to location at round(player's x-coords), round(player's y-coords), round(player's z-coords)
set {kose2} to player's location
send "&7Köşe-2 &8[&e%{kose2}%&8] &7kordinatlarına ayarlandı!"
else:
send "&cDoğru kullanım: /kale kose (1/2)"
else:
send "&cDoğru kullanım: /kale kose (1/2)"
else if arg 1 is "anahtar":
give player 1 of glowing tripwire hook named "&aKale Açma"
give player 1 of glowing tripwire hook named "&cKale Kapatma"
send "&7Anahtarlar verildi!"
else:
send "&cDoğru kullanım: /kale [kose/anahtar] (1/2)"
else:
send "&cDoğru kullanım: /kale [kose/anahtar] (1/2)"
on right click:
if name of player's held item contains "&aKale Açma":
cancel event
if {kose1} is set:
if {kose2} is set:
execute console command "fill %(x-coords of {kose1})% %(y-coords of {kose1})% %(z-coords of {kose1})% %(x-coords of {kose2})% %(y-coords of {kose2})% %(z-coords of {kose2})% air"
send "&aAçıldı!"
stop
if name of player's held item contains "&cKale Kapatma":
cancel event
if {kose1} is set:
if {kose2} is set:
execute console command "fill %(x-coords of {kose1})% %(y-coords of {kose1})% %(z-coords of {kose1})% %(x-coords of {kose2})% %(y-coords of {kose2})% %(z-coords of {kose2})% iron_bars"
send "&cKapatıldı!"
stop