Cem03

--- 📎 Attached 1 file(s):

File: pasted-code-1790484728236.txt

txt
Sen TEKCHUNK adında bir Skript istemiştin.

İstediğin özellikler şunlardı:

/tekchunk set → Adminin bulunduğu chunk'ı otomatik olarak 16x16 hedef alan olarak ayarlayacak.
/tekchunk setspawn → Yenileme sırasında oyuncuların gönderileceği güvenli noktayı belirleyecek.
arena1.schem → arena16.schem arasında toplam 16 schematic olacak.
Schematicler plugins/WorldEdit/schematics/ klasöründe olacak.
15 dakikada bir mevcut alan temizlenip sıradaki schematic WorldEdit ile yapıştırılacak.
Sıralama arena1 → arena2 → ... → arena16 → arena1 şeklinde dönecek.
Yenileme başlamadan önce chunk'ın içindeki oyuncular setspawn noktasına ışınlanacak.
Yenileme devam ederken oyuncu chunk'a girmeye çalışırsa tekrar güvenli noktaya atılacak.
/tekchunk reset → 15 dakikayı beklemeden hemen sıradaki schematic'i değiştirecek ve süreyi yeniden başlatacak.
/tekchunk start → sistemi başlatacak.
/tekchunk stop → sistemi durduracak.
/tekchunk info → mevcut ayarları gösterecek.
/tekchunk settime <dakika> → otomatik yenileme süresini değiştirecek.
Yetki: tekchunk.admin
Sistem adı: TEKCHUNK
Ayrıca özellikle tek parça, ``` kullanılmadan ve gereksiz ayraç/çubuk olmadan istemiştin.

Bir de önemli nokta vardı: WorldEdit'in schematic'i tam olarak o 16×16 chunk'a oturtması, schematiclerin oluşturulurken aynı origin/konum mantığıyla hazırlanmasına bağlı olabilir.

📎 1 file 1,339 chars
📄
pasted-code-1790484755421.txt
txt 22 lines
▶
Sen TEKCHUNK adında bir Skript istemiştin.

İstediğin özellikler şunlardı:

/tekchunk set → Adminin bulunduğu chunk'ı otomatik olarak 16x16 hedef alan olarak ayarlayacak.
/tekchunk setspawn → Yenileme sırasında oyuncuların gönderileceği güvenli noktayı belirleyecek.
arena1.schem → arena16.schem arasında toplam 16 schematic olacak.
Schematicler plugins/WorldEdit/schematics/ klasöründe olacak.
15 dakikada bir mevcut alan temizlenip sıradaki schematic WorldEdit ile yapıştırılacak.
Sıralama arena1 → arena2 → ... → arena16 → arena1 şeklinde dönecek.
Yenileme başlamadan önce chunk'ın içindeki oyuncular setspawn noktasına ışınlanacak.
Yenileme devam ederken oyuncu chunk'a girmeye çalışırsa tekrar güvenli noktaya atılacak.
/tekchunk reset → 15 dakikayı beklemeden hemen sıradaki schematic'i değiştirecek ve süreyi yeniden başlatacak.
/tekchunk start → sistemi başlatacak.
/tekchunk stop → sistemi durduracak.
/tekchunk info → mevcut ayarları gösterecek.
/tekchunk settime  → otomatik yenileme süresini değiştirecek.
Yetki: tekchunk.admin
Sistem adı: TEKCHUNK
Ayrıca özellikle tek parça, ``` kullanılmadan ve gereksiz ayraç/çubuk olmadan istemiştin.

Bir de önemli nokta vardı: WorldEdit'in schematic'i tam olarak o 16×16 chunk'a oturtması, schematiclerin oluşturulurken aynı origin/konum mantığıyla hazırlanmasına bağlı olabilir.
Kodari AI
KodariSep 27 at 4:53 am 1
TekChunkArenaRotator
TEKCHUNK is a Minecraft Skript system that manages a 16x16 chunk-based arena. Admins set the target chunk and a safe spawn point. Every 15 minutes, the system clears the area and uses WorldEdit to paste the next schematic from arena1 to arena16, cycling continuously. Players inside the chunk are teleported to the safe point before each refresh, and any player attempting to enter during the refresh is sent back. Commands include /tekchunk set, setspawn, reset, start, stop, info, and settime, all restricted to the tekchunk.admin permission. The system ensures schematics align perfectly with the chunk origin for accurate placement.

plugins/SkriptDosyayı/scripts/TEKCHUNK.sk içine koyup /sk reload TEKCHUNK çalıştır. WorldEdit yetkisi olan en az bir oyuncu çevrim sırasında çevrimiçi olmalı; schematic dosyaları plugins/WorldEdit/schematics/ klasöründe bulunmalı.

Cem03

