İstek Oto Chestin içindekileri satma

yavuz55sc

Zombi Katili
Mesajlar
186
En iyi cevaplar
0
Beğeniler
105
Puanları
540
Ruh hali
Merhaba bilmiş olduğunuz üzere autosell plugini var. Bu plugin chestin içindeki itemleri belirlediğiniz fiyata satmanıza yardımcı oluyor. Bu plugin çok fazla performans düşürüyor sunucuda. Bu sistemi skripte uyarlamak istedim fakat 2-3 uğraşmama rağmen yapamadım. Yardımcı olabilecek arkadaşlar varsa çok sevinirim.
 


LordOfTürk

Bööö!
Site İK Yöneticisi
Mesajlar
1,214
En iyi cevaplar
83
Beğeniler
973
Puanları
4,290
Ruh hali
Bende böyle bir konu açmıştım bu sk yı verdiler ama ne hikmetse herkezde çalışıyor bende çalışmıyor hata vermediği halde sende bir dene .
Kod:
options:

    p: &eHover&fCraft &c> #Mesaj başlarındaki prefix

    cubukismi: &eSatış Çubuğu #Sandıktaki itemleri satmak için tıklanılacak çubuğun ismi

    1demirfiyati: 3000 #1 demirin satma fiyatı

    1altinfiyati: 4000 #1 altının satma fiyatı

    1elmasfiyati: 5000 #1 elmasın satma fiyatı

    1zumrutfiyati: 6000 #1 zümrütün satma fiyatı

    1demirblock: 27000 #1 demir bloğunun satma fiyatı

    1goldblock: 36000 #1 altın bloğunun satma fiyatı

    1diablock: 45000 #1 elmas bloğunun satma fiyatı

    1zumrutblock: 54000 #1 zümrüt bloğunun satma fiyatı



command /çubuk:

    trigger:

        give 1 stick named "{@cubukismi}" to player

on leftclick on chest with stick:

    if name of player's tool is "{@cubukismi}":

        if {chests::%player%::*} contains location of clicked chest:

            if clicked chest contains iron ingot:

                set {_itemcounti} to number of all iron ingots in clicked chest

                remove {_itemcounti} of iron ingots from clicked chest's inventory

                add {@1demirfiyati} * {_itemcounti} to the player's money

                send "{@p} &a%{_itemcounti}% demir satıldı. Kazanılan para: &c%{@1demirfiyati} * {_itemcounti}%"

            if clicked chest contains gold ingot:

                set {_itemcountg} to number of all gold ingots in clicked chest

                remove {_itemcountg} of gold ingots from clicked chest's inventory

                add {@1altinfiyati} * {_itemcountg} to the player's money

                send "{@p} &a%{_itemcountg}% altın satıldı. Kazanılan para: &c%{@1altinfiyati} * {_itemcountg}%"

            if clicked chest contains diamond:

                set {_itemcountd} to number of all diamonds in clicked chest

                remove {_itemcountd} of diamonds from clicked chest's inventory

                add {@1elmasfiyati} * {_itemcountd} to the player's money

                send "{@p} &a%{_itemcountd}% elmas satıldı. Kazanılan para: &c%{@1elmasfiyati} * {_itemcountd}%"

            if clicked chest contains emerald:

                set {_itemcounte} to number of all emeralds in clicked chest

                remove {_itemcounte} of emeralds from clicked chest's inventory

                add {@1zumrutfiyati} * {_itemcounte} to the player's money

                send "{@p} &a%{_itemcounte}% zümrüt satıldı. Kazanılan para: &c%{@1zumrutfiyati} * {_itemcounte}%"

            if clicked chest contains iron block:

                set {_itemcountib} to number of all iron blocks in clicked chest

                remove {_itemcountib} of iron blocks from clicked chest's inventory

                add {@1demirblock} * {_itemcountib} to the player's money

                send "{@p} &a%{_itemcountib}% demir blok satıldı. Kazanılan para: &c%{@1demirblock} * {_itemcountib}%"

            if clicked chest contains gold block:

                set {_itemcountgb} to number of all gold blocks in clicked chest

                remove {_itemcountgb} of gold blocks from clicked chest's inventory

                add {@1goldblock} * {_itemcountgb} to the player's money

                send "{@p} &a%{_itemcountgb}% altın blok satıldı. Kazanılan para: &c%{@1goldblock} * {_itemcountgb}%"

            if clicked chest contains diamond block:

                set {_itemcountdb} to number of all diamond blocks in clicked chest

                remove {_itemcountdb} of diamond blocks from clicked chest's inventory

                add {@1diablock} * {_itemcountdb} to the player's money

                send "{@p} &a%{_itemcountdb}% elmas blok satıldı. Kazanılan para: &c%{@1diablock} * {_itemcountdb}%"

            if clicked chest contains emerald block:

                set {_itemcounteb} to number of all emerald blocks in clicked chest

                remove {_itemcounteb} of emerald blocks from clicked chest's inventory

                add {@1zumrutblock} * {_itemcounteb} to the player's money

                send "{@p} &a%{_itemcounteb}% zümrüt blok satıldı. Kazanılan para: &c%{@1zumrutblock} * {_itemcounteb}%"

        else:

            send "{@p} &aSadece kendi sandığındaki madenleri satabilirsin."

 

