Çözüldü Skript'imde ufak değişiklikler gerek

  • Konuyu Başlatan Konuyu Başlatan Abuleyt
  • Başlangıç tarihi Başlangıç tarihi
  • Görüntüleme 352
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Abuleyt

Somon Balığı Selam Vermeye Geldi
Katılım
8 Eylül 2024
Mesajlar
10
Elmaslar
0
Puan
115
Yaş
26
Konum
Turkiye
Minecraft
Abuleyt

Discord:

Abuleyt

# Orak Çapa Skripti
# 1.8 Minecraft sunucusu için

command /orakver:
trigger:
give player a diamond hoe named "&6Orak"
send "&aOrak sana verildi!"

on leftclick with a hoe:
if player's tool is a hoe named "&6Orak":
if target is a living entity:
set {_target} to target
set {_loc} to location of {_target}
set {_blockList::*} to {}

# 5 blok yüksekliğinde 5x5 kafesi oluştur
loop 5 times:
set {_y} to y-coordinate of {_loc} + loop-number - 1
loop blocks in radius 2 around {_loc}:
if loop-block is air:
set loop-block to iron bars
add location of loop-block to {_blockList::*} # Blokların lokasyonlarını kaydet
set {_loc} to location of {_loc}
set y-coordinate of {_loc} to {_y} + 1

# Kafesin üstünü kapat
set {_top_loc} to location of {_target}
add 5 to y-coordinate of {_top_loc} # 5 blok yukarıda olmalı
loop blocks in radius 2 around {_top_loc}:
if loop-block is air:
set loop-block to iron bars
add location of loop-block to {_blockList::*} # Üstteki parmaklıkları listeye ekle

# Alanın içini boşalt
loop blocks in radius 2 around {_loc}:
if loop-block is not iron bars:
set loop-block to air

send "&a%name of {_target}% isimli canlıyı 5x5 alanda yukarıya doğru 5 blok yüksekliğinde hapse attın!" to player
if {_target} is a player:
send "&cBir oyuncu tarafından 5x5 alanda demir parmaklıklarla hapsedildin!" to {_target}

# 10 saniye bekle ve kafesi temizle
wait 10 seconds
loop {_blockList::*}:
set block at loop-value to air
kodum bu ve bu kodda istediğimi tam olarak yapmıyor aşağıda istediğim gibi bir hapise almasını istiyorum fakat istediğim gibi almıyor. içinde demir parmaklığı oluyor.

içinde koyun olan benim koddaki.


Screenshot_12.webp
Screenshot_11.webp
 
Kodun tamamini incelemedim ama sanirim icini bosaltma kismi hatali. is not iron bars yerine is iron bars dener misiniz?
JavaScript:
# Alanın içini boşalt
loop blocks in radius 2 around {_loc}:
if loop-block is not iron bars:
set loop-block to air
 
Kodun tamamini incelemedim ama sanirim icini bosaltma kismi hatali. is not iron bars yerine is iron bars dener misiniz?
JavaScript:
# Alanın içini boşalt
loop blocks in radius 2 around {_loc}:
if loop-block is not iron bars:
set loop-block to air
malesef işe yaramadı.
 
Kod:
command /orakver:
    trigger:
        give player a diamond hoe named "&6Orak"
        send "&aOrak sana verildi!" to player

on rightclick with a hoe:
    if player's tool is a hoe named "&6Orak":
        if target is a living entity:
            set {_target} to target
            set {_loc} to location of {_target}
            set {_blockList::*} to {}

            # 5 blok yüksekliğinde 5x5 kafesin kenarlarını ve köşelerini oluştur
            loop 5 times:
                set {_y} to y-coordinate of {_loc} + loop-number - 1

                # Kenar bloklarını koy
                loop blocks in radius 2 around {_loc}:
                    if loop-block is air:
                        set {_blockLoc} to location of loop-block
                        if x-coordinate of {_blockLoc} is within {_loc}'s x-coordinate - 2 to {_loc}'s x-coordinate + 2:
                            if z-coordinate of {_blockLoc} is within {_loc}'s z-coordinate - 2 to {_loc}'s z-coordinate + 2:
                                if y-coordinate of {_blockLoc} is {_y}:
                                    # Kenar ve köşe blokları
                                    if x-coordinate of {_blockLoc} is {_loc}'s x-coordinate - 2 or x-coordinate of {_blockLoc} is {_loc}'s x-coordinate + 2 or z-coordinate of {_blockLoc} is {_loc}'s z-coordinate - 2 or z-coordinate of {_blockLoc} is {_loc}'s z-coordinate + 2:
                                        set {_blockLoc} to iron bars
                                        add {_blockLoc} to {_blockList::*}
                
                # Kafesin üstünü kapat
                set {_top_loc} to location of {_target}
                add 5 to y-coordinate of {_top_loc}
                loop blocks in radius 2 around {_top_loc}:
                    if loop-block is air:
                        set {_blockLoc} to location of loop-block
                        if x-coordinate of {_blockLoc} is within {_top_loc}'s x-coordinate - 2 to {_top_loc}'s x-coordinate + 2:
                            if z-coordinate of {_blockLoc} is within {_top_loc}'s z-coordinate - 2 to {_top_loc}'s z-coordinate + 2:
                                if y-coordinate of {_blockLoc} is {_top_loc}'s y-coordinate:
                                    # Üst kenar blokları
                                    if x-coordinate of {_blockLoc} is {_top_loc}'s x-coordinate - 2 or x-coordinate of {_blockLoc} is {_top_loc}'s x-coordinate + 2 or z-coordinate of {_blockLoc} is {_top_loc}'s z-coordinate - 2 or z-coordinate of {_blockLoc} is {_top_loc}'s z-coordinate + 2:
                                        set {_blockLoc} to iron bars
                                        add {_blockLoc} to {_blockList::*}

            # Alanın içini boşalt
            loop blocks in radius 2 around {_loc}:
                if loop-block is not iron bars:
                    set loop-block to air

            send "&a%name of {_target}% isimli canlıyı 5x5 alanda yukarıya doğru 5 blok yüksekliğinde hapse attın!" to player
            if {_target} is a player:
                send "&cBir oyuncu tarafından 5x5 alanda demir parmaklıklarla hapsedildin!" to {_target}

            # 10 saniye bekle ve kafesi temizle
            wait 10 seconds
            loop {_blockList::*}:
                set block at loop-value to air
