Çözüldü Düzenleme

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

KanedgyBO

SkriptTale
Katılım
29 Mart 2018
Mesajlar
923
Elmaslar
382
Puan
14.575
Yaş
19
Konum
Bursa / Erikli
Minecraft
TheLudoBile

Discord:

TheLudoBile#3485

Bir skript yaptım, arada lag yaparmı diye düşündüm ve buraya yazdım, bitmemişti ama neyi yapacağımı gösterdim zaten... cevaplarsanız çok sevinirim
Kod:
on load:
    save yaml "plugins/Skript/Market/Değerler.yml" as "mc"
    yaml "mc" is empty:
        set yaml value "ornekfiyat" from "mc" to 100

command market [<text>]:
    trigger:
        arg 1 isn't set:
            open virtual chest with size 3 named "Market » Menü" to player
            make gui slot 11 of player with diamond named "&b• &eSatın Al &b•" with lore "", "&8» &7Buradan değişik katogorideki birçok eşyaları" and "&7belirli bir ücret karşılığında satın alabilirsin." to run function MEşyaAlM(player)
            make gui slot 15 of player with gold ingot named "&b• &eSat &b•" with lore "", "&8» &7Buradan para kazanmak için sahip olduğun" and "&7bazı eşyaları belirli bir ücret karşılığında satabilirsin." to run function MEşyaSatM(player)
           
function MEşyaAlM(p: player):
    open virtual chest with size 6 named "Market » Satın Al » Katogoriler" to {_p}
    make gui slot 22 of {_p} with glowing diamond sword named "&b• &6Savaşçı Aletleri &b•" to run function MEşyaAlKM({_p}, 8)
    make gui slot 13 of {_p} with glowing brewing stand named "&b• &6Simyacı Eşyaları &8- &6İksirler &b•"
    make gui slot 21 of {_p} with glowing brick block named "&b• &6İnşaa Blokları &b•"
    make gui slot 23 of {_p} with glowing cyan dye named "&b• &6Boyalar &b•"
    make gui slot 31 of {_p} with glowing redstone named "&b• &6Kızıltaş Eşyaları &b•"
    make gui slot 30 of {_p} with glowing diamond pickaxe named "&b• &6Aletler &b•"
    make gui slot 32 of {_p} with glowing wheat named "&b• &6Çiftlik &8- &6Yiyecek &b•"
    make gui slot 40 of {_p} with lava bucket named "&b• &6Çeşitli &b•"
   
function MEşyaAlKM(p: player, m: 1):
    {_m} is 1:
        open virtual chest with size 6 named "Market » Satın Al » Eşyalar - İksirler" to {_p}
        make gui slot 0 of {_p} with apple
    {_m} is 2:
        open virtual chest with size 6 named "Market » Satın Al » İnşaa Blokları" to {_p}
        make gui slot 0 of {_p} with apple
    {_m} is 3:
        open virtual chest with size 6 named "Market » Satın Al » Boyalar" to {_p}
        make gui slot 0 of {_p} with apple
    {_m} is 4:
        open virtual chest with size 6 named "Market » Satın Al » Kızıltaş Eşyaları" to {_p}
        make gui slot 0 of {_p} with apple
    {_m} is 5:
        open virtual chest with size 6 named "Market » Satın Al » Aletler" to {_p}
        make gui slot 0 of {_p} with apple
    {_m} is 6:
        open virtual chest with size 6 named "Market » Satın Al » Çiftlik - Yiyecek" to {_p}
        make gui slot 0 of {_p} with apple
    {_m} is 7:
        open virtual chest with size 6 named "Market » Satın Al » Çeşitli" to {_p}
        make gui slot 0 of {_p} with apple
    {_m} is 8:
        open virtual chest with size 6 named "Market » Satın Al » Savaşçı Aletleri" to {_p}
        make gui slot 0 of {_p} with leather helmet named "&aDeri Kask"
        make gui slot 0 of {_p} with leather helmet named "&aDeri Kask"
        make gui slot 0 of {_p} with leather helmet named "&aDeri Kask"
        make gui slot 0 of {_p} with leather helmet named "&aDeri Kask"
   