on place of chest:

    add event-block's location to {chests::%player%::*}

on break of chest:

    if {chest::%player%::*} contains event-block's location:

        remove event-block's location from {chests::%player%::*}
 

yavuz55sc

Zombi Katili
Mesajlar
186
En iyi cevaplar
0
Beğeniler
105
Puanları
540
Ruh hali
Fakat ben çubuklu sistem yapmak istemiyorum. Chest koyduğunda bu chestin içindekilerin 30 saniyede bir belirlediğimiz fiyata satılmasını istiyorum.
 

LifeMCServer

Nether Yerlisi
Mesajlar
2,410
En iyi cevaplar
98
Beğeniler
2,461
Puanları
10,250
Ruh hali
Bırakta bir şeyi de kendileri yapsın. Satmayı otomatik yap oyunu kolaylaştır ne anlamı kaldı? Plugin performans kaybı yapıyor ise skript daha fazla yapacaktır zaten.
 

yavuz55sc

Zombi Katili
Mesajlar
186
En iyi cevaplar
0
Beğeniler
105
Puanları
540
Ruh hali
Merak etme kendime ait çok fazla skriptim var. Bunlada 2-3 gündür gecelere kadar uğraşıyorum fakat yapamadım ondan yardım istedim. Plugin performans kaybı yapıyor çünkü herkese özel tick sayıyor. Bunda herkesin ki eşit olucak tüm chestler aynanda satılacağı için performans düşüşü olmucak...
 

Darkkandadr

❌⚖❌ Everybody knows the good guys lost...
Emektar Üye
Mesajlar
483
En iyi cevaplar
0
Beğeniler
733
Puanları
960
Ruh hali
Bende böyle bir konu açmıştım bu sk yı verdiler ama ne hikmetse herkezde çalışıyor bende çalışmıyor hata vermediği halde sende bir dene .
Kod:
options:

    p: &eHover&fCraft &c> #Mesaj başlarındaki prefix

    cubukismi: &eSatış Çubuğu #Sandıktaki itemleri satmak için tıklanılacak çubuğun ismi

    1demirfiyati: 3000 #1 demirin satma fiyatı

    1altinfiyati: 4000 #1 altının satma fiyatı

    1elmasfiyati: 5000 #1 elmasın satma fiyatı

    1zumrutfiyati: 6000 #1 zümrütün satma fiyatı

    1demirblock: 27000 #1 demir bloğunun satma fiyatı

    1goldblock: 36000 #1 altın bloğunun satma fiyatı

    1diablock: 45000 #1 elmas bloğunun satma fiyatı

    1zumrutblock: 54000 #1 zümrüt bloğunun satma fiyatı



command /çubuk:

    trigger:

        give 1 stick named "{@cubukismi}" to player