Bu şekilde denermiisn bide?
 
Kod:
command /orakver:
    trigger:
        give player a diamond hoe named "&6Orak"
        send "&aOrak sana verildi!" to player

on rightclick with a hoe:
    if player's tool is a hoe named "&6Orak":
        if target is a living entity:
            set {_target} to target
            set {_loc} to location of {_target}
            set {_blockList::*} to {}

            # 5 blok yüksekliğinde 5x5 kafesin kenarlarını ve köşelerini oluştur
            loop 5 times:
                set {_y} to y-coordinate of {_loc} + loop-number - 1

                # Kenar bloklarını koy
                loop blocks in radius 2 around {_loc}:
                    if loop-block is air:
                        set {_blockLoc} to location of loop-block
                        if x-coordinate of {_blockLoc} is within {_loc}'s x-coordinate - 2 to {_loc}'s x-coordinate + 2:
                            if z-coordinate of {_blockLoc} is within {_loc}'s z-coordinate - 2 to {_loc}'s z-coordinate + 2:
                                if y-coordinate of {_blockLoc} is {_y}:
                                    # Kenar ve köşe blokları
                                    if x-coordinate of {_blockLoc} is {_loc}'s x-coordinate - 2 or x-coordinate of {_blockLoc} is {_loc}'s x-coordinate + 2 or z-coordinate of {_blockLoc} is {_loc}'s z-coordinate - 2 or z-coordinate of {_blockLoc} is {_loc}'s z-coordinate + 2:
                                        set {_blockLoc} to iron bars
                                        add {_blockLoc} to {_blockList::*}
               
                # Kafesin üstünü kapat
                set {_top_loc} to location of {_target}
                add 5 to y-coordinate of {_top_loc}
                loop blocks in radius 2 around {_top_loc}:
                    if loop-block is air:
                        set {_blockLoc} to location of loop-block
                        if x-coordinate of {_blockLoc} is within {_top_loc}'s x-coordinate - 2 to {_top_loc}'s x-coordinate + 2:
                            if z-coordinate of {_blockLoc} is within {_top_loc}'s z-coordinate - 2 to {_top_loc}'s z-coordinate + 2:
                                if y-coordinate of {_blockLoc} is {_top_loc}'s y-coordinate:
                                    # Üst kenar blokları
                                    if x-coordinate of {_blockLoc} is {_top_loc}'s x-coordinate - 2 or x-coordinate of {_blockLoc} is {_top_loc}'s x-coordinate + 2 or z-coordinate of {_blockLoc} is {_top_loc}'s z-coordinate - 2 or z-coordinate of {_blockLoc} is {_top_loc}'s z-coordinate + 2:
                                        set {_blockLoc} to iron bars
                                        add {_blockLoc} to {_blockList::*}

            # Alanın içini boşalt
            loop blocks in radius 2 around {_loc}:
                if loop-block is not iron bars:
                    set loop-block to air

            send "&a%name of {_target}% isimli canlıyı 5x5 alanda yukarıya doğru 5 blok yüksekliğinde hapse attın!" to player
            if {_target} is a player:
                send "&cBir oyuncu tarafından 5x5 alanda demir parmaklıklarla hapsedildin!" to {_target}

            # 10 saniye bekle ve kafesi temizle
            wait 10 seconds
            loop {_blockList::*}:
                set block at loop-value to air
Bu şekilde denermiisn bide?
alta doğru kırıyor ve demir parmaklık koymuyor.
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Hala Discord sunucumuza katılmadın mı?

Büyük bir topluluğun parçası ol, etkinliklere katıl ve özel hediyeler kazanma şansı yakala!

Şimdi Katıl
Üst