Bulundu Attığım skriptin çalışan bir versiyonunu yapar mısınız?

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

Cosvox

Odunlara Vur Vur Vur!
Katılım
2 Mayıs 2025
Mesajlar
37
Elmaslar
1
Puan
895
Konum
Türkiye

Discord:

cosvox12

Kod:
options:
    # Hedef itemler ve komut şablonları
    targetItem1: "#04a4fbDomuz Spawner"
    targetItem1Command: "smartspawner give spawner %player% pig %amount%"

    targetItem2: "Zombi Spawner"
    targetItem2Command: "give %player% zombie_spawner %amount%"

on chat:
    # Örnek mesaj: "&aBaşarıyla 1 adet #04a4fbDomuz Spawner &aaldın."
    if message contains "adet":
        set {_p} to player
        set {_msg} to message

        # ── Satın alınan miktarı al (örn: "2 adet")
        set {_amount} to 1
        if {_msg} matches ".*\\d+ adet.*":
            set {_num::*} to {_msg} split at " adet"
            set {_amount} to {_num::1} parsed as number

        # ── Item 1 kontrol ──
        if {_msg} contains {@targetItem1}:
            # Konsol komutu oluştur
            set {_cmd} to {@targetItem1Command}
            replace "%player%" in {_cmd} with name of {_p}
            replace "%amount%" in {_cmd} with {_amount}
            execute console command {_cmd}

            stop

        # ── Item 2 kontrol ──
        if {_msg} contains {@targetItem2}:
            set {_cmd} to {@targetItem2Command}
            replace "%player%" in {_cmd} with name of {_p}
            replace "%amount%" in {_cmd} with {_amount}
            execute console command {_cmd}
            send "&aBaşarıyla %{_amount}% adet &#04a4fb%{_material}% &aaldın." to {_p} replace {_material} with {@targetItem2}
            stop
Chat GBT'den yapmasını istedim, böyle bir skript yazdı ama çalışmıyor.
 
Kod:
options:
    # Hedef itemler ve komut şablonları
    targetItem1: "#04a4fbDomuz Spawner"
    targetItem1Command: "smartspawner give spawner %player% pig %amount%"

    targetItem2: "Zombi Spawner"
    targetItem2Command: "give %player% zombie_spawner %amount%"

on chat:
    # Örnek mesaj: "&aBaşarıyla 1 adet #04a4fbDomuz Spawner &aaldın."
    if message contains "adet":
        set {_p} to player
        set {_msg} to message

        # ── Satın alınan miktarı al (örn: "2 adet")
        set {_amount} to 1
        if {_msg} matches ".*\\d+ adet.*":
            set {_num::*} to {_msg} split at " adet"
            set {_amount} to {_num::1} parsed as number

        # ── Item 1 kontrol ──
        if {_msg} contains {@targetItem1}:
            # Konsol komutu oluştur
            set {_cmd} to {@targetItem1Command}
            replace "%player%" in {_cmd} with name of {_p}
            replace "%amount%" in {_cmd} with {_amount}
            execute console command {_cmd}

            stop

        # ── Item 2 kontrol ──
        if {_msg} contains {@targetItem2}:
            set {_cmd} to {@targetItem2Command}
            replace "%player%" in {_cmd} with name of {_p}
            replace "%amount%" in {_cmd} with {_amount}
            execute console command {_cmd}
            send "&aBaşarıyla %{_amount}% adet &#04a4fb%{_material}% &aaldın." to {_p} replace {_material} with {@targetItem2}
            stop
Chat GBT'den yapmasını istedim, böyle bir skript yazdı ama çalışmıyor.
Skriptin temel amacı nedir anlatır mısınız?
 
Skriptin temel amacı nedir anlatır mısınız?
Skriptin temel amacı sohbette belirlediğim sunucu mesajı yazdığında oyuncunun envanterindeki belirlediğim itemin belirlediğim başka bir iteme dönüşmesi fakat bunu yaparken sayısını koruması.
 
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