Skript Yardımı Lazım

YunusEmreGT

"Talk is cheap, show me the code."
En iyi cevaplar
2
Beyler sunucudaki en çok {totalkills.%player%} verisini ve o veriye sahip olan kişiyi nasıl başka bir veriye atarım?
Mesela sunucuda 2 kişi var. Birisinin {totalkills.%player%}'si 2, diğerininki 3. 3 olanın ismini {encokolduren}'a ve 3 sayısını {encokoldurme}'ye atayacağım.
Bilen yazarsa sevinirim.
 

LifeMCServer

Nether Yerlisi
En iyi cevaplar
98
Değişkeni {totalkills::%player%} şeklinde değiştirip top 10 mantıklı bir şey yapıp 1. yi ve değerini çekip başka değişkenlere atayacaksın.
İstediğin Skript:

PHP:
command /yap:
    trigger:
        loop {totalkills::*}:
            add 1 to {_size}
            if {_low.to.high.list::%loop-value%} is not set:
                set {_low.to.high.list::%loop-value%} to loop-index
            else:
                set {_n} to 0
                loop {_size} times:
                    set {_n} to {_n}+1
                    {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
                    set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
                    stop loop
        wait 1 tick
        set {_n} to size of {_low.to.high.list::*}
        loop {_low.to.high.list::*}:
            set {_high.to.low.list::%{_n}%} to loop-value
            set {_n} to {_n}-1
        wait 1 tick
        loop {_high.to.low.list::*}:
            add 1 to {_result}
            if loop-value is not "<player>":
                set {encokolduren} to "%loop-value%"
                set {encokoldurme} to "%{totalkills::%loop-value%}%"
            else:
                stop
            if {_result} is 1:
                stop
command /gonder:
    trigger:
        execute player command "yap"
        wait 4 ticks
        send "%{encokolduren}%"
        send "%{encokoldurme}%"
on death:
    if attacker is a player:
        if victim is a player:
            add 1 to {totalkills::%attacker%}

NOT: Sadece konuda istediğin şeyi yaptım fakat eğer amacın top 10 yapmak ise aşşağıdakini kullan.

PHP:
command /oldurmetop10:
    trigger:
        loop {totalkills::*}:
            add 1 to {_size}
            if {_low.to.high.list::%loop-value%} is not set:
                set {_low.to.high.list::%loop-value%} to loop-index
            else:
                set {_n} to 0
                loop {_size} times:
                    set {_n} to {_n}+1
                    {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
                    set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
                    stop loop
        wait 1 tick
        set {_n} to size of {_low.to.high.list::*}
        loop {_low.to.high.list::*}:
            set {_high.to.low.list::%{_n}%} to loop-value
            set {_n} to {_n}-1
        wait 1 tick
        message "&a&l&m------------- &6&lEn Çok Öldürenler Top 10 &a&l&m-------------"
        loop {_high.to.low.list::*}:
            add 1 to {_result}
            if loop-value is not "<player>":
                send "&b%loop-value%&7: &e%{totalkills::%loop-value%}% öldürme" to player
            else:
                stop
            if {_result} is 10:
                message "&a&l&m------------- &6&lEn Çok Öldürenler Top 10 &a&l&m-------------"
                stop
on death:
    if attacker is a player:
        if victim is a player:
            add 1 to {totalkills::%attacker%}
 

YunusEmreGT

"Talk is cheap, show me the code."
En iyi cevaplar
2
Değişkeni {totalkills::%player%} şeklinde değiştirip top 10 mantıklı bir şey yapıp 1. yi ve değerini çekip başka değişkenlere atayacaksın.
İstediğin Skript:

PHP:
command /yap:
    trigger:
        loop {totalkills::*}:
            add 1 to {_size}
            if {_low.to.high.list::%loop-value%} is not set:
                set {_low.to.high.list::%loop-value%} to loop-index
            else:
                set {_n} to 0
                loop {_size} times:
                    set {_n} to {_n}+1
                    {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
                    set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
                    stop loop
        wait 1 tick
        set {_n} to size of {_low.to.high.list::*}
        loop {_low.to.high.list::*}:
            set {_high.to.low.list::%{_n}%} to loop-value
            set {_n} to {_n}-1
        wait 1 tick
        loop {_high.to.low.list::*}:
            add 1 to {_result}
            if loop-value is not "<player>":
                set {encokolduren} to "%loop-value%"
                set {encokoldurme} to "%{totalkills::%loop-value%}%"
            else:
                stop
            if {_result} is 1:
                stop
command /gonder:
    trigger:
        execute player command "yap"
        wait 4 ticks
        send "%{encokolduren}%"
        send "%{encokoldurme}%"
on death:
    if attacker is a player:
        if victim is a player:
            add 1 to {totalkills::%attacker%}

NOT: Sadece konuda istediğin şeyi yaptım fakat eğer amacın top 10 yapmak ise aşşağıdakini kullan.

PHP:
command /oldurmetop10:
    trigger:
        loop {totalkills::*}:
            add 1 to {_size}
            if {_low.to.high.list::%loop-value%} is not set:
                set {_low.to.high.list::%loop-value%} to loop-index
            else:
                set {_n} to 0
                loop {_size} times:
                    set {_n} to {_n}+1
                    {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
                    set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
                    stop loop
        wait 1 tick
        set {_n} to size of {_low.to.high.list::*}
        loop {_low.to.high.list::*}:
            set {_high.to.low.list::%{_n}%} to loop-value
            set {_n} to {_n}-1
        wait 1 tick
        message "&a&l&m------------- &6&lEn Çok Öldürenler Top 10 &a&l&m-------------"
        loop {_high.to.low.list::*}:
            add 1 to {_result}
            if loop-value is not "<player>":
                send "&b%loop-value%&7: &e%{totalkills::%loop-value%}% öldürme" to player
            else:
                stop
            if {_result} is 10:
                message "&a&l&m------------- &6&lEn Çok Öldürenler Top 10 &a&l&m-------------"
                stop
on death:
    if attacker is a player:
        if victim is a player:
            add 1 to {totalkills::%attacker%}
Fakat ben senin yazdıklarını zaten yapabiliyorum. Ve asıl sorum da bu zaten. Top 10 'u {totalkills.%player%} değişkenine göre yapmam lazım. Sunucuda Öldürme değeri olarak bunu kullanıyorum.
 

Breakthrough

Obsidyen Madencisi
En iyi cevaplar
0
Galiba konuya "Liste veriablesi olmadan" notunu eklemeliyim.
Liste variablesi olmadan ne sıralama, ne dediğin ne de benzeri bir şey yapabilirsin.
Aktif oyuncuları looplayıp hepsinin öldürmelerini ayrı bir variableye önce kaydedilen variableden yüksekse biçiminde kontrol ederek aktif olan en yüksek öldürmeye sahip oyuncuyu bulabilirsin.
 

NoHaxJustTMG

Taş Madencisi
En iyi cevaplar
0
Leaderheads kullanabilirsin, sonra leaderheads için ayarladağın tabelalar için skriptte bir kod yazarsın ve ayarladığın tabelalardan isim çekersin. sonra gui veya mesajla yapıcaksan 1. olan kişiye 1. tabeladaki isimi yerleştirirsin, 2. olan kişiye 2. tabeladaki isimi vs. vs.
 
Üst