İstek Kale Kapısı Skripti İstiyorum Yapabilecek Var mı

xSkyLake

Zombi Katili
Mesajlar
157
En iyi cevaplar
0
Beğeniler
5
Puanları
110
Bi Tane Kale Yaptım Büyük Bir Boşluk Bıraktım Kale Muhafızı Olana 2 Tane Şalter Verilecek Birinin Adı Kapı Açma Birinin Adı Kale Kapatma Olacak Kale Açmaya Sağ Tıklandığında hiçbir Yere Konulmayacak Ama O Kale Boşluğu Demir Parmaklıklarla Dolacak Kapı Kapatmaya Sağ Tıklandığında O Demir Parmaklıklar Yok Olacak. Bence Mümkün Ama Ben Beceremem Şimdiden Teşekkürler. Eğer Örnek Skripti Atarsanız Kendim Koordinatlara Bakarak Düzenlerim.
 


na2000

Altın Madencisi
Mesajlar
355
En iyi cevaplar
22
Beğeniler
129
Puanları
890
Ruh hali
--KOD--
Kod:
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
--KOD--
Kusura bakma, fill komutu ile yaptım. (Skript yazarken execute console command kullanmanı tavsiye etmem.)
Kod:
loop all blocks between block at {kose1} and block at {kose2}:
    set block at loop-block to iron bar block
Normalde bu şekilde yapmayı denedim fakat sadece 1. köşeden 2. köşeye çapraz şekilde yerleştiriyor.
Biraz bakınıccam, belki fill kullanmadan daha iyi bir yol bulabilirim.
Komutlar
/kale kose [1/2] ->Kapının köşelerini bu komutla seçersin.
/kale anahtar -> Anahtar alma komutu

Umarım yardımcı olabilmişimdir ^^
 

Üst