on leftclick on chest with stick:

    if name of player's tool is "{@cubukismi}":

        if {chests::%player%::*} contains location of clicked chest:

            if clicked chest contains iron ingot:

                set {_itemcounti} to number of all iron ingots in clicked chest

                remove {_itemcounti} of iron ingots from clicked chest's inventory

                add {@1demirfiyati} * {_itemcounti} to the player's money

                send "{@p} &a%{_itemcounti}% demir satıldı. Kazanılan para: &c%{@1demirfiyati} * {_itemcounti}%"

            if clicked chest contains gold ingot:

                set {_itemcountg} to number of all gold ingots in clicked chest

                remove {_itemcountg} of gold ingots from clicked chest's inventory

                add {@1altinfiyati} * {_itemcountg} to the player's money

                send "{@p} &a%{_itemcountg}% altın satıldı. Kazanılan para: &c%{@1altinfiyati} * {_itemcountg}%"

            if clicked chest contains diamond:

                set {_itemcountd} to number of all diamonds in clicked chest

                remove {_itemcountd} of diamonds from clicked chest's inventory

                add {@1elmasfiyati} * {_itemcountd} to the player's money

                send "{@p} &a%{_itemcountd}% elmas satıldı. Kazanılan para: &c%{@1elmasfiyati} * {_itemcountd}%"

            if clicked chest contains emerald:

                set {_itemcounte} to number of all emeralds in clicked chest

                remove {_itemcounte} of emeralds from clicked chest's inventory

                add {@1zumrutfiyati} * {_itemcounte} to the player's money

                send "{@p} &a%{_itemcounte}% zümrüt satıldı. Kazanılan para: &c%{@1zumrutfiyati} * {_itemcounte}%"

            if clicked chest contains iron block:

                set {_itemcountib} to number of all iron blocks in clicked chest

                remove {_itemcountib} of iron blocks from clicked chest's inventory

                add {@1demirblock} * {_itemcountib} to the player's money

                send "{@p} &a%{_itemcountib}% demir blok satıldı. Kazanılan para: &c%{@1demirblock} * {_itemcountib}%"

            if clicked chest contains gold block:

                set {_itemcountgb} to number of all gold blocks in clicked chest

                remove {_itemcountgb} of gold blocks from clicked chest's inventory

                add {@1goldblock} * {_itemcountgb} to the player's money

                send "{@p} &a%{_itemcountgb}% altın blok satıldı. Kazanılan para: &c%{@1goldblock} * {_itemcountgb}%"

            if clicked chest contains diamond block:

                set {_itemcountdb} to number of all diamond blocks in clicked chest

                remove {_itemcountdb} of diamond blocks from clicked chest's inventory

                add {@1diablock} * {_itemcountdb} to the player's money

                send "{@p} &a%{_itemcountdb}% elmas blok satıldı. Kazanılan para: &c%{@1diablock} * {_itemcountdb}%"

            if clicked chest contains emerald block:

                set {_itemcounteb} to number of all emerald blocks in clicked chest

                remove {_itemcounteb} of emerald blocks from clicked chest's inventory

                add {@1zumrutblock} * {_itemcounteb} to the player's money

                send "{@p} &a%{_itemcounteb}% zümrüt blok satıldı. Kazanılan para: &c%{@1zumrutblock} * {_itemcounteb}%"

        else:

            send "{@p} &aSadece kendi sandığındaki madenleri satabilirsin."



on place of chest:

    add event-block's location to {chests::%player%::*}

on break of chest:

    if {chest::%player%::*} contains event-block's location:

        remove event-block's location from {chests::%player%::*}
O skript'i ben yapmıştım güncelledim bir variable ismini yanlış girmişim Minecraft Madenleri Çubuk İle Sandığa Tıklayarak Satmak
 

LifeMCServer

Nether Yerlisi
Mesajlar
2,410
En iyi cevaplar
98
Beğeniler
2,461
Puanları
10,250
Ruh hali
Merak etme kendime ait çok fazla skriptim var. Bunlada 2-3 gündür gecelere kadar uğraşıyorum fakat yapamadım ondan yardım istedim. Plugin performans kaybı yapıyor çünkü herkese özel tick sayıyor. Bunda herkesin ki eşit olucak tüm chestler aynanda satılacağı için performans düşüşü olmucak...

Ben sana demedim bir şeyi de kendileri yapsınlar lafını, oyunculara ithafen dedim. Chestleri otomatik satma olayını nasıl yaparsan yap lag yapacaktır, tamamen gereksiz bir olay. Bir otomatik satış sistemi yaparsın sağ tıkladığında veya belli aralıklarla tüm oyuncuları looplayıp hepsinin itemlerini satar, satılıp satılmayacak itemleri de GUI üzerinden ayarlar. Sandığın içindekini otomatik satmaya kalkar isen oyun çok kolaylaşır, ekonomi bozulur ve laga sebebiyet verir.
 

AdexTR

Muvaffakiyetsizleştiriveremeyebileceklerimizdenmiş
Emekli
Mesajlar
3,619
En iyi cevaplar
98
Beğeniler
5,539
Puanları
9,180
Ruh hali
Tam olarak ne istediğinizi anlayamadım. Eğer çubuk olmasını istemiyorsanız eventi ayrıntısız hale getirip şartı çıkarabilirsiniz.
 

yavuz55sc

Zombi Katili
Mesajlar
186
En iyi cevaplar
0
Beğeniler
105
Puanları
540
Ruh hali
1 Adam (örnek: otosat sandığın ismi) koyduğunda bu chest onun üstünde olcak ama ismi varsa. Daha sonra 90 saniyede bir bu chestin içindekiler satılacak ve adama parası gelicek. Bu kadar
 

yavuz55sc

Zombi Katili
Mesajlar
186
En iyi cevaplar
0
Beğeniler
105
Puanları
540
Ruh hali
Kod:
on place of chest:
    if tool's display name is "&3&lS&C&LC&B&LSAT":
        set {%player%.scsat1} to true
        set {%player%::scsat::*} to location of event-block
        set {%player%.scsat1} to chest named "&3&lS&C&LC&B&LSAT"
        create holo object "&e&l90 &bsaniye sonra satılacak &a&l%player%!" with id "%location%" at location 1 meters above event-block

on break of chest:
    if {%player%.scsat} is set:
        delete holo object "%location%"   
        delete {%player%.scsat}

every 5 seconds in "askyblock":
    loop all players:
        loop all items in block at {%player%::scsat::*}'s inventory:
            add loop-item to loop-player
            wait 1 second
            execute loop-player command "sat"

Şimdi bu skript hata vermiyor ama "loop all items in block at {%player%::scsat::*}'s inventory:" kısmında sanırsam bir hata yaptım ve bundan dolayı çalışmıyor. Bunu düzeltip atabilirmisiniz?
 

LifeMCServer

Nether Yerlisi
Mesajlar
2,410
En iyi cevaplar
98
Beğeniler
2,461
Puanları
10,250
Ruh hali
Kod:
on place of chest:
    if tool's display name is "&3&lS&C&LC&B&LSAT":
        set {%player%.scsat1} to true
        set {%player%::scsat::*} to location of event-block
        set {%player%.scsat1} to chest named "&3&lS&C&LC&B&LSAT"
        create holo object "&e&l90 &bsaniye sonra satılacak &a&l%player%!" with id "%location%" at location 1 meters above event-block

on break of chest:
    if {%player%.scsat} is set:
        delete holo object "%location%" 
        delete {%player%.scsat}

every 5 seconds in "askyblock":
    loop all players:
        loop all items in block at {%player%::scsat::*}'s inventory:
            add loop-item to loop-player
            wait 1 second
            execute loop-player command "sat"

Şimdi bu skript hata vermiyor ama "loop all items in block at {%player%::scsat::*}'s inventory:" kısmında sanırsam bir hata yaptım ve bundan dolayı çalışmıyor. Bunu düzeltip atabilirmisiniz?

Şunu deneyebilirsin, sadece düzeltmeye çalıştım sat komutu ne yapıyor veya neden 90 saniye yazdın bilmiyorum ama 5 saniyede bir yapması lazım şu an.

PHP:
on place of chest:
    if display name of tool is "&3&lS&c&lC&b&lSAT":
        set {scsat::%player%::%location of event-block%} to location of event-block
        create holo object "&e&l90 &bsaniye sonra satılacak &a&l%player%!" with id "%location of event-block%" at location 1 meters above event-block
on break of chest:
    if {scsat::%player%::%location of event-block%} is location of event-block:
        delete holo object "%location of event-block%"
        delete {scsat::%player%::%location of event-block%}
every 5 seconds in "askyblock":
    loop all players:
        loop {%player%::scsat::*}:
            set {_location} to loop-index
            set {_chest} to block at {_location}
            loop all items in inventory of {_chest}:
                add loop-item to loop-player
        execute loop-player command "sat"
 

yavuz55sc

Zombi Katili
Mesajlar
186
En iyi cevaplar
0
Beğeniler
105
Puanları
540
Ruh hali
1545418259960.png

Bu hatayı verdi ondan dolayı envantere aktarılmıyor itemler.
 

Progr4mm3r

Running in the memes
Mesajlar
382
En iyi cevaplar
0
Beğeniler
167
Puanları
800
Java eklentisi istemediğinize emin misiniz? Eklenti yapmak için vakit ayırabilirim. Ayrıca eklenti herkes için tick saymaz, sunucu tarafında tick sayar
 

javabey

git add Brain.java in/earth/people/brainless
Mesajlar
176
En iyi cevaplar
0
Beğeniler
180
Puanları
330
Ruh hali
plugin olmasına rağmen performans düşüyorsa skript olursa kim bilir ne yapar :D
 

Üst