function MEşyaAlKM(p: player, m: 1):
    {_m} is 1:
        open virtual chest with size 6 named "Market » Satın Al » Eşyalar - İksirler" to {_p}
        make gui slot 0 of {_p} with apple
    {_m} is 2:
        open virtual chest with size 6 named "Market » Satın Al » İnşaa Blokları" to {_p}
        make gui slot 0 of {_p} with apple
    {_m} is 3:
        open virtual chest with size 6 named "Market » Satın Al » Boyalar" to {_p}
        make gui slot 0 of {_p} with apple
    {_m} is 4:
        open virtual chest with size 6 named "Market » Satın Al » Kızıltaş Eşyaları" to {_p}
        make gui slot 0 of {_p} with apple
    {_m} is 5:
        open virtual chest with size 6 named "Market » Satın Al » Aletler" to {_p}
        make gui slot 0 of {_p} with apple
    {_m} is 6:
        open virtual chest with size 6 named "Market » Satın Al » Çiftlik - Yiyecek" to {_p}
        make gui slot 0 of {_p} with apple
    {_m} is 7:
        open virtual chest with size 6 named "Market » Satın Al » Çeşitli" to {_p}
        make gui slot 0 of {_p} with apple
    {_m} is 8:
        open virtual chest with size 6 named "Market » Satın Al » Savaşçı Aletleri" to {_p}
        make gui slot 0 of {_p} with leather helmet named "&aDeri Kask"
        make gui slot 9 of {_p} with leather helmet named "&aDeri Göğüslük"
        make gui slot 18 of {_p} with leather helmet named "&aDeri Pantolon"
        make gui slot 27 of {_p} with leather helmet named "&aDeri Bot"
         
function eşyaSat(p: player, eşya: item, satılacak: number, ücret: number):
    if amount of {_i} in {_p}'s inventory is greater than or equal to {_n}:
        add (amount of {_i} in {_p}'s inventory * {_m}) to {_p}'s balance
        send "&bMaden &8&l» &aEnvanterindeki &f%{_n}% &e%{_i}% &asatıldı!" to {_p}
        remove {_n} of {_i} from {_p}'s inventory
    else:
        send "&bMaden &8&l» &cEnvanterinde yeterli eşya yok!" to {_p}
     
        set action bar of {_p} to "&4&l» &cBaşarısız &4&l«"
       
function madenSathepsi(p: player, i: item, m: number):
    if amount of {_i} in {_p}'s inventory is greater than 0:
        add (amount of {_i} in {_p}'s inventory * {_m}) to {_p}'s balance
        send "&bMaden &8&l» &aEnvanterindeki &f%amount of {_i} in {_p}'s inventory% &e%{_i}% &asatıldı!" to {_p}
        remove all {_i} from {_p}'s inventory
    else:
        send "&bMaden &8&l» &cEnvanterinde yeterli eşya yok!" to {_p}
     
function madenAl(p: player, i: item, a: number, m: number):
    if {_p}'s balance is greater than or equal to {_m}:
        remove ({_a} * {_m}) from {_p}'s balance
        give {_a} of {_i} to {_p}
        play sound "ENTITY_EXPERIENCE_ORB_PICKUP" to {_p} with volume 100 and pitch 1
        send "&bMaden &8&l» &aBaşarıyla &c%{_i}% &asatın aldınız!" to {_p}
    else:
        send "&bMaden &8&l» &cSatın almak için yeterli paranız bulunmamakta!" to {_p}
.
 
Son düzenleme:
Yapmaz kesinlikle hiç loop ve local variable dışında variable göremedim.
 
Yapmaz kesinlikle hiç loop ve local variable dışında variable göremedim.

teşekkürler, ben pek düşünmedim ama orada yazdığım şeyleri az daha kısaltmak mümkünmü? (method u soruyorum)
 

Skript içerisinde sunucunu yorabilecek ciddi bir şey göremedim. Bundan dolayı lag yapmayacağından emin olabilirsin :)
 
peki eşya fiyat variable larını yaml'yle değilde variables.csv kullansam lag yaparmı??
 




Büyük ihtimal yapmaz ama denemekte fayda var. Bu arada arkadaşın dediği gibi kendini tekrar eden şeyler lag yapar. ( Sizde yok. )

yorumun için teşekkürler, daha önce başka konuda çok daha değişik yorumlar almıştım benim için iyi oldu ;D
 
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