[07:54:13 INFO]: [Skript] Reloading the config, aliases and all scripts... [07:54:13 INFO]: [Skript] Loaded 5750 aliases in 206ms [07:54:13 INFO]: Line 65: (chunk.sk) [07:54:13 INFO]:

A return statement after a delay is useless, as the calling trigger will resume when the delay starts (and won't get any returned value) [07:54:13 INFO]:

Line: return true [07:54:13 INFO]: [07:54:13 INFO]:

Encountered 1 error while reloading the config, aliases and all scripts! (292ms)

Kodari AI
KodariSep 27 at 4:54 am 1

tekchunk_refresh fonksiyonu gecikmeli işlemlerden sonra boolean döndürmeye çalışıyordu. Boolean dönüşünü kaldırıp çağrıları buna göre güncelledim; /tekchunk reset artık yenilemenin başlatıldığını bildiriyor.

Güncellenen dosyayı sunucudaki chunk.sk dosyanıza kopyalayıp /sk reload chunk çalıştırın.

Cem03

yorumda ekle nasıl çalışıyor bu

Kodari AI
KodariSep 27 at 4:55 am 1

TEKCHUNK.sk dosyasına Türkçe açıklama yorumları ekledim. Yorumlar kurulum değişkenlerini, hedef chunk ve güvenli nokta ayarlarını, arena sırasını, geri sayımı ve oyuncuların yenileme sırasında nasıl taşındığını anlatıyor.

Dosyayı plugins/Skript/scripts/ klasörüne koyup /sk reload TEKCHUNK çalıştır.

Cem03

Komut listesinde altın not olarak ekel

Kodari AI
KodariSep 27 at 4:55 am 1

Komut yardımına altın renkte not eklendi: /start geri sayımı başlatır, süre dolunca sıradaki arena yüklenir; /reset ise beklemeden sıradaki arenaya geçer. TEKCHUNK.sk dosyasını sunucuya kopyalayıp /sk reload TEKCHUNK çalıştır.

Cem03

komut listesine bana yz

Kodari AI
KodariSep 27 at 4:56 am 1

/tekchunk yazınca artık tüm komutlar açıklamalarıyla listeleniyor; altın renkli notta /start ve /reset farkı da belirtiliyor. Dosyayı sunucudaki plugins/Skript/scripts/TEKCHUNK.sk üzerine kopyalayıp /sk reload TEKCHUNK çalıştır.

Cem03

ada1 ada2 ada3 ada4 diye schematicleri ayarlar böyle 10 tane listele

Kodari AI
KodariSep 27 at 4:58 am 1
  • Schematic adlarını ada1.schem–ada10.schem olarak değiştireceğim.

  • Döngüyü 10 adaya göre ayarlayıp komut yardımında ve info çıktısında yeni listeyi göstereceğim.

TEKCHUNK.sk artık ada1.schem–ada10.schem dosyalarını sırayla yükleyip 10’dan sonra ada1’e dönecek şekilde güncellendi. Komut listesinde 10 schematic’in tamamı gösteriliyor.

Dosyayı plugins/Skript/scripts/TEKCHUNK.sk içine kopyalayıp /sk reload TEKCHUNK çalıştır.

Cem03

Hayır konu şu schematic listesinde copy benim belirlediğim chunk içine yapıştıracak

Kodari AI
KodariSep 27 at 7:57 am 1

Anladım: ada1.schem–ada10.schem sadece sırayla yüklenecek dosyalar; hepsi /tekchunk set ile belirlediğin aynı chunk’a yapıştırılacak. Yenileme sırasında Skript, WorldEdit komutlarını çalıştıran oyuncuyu kayıtlı hedef konuma ışınlayıp o chunk’ı temizliyor ve schematic’i oraya yapıştırıyor. Yani oyuncunun yenileme anındaki konumu hedef olarak kullanılmıyor.

Schematic’lerin hedef chunk’a tam oturması için oluşturulurken origin noktalarının aynı olması ve alanlarının 16×16 chunk sınırlarını aşmaması gerekir.

Kodari can make mistakes. Review important code before using.
Files
TEKCHUNK.sk
Code
1 218
TEKCHUNK.sk
# TEKCHUNK
# Gereksinim: Skript ve WorldEdit
# Schematic dosyaları: plugins/WorldEdit/schematics/ada1.schem - ada10.schem
# Kurulumdan sonra: /sk reload TEKCHUNK
# Komutlar tekchunk.admin yetkisi ister. Önce hedef alanı ve güvenli noktayı ayarlayın.

options:
    prefix: &6[TEKCHUNK]&r

# Süre ve ada sırası kayıtlı değişkenlerdir; script yeniden yüklenince çalışma durumu sıfırlanır.
on script load:
    if {tekchunk.time} is not set:
        set {tekchunk.time} to 15
    if {tekchunk.index} is not set:
        set {tekchunk.index} to 0
    set {tekchunk.running} to false
    set {tekchunk.busy} to false
    delete {tekchunk.executor}

# Konumun ayarlanan dünyada ve hedef chunk'ın 16x16 yatay sınırları içinde olup olmadığını kontrol eder.
function tekchunk_is_inside(loc: location) :: boolean:
    if {tekchunk.world} is not set:
        return false
    if {tekchunk.minX} is not set:
        return false
    if world of {_loc} is not {tekchunk.world}:
        return false
    if x-coordinate of {_loc} < {tekchunk.minX}:
        return false
    if x-coordinate of {_loc} > {tekchunk.minX} + 15:
        return false
    if z-coordinate of {_loc} < {tekchunk.minZ}:
        return false
    if z-coordinate of {_loc} > {tekchunk.minZ} + 15:
        return false
    return true

# Oyuncuları hedef alandan çıkarır, sıradaki schem'i WorldEdit ile yükleyip chunk'a yapıştırır.
# WorldEdit komutlarını çalıştırabilmesi için çağrıyı yapan oyuncunun WorldEdit erişimi olmalıdır.
function tekchunk_refresh(executor: player):
    if {tekchunk.world} is not set:
        send "{@prefix} &cÖnce /tekchunk set kullanmalısın." to {_executor}
        stop
    if {tekchunk.spawn} is not set:
        send "{@prefix} &cÖnce /tekchunk setspawn kullanmalısın." to {_executor}
        stop

    set {tekchunk.busy} to true
    set {tekchunk.executor} to name of {_executor}

    # Yenileme öncesinde hedef chunk'ın içindeki oyuncuları güvenli noktaya taşır.
    loop all players:
        if tekchunk_is_inside(location of loop-player) is true:
            teleport loop-player to {tekchunk.spawn}

    # Ada numarasını 1-10 arasında döndürür.
    set {_next} to {tekchunk.index} + 1
    if {_next} > 10:
        set {_next} to 1

    # WorldEdit seçimini hedef chunk'a alır, içini temizler ve sıradaki ada schematic'ini yapıştırır.
    teleport {_executor} to {tekchunk.paste}
    make {_executor} execute command "//schem load ada%{_next}%"
    make {_executor} execute command "//chunk"
    make {_executor} execute command "//set air"
    teleport {_executor} to {tekchunk.paste}
    make {_executor} execute command "//paste"

    # Son kullanılan ada numarasını kaydeder ve komut uygulayıcısını güvenli noktaya yollar.
    set {tekchunk.index} to {_next}
    teleport {_executor} to {tekchunk.spawn}
    delete {tekchunk.executor}
    set {tekchunk.busy} to false

command /tekchunk [<text>] [<integer>]:
    permission: tekchunk.admin
    permission message: {@prefix} &cBu komutu kullanma yetkin yok.
    trigger:
        if arg-1 is not set:
            send "{@prefix} &6&lTEKCHUNK Komut Listesi" to player
            send "{@prefix} &e/tekchunk set &7- Bulunduğun chunk'ı hedef alan yapar." to player
            send "{@prefix} &e/tekchunk setspawn &7- Güvenli ışınlanma noktasını ayarlar." to player
            send "{@prefix} &e/tekchunk start &7- Otomatik yenileme geri sayımını başlatır." to player
            send "{@prefix} &e/tekchunk stop &7- Otomatik yenilemeyi durdurur." to player
            send "{@prefix} &e/tekchunk reset &7- Beklemeden sıradaki arenayı yükler." to player
            send "{@prefix} &e/tekchunk info &7- Sistem ayarlarını ve durumunu gösterir." to player
            send "{@prefix} &e/tekchunk settime <dakika> &7- Yenileme süresini ayarlar." to player
            send "{@prefix} &eSchematic sırası: &fada1.schem, ada2.schem, ada3.schem, ada4.schem, ada5.schem, ada6.schem, ada7.schem, ada8.schem, ada9.schem, ada10.schem" to player
            send "{@prefix} &6Not: &e/start geri sayımı başlatır; süre dolunca sıradaki ada yüklenir. /reset beklemeden sıradaki adaya geçer." to player
            stop

        if arg-1 is "set":
            # Oyuncunun bulunduğu chunk'ın kuzeybatı başlangıç koordinatını bulur.
            set {_minX} to floor(x-coordinate of player / 16) * 16
            set {_minZ} to floor(z-coordinate of player / 16) * 16
            set {_pasteY} to floor(y-coordinate of player)
            set {tekchunk.minX} to {_minX}
            set {tekchunk.minZ} to {_minZ}
            set {tekchunk.world} to world of player
            set {tekchunk.paste} to location at {_minX}, {_pasteY}, {_minZ} in world of player
            send "{@prefix} &aHedef chunk ayarlandı. Dünya: &f%world of player% &aBaşlangıç: &f%{_minX}%, %{_pasteY}%, %{_minZ}%" to player
            stop

        if arg-1 is "setspawn":
            # Yenileme sırasında oyuncuların gönderileceği, hedef alan dışındaki konumu kaydeder.
            if {tekchunk.world} is set:
                if tekchunk_is_inside(location of player) is true:
                    send "{@prefix} &cGüvenli nokta hedef chunk'ın dışında olmalı." to player
                    stop
            set {tekchunk.spawn} to location of player
            send "{@prefix} &aGüvenli nokta ayarlandı." to player
            stop

        if arg-1 is "start":
            if {tekchunk.world} is not set:
                send "{@prefix} &cÖnce /tekchunk set kullanmalısın." to player
                stop
            if {tekchunk.spawn} is not set:
                send "{@prefix} &cÖnce /tekchunk setspawn kullanmalısın." to player
                stop
            if {tekchunk.running} is true:
                send "{@prefix} &eSistem zaten çalışıyor." to player
                stop
            set {tekchunk.running} to true
            # Start yalnızca geri sayımı başlatır; ilk otomatik yenileme süre dolunca yapılır.
            set {tekchunk.remaining} to {tekchunk.time} * 60
            send "{@prefix} &aSistem başlatıldı. Yenileme aralığı: &f%{tekchunk.time}% dakika." to player
            stop

        if arg-1 is "stop":
            set {tekchunk.running} to false
            delete {tekchunk.remaining}
            send "{@prefix} &cSistem durduruldu." to player
            stop

        if arg-1 is "reset":
            if {tekchunk.world} is not set:
                send "{@prefix} &cÖnce /tekchunk set kullanmalısın." to player
                stop
            if {tekchunk.spawn} is not set:
                send "{@prefix} &cÖnce /tekchunk setspawn kullanmalısın." to player
                stop
            # Beklemeden sıradaki adaya geçer; sistem çalışıyorsa geri sayımı baştan başlatır.
            tekchunk_refresh(player)
            if {tekchunk.running} is true:
                set {tekchunk.remaining} to {tekchunk.time} * 60
            send "{@prefix} &aYenileme işlemi başlatıldı." to player
            stop

        if arg-1 is "settime":
            if arg-2 is not set:
                send "{@prefix} &cKullanım: /tekchunk settime <dakika>" to player
                stop
            if arg-2 <= 0:
                send "{@prefix} &cSüre 0'dan büyük olmalı." to player
                stop
            set {tekchunk.time} to arg-2
            # Çalışan sistemde yeni süre hemen yeni geri sayım olarak uygulanır.
            if {tekchunk.running} is true:
                set {tekchunk.remaining} to {tekchunk.time} * 60
            send "{@prefix} &aYenileme süresi &f%{tekchunk.time}% dakika &aolarak ayarlandı." to player
            stop

        if arg-1 is "info":
            send "&6--- TEKCHUNK Bilgileri ---" to player
            if {tekchunk.world} is set:
                send "&eDünya: &f%{tekchunk.world}%" to player
                send "&eChunk başlangıcı: &f%{tekchunk.minX}%, %{tekchunk.minZ}%" to player
            else:
                send "&eHedef chunk: &cAyarlanmamış" to player
            if {tekchunk.spawn} is set:
                send "&eGüvenli nokta: &aAyarlanmış" to player
            else:
                send "&eGüvenli nokta: &cAyarlanmamış" to player
            send "&eSon kullanılan ada: &fada%{tekchunk.index}%" to player
            send "&eYenileme aralığı: &f%{tekchunk.time}% dakika" to player
            if {tekchunk.running} is true:
                send "&eDurum: &aÇalışıyor" to player
            else:
                send "&eDurum: &cDurduruldu" to player
            stop

        send "{@prefix} &cBilinmeyen işlem. Komut listesini görmek için /tekchunk yaz." to player

every 1 second:
    # Geri sayım bittiğinde çevrimiçi bir yetkili seçer; yetkili yoksa bir saniye sonra tekrar dener.
    if {tekchunk.running} is true:
        remove 1 from {tekchunk.remaining}
        if {tekchunk.remaining} <= 0:
            delete {_executor}
            loop all players:
                if loop-player has permission "tekchunk.admin":
                    set {_executor} to loop-player
                    stop loop
            if {_executor} is set:
                if {tekchunk.world} is set:
                    if {tekchunk.spawn} is set:
                        tekchunk_refresh({_executor})
                        set {tekchunk.remaining} to {tekchunk.time} * 60
                    else: