Skript Paylaşımı Rank Z | Gelişmiş Rütbe Sistemi - Değişken Yok - 100% YAML | b1.0

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

Shura

Altın Benim Yeni Sevgilim
Katılım
6 Haziran 2018
Mesajlar
474
Elmaslar
254
Puan
7.070
73195


Rank Z, hiçbir yönetim eklentisine gerek duymadan sunucunuzu yöneten bir rütbe sistemi.

73196


- Alt-rütbe ile rütbe atlama sistemi.
- Her rütbeye özel duyuru.
- Rütbelere özel prefix.
- Sıfır değişken kullanımı.
- Sıfır gecikme garantisi.
- Sınırsız sayıda rütbe ekleme.
- Sohbette rütbenin görünmesi.
- Title desteği.

Kullanabilmek için:

skQuery
TuSKe
Skript 2.2-dev37+
skUtilities
skript-yaml
skRayFall

gerekir.

73197


/rankz atla - Rütbe atlatır.
/rankz liste - Rütbe listesi.
/rankz yardım - Yardım mesajı.
/rankz yenile - Skript'i yeniler.

73198


Rollback yüzünden konu silindiği için resimler de silindi ve elimde şuan resimler yok, ekleyebilirim.

KOD:
Kod:
on load:
    execute console command "/rankz yenile"

on join:
    load yaml "plugins/RankZ/oyuncular/%player%.yml" as "%player%"
    if yaml value "%player%.rütbe" from "%player%" isn't set:
        loop yaml node keys "" on load:
    execute console command "/rankz yenile"

on join:
    load yaml "plugins/RankZ/oyuncular/%player%.yml" as "%player%"
    if yaml value "%player%.rütbe" from "%player%" isn't set:
        loop yaml node keys "" from "RZR":
            if yaml value "%loop-value%.default" from "RZR" is true:
                set yaml value "%player%.rütbe" from "%player%" to yaml value "%loop-value%.isim" from "RZR"
                set yaml value "%player%.prefix" from "%player%" to yaml value "%loop-value%.prefix" from "RZR"
                send (yaml value "default-rütbe" from "RZM")
    save yaml "%player%"

command /rankz [<text="yardım">]:
    aliases: ranks, rütbe, rank
    trigger:
        if arg-1 is "yardım":
            send "%join yaml list ""yardım"" from ""RZM"" with nl% " to executor
        else if arg-1 is "yenile":
            if executor has permission "rankz.yenile":
                if dir "plugins/RankZ/" doesn't exist:
                    create dir "plugins/RankZ"
                    set file contents of "plugins/RankZ/rütbeler.yml" to contents from url "https://raw.githubusercontent.com/pixache/rankz/master/rutbeler.yml"
                    set file contents of "plugins/RankZ/mesajlar.yml" to contents from url "https://raw.githubusercontent.com/pixache/rankz/master/mesajlar.yml"
                load yaml "plugins/RankZ/rütbeler.yml" as "RZR"
                load yaml "plugins/RankZ/mesajlar.yml" as "RZM"
                save yaml "RZM"
                save yaml "RZR"
                send (yaml value "yenilendi" from "RZM") to executor
            else:
                send (yaml value "yetkiniz-yok" from "RZM") to executor
        else if arg-1 is "atla":
            rankUp(player, "RZR")
        else if arg-1 is "list" or "liste":
            rankList(player)

function rankList(p: player):
    send (yaml value "liste-mesajları.mevcut" from "RZM") to {_p}
    loop yaml node keys "" from "RZR":
        set {_isim} to yaml value "%loop-value%.isim" from "RZR"
        set {_rütbeler} to yaml value "liste-mesajları.rütbeler" from "RZM"
        set {_fiyat} to yaml value "%loop-value%.fiyat" from "RZR"
        replace all "{liste}" with "%{_isim}%" in {_rütbeler}
        replace all "{fiyat}" with "%{_fiyat}%" in {_rütbeler}
        send "%{_rütbeler}% TL" to {_p}

function rankUp(p: player, yaml: text):
    loop yaml node keys "" from {_yaml}:
        if yaml value "%loop-value%.alt-rütbe" from {_yaml} is yaml value "%{_p}%.rütbe" from "%{_p}%":
            if {_p}'s balance >= yaml value "%loop-value%.fiyat" from {_yaml}:
                set yaml value "%{_p}%.rütbe" from "%{_p}%" to yaml value "%loop-value%.isim" from {_yaml}
                set yaml value "%{_p}%.prefix" from "%{_p}%" to yaml value "%loop-value%.prefix" from {_yaml}
                save yaml "%{_p}%"
                remove (yaml value "%loop-value%.fiyat" from {_yaml}) from {_p}'s balance
                set {_a} to yaml value "%{_p}%.rütbe" from "%{_p}%"
                set {_b} to yaml value "title-mesajları.yeni-rütbe" from "RZM"
                replace all "{rütbe}" with "%{_a}%" in {_b}
                send {_p} title (yaml value "title-mesajları.başarılı" from "RZM") with subtitle "%{_b}%" for 3 seconds
                if yaml value "%loop-value%.duyur" from {_yaml} is true:
                    set {_c} to yaml value "duyuru" from "RZM"
                    replace all "{oyuncu}" with "%{_p}%" in {_c}
                    replace all "{rütbe}" with "%{_a}%" in {_c}
                    broadcast "%{_c}%"
                stop
            else:
                send {_p} title (yaml value "title-mesajları.hata" from "RZM") with subtitle (yaml value "title-mesajları.para-yetersiz" from "RZM") for 3 seconds

on chat:
    set {_prefix} to yaml value "%player%.prefix" from "%player%"
    set message format to "%{_prefix}% &a%player% &7: &e%message%"from "RZR":
            if yaml value "%loop-value%.default" from "RZR" is true:
                set yaml value "%player%.rütbe" from "%player%" to yaml value "%loop-value%.isim" from "RZR"
                set yaml value "%player%.prefix" from "%player%" to yaml value "%loop-value%.prefix" from "RZR"
                send (yaml value "default-rütbe" from "RZM")
    save yaml "%player%"

command /rankz [<text="yardım">]:
    aliases: ranks, rütbe, rank
    trigger:
        if arg-1 is "yardım":
            send "%join yaml list ""yardım"" from ""RZM"" with nl% " to executor
        else if arg-1 is "yenile":
            if executor has permission "rankz.yenile":
                if dir "plugins/RankZ/" doesn't exist:
                    create dir "plugins/RankZ"
                    set file contents of "plugins/RankZ/rütbeler.yml" to contents from url "https://raw.githubusercontent.com/pixache/rankz/master/rutbeler.yml"
                    set file contents of "plugins/RankZ/mesajlar.yml" to contents from url "https://raw.githubusercontent.com/pixache/rankz/master/mesajlar.yml"
                load yaml "plugins/RankZ/rütbeler.yml" as "RZR"
                load yaml "plugins/RankZ/mesajlar.yml" as "RZM"
                save yaml "RZM"
                save yaml "RZR"
                send (yaml value "yenilendi" from "RZM") to executor
            else:
                send (yaml value "yetkiniz-yok" from "RZM") to executor
        else if arg-1 is "atla":
            rankUp(player, "RZR")
        else if arg-1 is "list" or "liste":
            rankList(player)

function rankList(p: player):
    send (yaml value "liste-mesajları.mevcut" from "RZM") to {_p}
    loop yaml node keys "" from "RZR":
        set {_isim} to yaml value "%loop-value%.isim" from "RZR"
        set {_rütbeler} to yaml value "liste-mesajları.rütbeler" from "RZM"
        set {_fiyat} to yaml value "%loop-value%.fiyat" from "RZR"
        replace all "{liste}" with "%{_isim}%" in {_rütbeler}
        replace all "{fiyat}" with "%{_fiyat}%" in {_rütbeler}
        send "%{_rütbeler}% TL" to {_p}

function rankUp(p: player, yaml: text):
    loop yaml node keys "" from {_yaml}:
        if yaml value "%loop-value%.alt-rütbe" from {_yaml} is yaml value "%{_p}%.rütbe" from "%{_p}%":
            if {_p}'s balance >= yaml value "%loop-value%.fiyat" from {_yaml}:
                set yaml value "%{_p}%.rütbe" from "%{_p}%" to yaml value "%loop-value%.isim" from {_yaml}
                set yaml value "%{_p}%.prefix" from "%{_p}%" to yaml value "%loop-value%.prefix" from {_yaml}
                save yaml "%{_p}%"
                remove (yaml value "%loop-value%.fiyat" from {_yaml}) from {_p}'s balance
                set {_a} to yaml value "%{_p}%.rütbe" from "%{_p}%"
                set {_b} to yaml value "title-mesajları.yeni-rütbe" from "RZM"
                replace all "{rütbe}" with "%{_a}%" in {_b}
                send {_p} title (yaml value "title-mesajları.başarılı" from "RZM") with subtitle "%{_b}%" for 3 seconds
                if yaml value "%loop-value%.duyur" from {_yaml} is true:
                    set {_c} to yaml value "duyuru" from "RZM"
                    replace all "{oyuncu}" with "%{_p}%" in {_c}
                    replace all "{rütbe}" with "%{_a}%" in {_c}
                    broadcast "%{_c}%"
                stop
            else:
                send {_p} title (yaml value "title-mesajları.hata" from "RZM") with subtitle (yaml value "title-mesajları.para-yetersiz" from "RZM") for 3 seconds

on chat:
    set {_prefix} to yaml value "%player%.prefix" from "%player%"
    set message format to "%{_prefix}% &a%player% &7: &e%message%"on load:
    execute console command "/rankz yenile"

on join:
    load yaml "plugins/RankZ/oyuncular/%player%.yml" as "%player%"
    if yaml value "%player%.rütbe" from "%player%" isn't set:
        loop yaml node keys "" from "RZR":
            if yaml value "%loop-value%.default" from "RZR" is true:
                set yaml value "%player%.rütbe" from "%player%" to yaml value "%loop-value%.isim" from "RZR"
                set yaml value "%player%.prefix" from "%player%" to yaml value "%loop-value%.prefix" from "RZR"
                send (yaml value "default-rütbe" from "RZM")
    save yaml "%player%"

command /rankz [<text="yardım">]:
    aliases: ranks, rütbe, rank
    trigger:
        if arg-1 is "yardım":
            send "%join yaml list ""yardım"" from ""RZM"" with nl% " to executor
        else if arg-1 is "yenile":
            if executor has permission "rankz.yenile":
                if dir "plugins/RankZ/" doesn't exist:
                    create dir "plugins/RankZ"
                    set file contents of "plugins/RankZ/rütbeler.yml" to contents from url "https://raw.githubusercontent.com/pixache/rankz/master/rutbeler.yml"
                    set file contents of "plugins/RankZ/mesajlar.yml" to contents from url "https://raw.githubusercontent.com/pixache/rankz/master/mesajlar.yml"
                load yaml "plugins/RankZ/rütbeler.yml" as "RZR"
                load yaml "plugins/RankZ/mesajlar.yml" as "RZM"
                save yaml "RZM"
                save yaml "RZR"
                send (yaml value "yenilendi" from "RZM") to executor
            else:
                send (yaml value "yetkiniz-yok" from "RZM") to executor
        else if arg-1 is "atla":
            rankUp(player, "RZR")
        else if arg-1 is "list" or "liste":
            rankList(player)

function rankList(p: player):
    send (yaml value "liste-mesajları.mevcut" from "RZM") to {_p}
    loop yaml node keys "" from "RZR":
        set {_isim} to yaml value "%loop-value%.isim" from "RZR"
        set {_rütbeler} to yaml value "liste-mesajları.rütbeler" from "RZM"
        set {_fiyat} to yaml value "%loop-value%.fiyat" from "RZR"
        replace all "{liste}" with "%{_isim}%" in {_rütbeler}
        replace all "{fiyat}" with "%{_fiyat}%" in {_rütbeler}
        send "%{_rütbeler}% TL" to {_p}

function rankUp(p: player, yaml: text):
    loop yaml node keys "" from {_yaml}:
        if yaml value "%loop-value%.alt-rütbe" from {_yaml} is yaml value "%{_p}%.rütbe" from "%{_p}%":
            if {_p}'s balance >= yaml value "%loop-value%.fiyat" from {_yaml}:
                set yaml value "%{_p}%.rütbe" from "%{_p}%" to yaml value "%loop-value%.isim" from {_yaml}
                set yaml value "%{_p}%.prefix" from "%{_p}%" to yaml value "%loop-value%.prefix" from {_yaml}
                save yaml "%{_p}%"
                remove (yaml value "%loop-value%.fiyat" from {_yaml}) from {_p}'s balance
                set {_a} to yaml value "%{_p}%.rütbe" from "%{_p}%"
                set {_b} to yaml value "title-mesajları.yeni-rütbe" from "RZM"
                replace all "{rütbe}" with "%{_a}%" in {_b}
                send {_p} title (yaml value "title-mesajları.başarılı" from "RZM") with subtitle "%{_b}%" for 3 seconds
                if yaml value "%loop-value%.duyur" from {_yaml} is true:
                    set {_c} to yaml value "duyuru" from "RZM"
                    replace all "{oyuncu}" with "%{_p}%" in {_c}
                    replace all "{rütbe}" with "%{_a}%" in {_c}
                    broadcast "%{_c}%"
                stop
            else:
                send {_p} title (yaml value "title-mesajları.hata" from "RZM") with subtitle (yaml value "title-mesajları.para-yetersiz" from "RZM") for 3 seconds

on chat:
    set {_prefix} to yaml value "%player%.prefix" from "%player%"
    set message format to "%{_prefix}% &a%player% &7: &e%message%"
 
Son düzenleme:
Eline sağlık skript başarılı gözüküyor denemek lazım
 
Güzele benziyor.
 

Rütbe eklentileri yerine Skript sürümü daha hoş gibi geldi. Resimleri tekrar eklerseniz daha güzel olacağını düşünüyorum. Kodlamana sağlık!
 
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