Skript Paylaşımı skBank Recoded | Eşsiz Banka Skripti v1.4

  • Konuyu Başlatan Konuyu Başlatan Shura
  • Başlangıç tarihi Başlangıç tarihi
  • Görüntüleme 7.768
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
SkBank Recoded
Kodu buradan almanızı tavsiye etmem, tüm güncellemeler GitHub üzerinden ilerleyecektir.
Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.


YAML Dosyaları, Ubuntu sitesine yüklenmiştir, konu sadeliği ve forumda oluşan bug sebebi ile böylesi daha iyi.

Kodlamada ettiği yardımlar için @bilektugrul 'a teşekkür ediyorum.
Ayraç.png

Eklenenler:
- Her kullanıcının verilerini depolayacak "players.yml" dosyası eklendi.
- YAML üzerinden 100% düzenlenebilen yardım mesajı eklendi.
- YAML ile ikonların isimlerini ve açıklamalarını (lore) ayarlayın!


Kaldırılanlar:
- Sıralama kaldırıldı.
- Maksimum depo kaldırıldı.
- Seviye sistemi kaldırıldı.
- Tüm değişkenler kaldırıldı.


İyileştirmeler:
- Kod içerisindeki tüm değişkenler, YAML olarak değişti.
- Her kullanıcının verilerini depolayacak "players.yml" dosyası oluşturuldu.
- Fonksiyon kullanımı maksimum dereceye ulaştı!
- GUI yeniden düzenlendi, artık değişmeyecek!
- Kod satırları kısaltıldı, daha hafif bir skript!
- YAML dosyaları alfabetik şekilde kategori yapıldı.
- Gereksiz YAML mesajları silindi, artık her şey tamam!
- İşlemler hiç görülmediği kadar hızlı, pratik, hatasız!
Eklenenler:
- YAML dosyaları GitHub üzerinden indirilecek.
- "reload" komutu eklendi.
- "update" komutu eklendi.
- Playerdata ve Backups klasörleri oluşturuldu.


Kaldırılanlar:
- players.yml dosyası kaldırıldı.
- Gereksiz satırlar kaldırıldı.


İyileştirmeler:
- Pek çok bug düzeltildi.
- İşlevsellik artırıldı.
- Kod kısaltıldı.
Eklenenler:
- Yardım haricinde tüm mesajlara prefix eklendi.
- Yardım mesajına update & reload mesajları eklendi.
- Menü ikonlarının açıklamaları config'e eklendi.


Kaldırılanlar:
- Birkaç gereksiz şey kaldırıldı.


İyileştirmeler:
- Skript daha hızlı hale getirildi.
- Değişkenler tamamen kaldırıldı.
- Bazı fonksiyonlar kendi aralarında birleştirildi.
- Daha seri işlemler için fonksiyonlar artırıldı.
- Tek menü üzerinde 3 menünün işlemleri yapılabilir.
Ayraç.png

SkBank RECODED v1.4

Özellikler:
- YAML ile hızlı düzenlemeler.
- Oyun içi yenileme komutu.
- Oyun içinden güncelleme komutu.
- Hesap sistemi.
- Para ve Tecrübe yatırma, çekme işlemleri.
- Değişken bulundurmaz.
- Oyuncu kayıt sistemi.
- Hafif bir skript.


Gereken Add-on Listesi:
- Skript 2.2dev37+
- skQuery
- TuSKe
- skript-yaml
- skUtilities YENİ

Ayraç.png

Görseller:
Güncel değildir, fazla değişiklik olmadığı için değiştirmedim.

Ana Menü:

B-Menü.PNG


Para Yatırma-Çekme Menüsü:

B-MONEY.PNG


Tecrübe Yatırma-Çekme Menüsü:

B-EXP.PNG

Ayraç.png

YAML Dosyaları:
Kayıt Dosyası:
Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.

Mesajlar:
Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.

Config:
Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.

Ayraç.png

Kod:
#Version: 1.4
#Don't change the version!

function changePass(p: player, y: text):
    yaml value "%{_p}%.login-status" of file "plugins/SkBank/playerdata/%{_p}%.yml" is true:
        yaml value "%{_p}%.password" of file "plugins/SkBank/playerdata/%{_p}%.yml" isn't "not set":
            set yaml value "%{_p}%.password" of file "plugins/SkBank/playerdata/%{_p}%.yml" to {_y}
            sendYAMLFile({_p}, "Password.Changed")
            set yaml value "%{_p}%.login-status" of file "plugins/SkBank/playerdata/%{_p}%.yml" to false
  
        else:
            sendYAMLFile({_p}, "Password.Set-Pw-First")
    else:
        sendYAMLFile({_p}, "Status.Log-In")

function checkPass(p: player, y: text) :: objects:
    yaml value "%{_p}%.login-status" of file "plugins/SkBank/playerdata/%{_p}%.yml" isn't true:
        set {_t} to yaml value "%{_p}%.password" of file "plugins/SkBank/playerdata/%{_p}%.yml"
        if {_t} is "not set":
            sendYAMLFile({_p}, "Password.Set-Pw-First")
        else if {_y} isn't "%{_t}%":
            sendYAMLFile({_p}, "Password.Wrong")
        else if {_y} is "%{_t}%":
            set yaml value "%{_p}%.login-status" of file "plugins/SkBank/playerdata/%{_p}%.yml" to true
            sendYAMLFile({_p}, "Status.Logged-In")
    else:
        sendYAMLFile({_p}, "Status.Logged-In-Already")

function getMN(y: text, t: text) :: texts:
    add yaml value "%{_y}%.%{_t}%" from "CONFIG" to {_return::*}
    return {_return::*}

function placeholder(p: player, a: text, b: text, c: text) :: texts:
    add yaml value "%{_p}%.%{_a}%" of file "plugins/SkBank/playerdata/%{_p}%.yml" to {_s}
    add yaml value "%{_p}%.%{_b}%" of file "plugins/SkBank/playerdata/%{_p}%.yml" to {_w}
    add getMN("Module-Names","Information.Lore") to {_q::*}
    replace all "{type}" with "%{_c}%" in {_q::*}
    replace all "{amount}" with "%{_s}%" in {_q::*}
    replace all "{inBank}" with "%{_w}%" in {_q::*}
    return {_q::*}

function getPlayer(p: player):
    load yaml "plugins/SkBank/playerdata/%{_p}%.yml" as "%{_p}%"
    yaml value "%{_p}%" from "%{_p}%" isn't set
    set yaml value "%{_p}%.money-of-player" from "%{_p}%" to "%{_p}'s balance%"
    set yaml value "%{_p}%.money-in-bank" from "%{_p}%" to "0"
    set yaml value "%{_p}%.exp-of-player" from "%{_p}%" to "%{_p}'s xp%"
    set yaml value "%{_p}%.exp-in-bank" from "%{_p}%" to "0"
    set yaml value "%{_p}%.login-status" from "%{_p}%" to "false"
    set yaml value "%{_p}%.password" from "%{_p}%" to "not set"
    save yaml "%{_p}%" without extra lines between nodes

function logOut(p: player):
    yaml value "%{_p}%.login-status" of file "plugins/SkBank/playerdata/%{_p}%.yml" is true:
        set yaml value "%{_p}%.login-status" of file "plugins/SkBank/playerdata/%{_p}%.yml" to false
        sendYAMLFile({_p}, "Status.Logged-Out")
    else:
        sendYAMLFile({_p}, "Status.Log-In")

function sendYAMLFile(p: executor, t: text, y: text=0):
    add yaml value {_t} from "MESSAGES" to {_s::*}
    send "%{_s::*}%" to {_p}

function setPass(p: player, y: text):
    set {_t} to yaml value "%{_p}%.password" of file "plugins/SkBank/playerdata/%{_p}%.yml"
    {_t} is "not set":
        set yaml value "%{_p}%.password" of file "plugins/SkBank/playerdata/%{_p}%.yml" to {_y}
        set yaml value "%{_p}%.login-status" of file "plugins/SkBank/playerdata/%{_p}%.yml" to "true"

        sendYAMLFile({_p}, "Password.Set-Success")
    else:
        sendYAMLFile({_p}, "Password.Already-Have")

function opManager(p: player, i: text):
    load yaml "plugins/SkBank/playerdata/%{_p}%.yml" as "%{_p}%"
    {_i} is "dMoney" or "wMoney":
        set {_value} to yaml value "Economy.Money" from "CONFIG"
        {_i} is "dMoney":
            {_p}'s balance - {_value} >= 0:
                {_p}'s balance >= {_value}:
                    remove {_value} from {_p}'s balance
                    set yaml value "%{_p}%.money-of-player" from "%{_p}%" to ({_p}'s balance - {_value})
                    set yaml value "%{_p}%.money-in-bank" from "%{_p}%" to (yaml value "%{_p}%.money-in-bank" from "%{_p}%" + {_value})
                    sendYAMLFile({_p}, "Operation.Succesfull")
                else if {_p}'s balance < {_value}:
                    sendYAMLFile({_p}, "Operation.Error.Not-Enough-Money")
            else if {_p}'s balance - {_value} < 0:
                sendYAMLFile({_p}, "Operation.Error.Not-Enough-Money")
        {_i} is "wMoney":
            yaml value "%{_p}%.money-in-bank" from "%{_p}%" - {_value} >= 0:
                set yaml value "%{_p}%.money-in-bank" from "%{_p}%" to (yaml value "%{_p}%.money-in-bank" from "%{_p}%" - {_value})
                set yaml value "%{_p}%.money-of-player" from "%{_p}%" to ({_p}'s balance + {_value})
                set {_p}'s balance to {_p}'s balance + {_value}
                sendYAMLFile({_p}, "Operation.Succesfull")
            else:
                sendYAMLFile({_p}, "Operation.Error.Not-Enough-Currency")
    {_i} is "dExp" or "wExp":
        set {_value} to yaml value "Economy.EXP" from "CONFIG"
        {_i} is "dExp":
            {_p}'s xp >= {_value}:
                remove {_value} from {_p}'s exp
                set yaml value "%{_p}%.exp-in-bank" from "%{_p}%" to (yaml value "%{_p}%.exp-in-bank" from "%{_p}%" + {_value})
                set yaml value "%{_p}%.exp-of-player" from "%{_p}%" to (yaml value "%{_p}%.exp-of-player" from "%{_p}%" - {_value})

                sendYAMLFile({_p}, "Operation.Exp.Deposit-Success")
            else:
                sendYAMLFile({_p}, "Operation.Error.Not-Enough-Exp")
        {_i} is "wExp":
            yaml value "%{_p}%.exp-in-bank" from "%{_p}%" - {_value} >= 0:
                set yaml value "%{_p}%.exp-in-bank" from "%{_p}%" to (yaml value "%{_p}%.exp-in-bank" from "%{_p}%" - {_value})
                set yaml value "%{_p}%.exp-of-player" from "%{_p}%" to ({_p}'s xp + {_value})
                set {_p}'s xp to {_p}'s xp + {_value}
                sendYAMLFile({_p}, "Operation.Exp.Withdraw-Success")
            else:
                sendYAMLFile({_p}, "Operation.Error.Not-Enough-Exp")
    save yaml "%{_p}%" without extra lines between nodes
    unload yaml "%{_p}%"

function openMainGUI(p: player):
    set {_login} to yaml value "%{_p}%.login-status" of file "plugins/SkBank/playerdata/%{_p}%.yml"
    {_login} is true:
        open virtual chest with size 3 named "%getMN(""Module-Names"", ""Bank-Menu.Name"")%" to {_p}
        make gui slot (integers between 0 and 26) of {_p} with white stained glass pane named "%getMN(""Module-Names"", ""Splitter.Name"")%" with lore "%getMN(""Module-Names"", ""Splitter.Lore"")%" to nothing
        make gui slot 10 of {_p} with diamond named "%getMN(""Module-Names"", ""Deposit.Name"")%" to run:
            make gui slot 10 of {_p} with emerald named "%getMN(""Module-Names"", ""Deposit.Name"")%" with lore "%getMN(""Module-Names"", ""Deposit.Lore"")%" to run function opManager({_p}, "dMoney")
            make gui slot 13 of {_p} with paper named "%getMN(""Module-Names"", ""Information.Name"")%" with lore "%placeholder({_p}, ""money-of-player"", ""money-in-bank"", ""Money"")%" to nothing
            make gui slot 16 of {_p} with redstone named "%getMN(""Module-Names"", ""Withdraw.Name"")%" with lore "%getMN(""Module-Names"", ""Withdraw.Lore"")%" to run function opManager({_p}, "wMoney")
            make gui slot 22 of {_p} with arrow named "%getMN(""Module-Names"", ""Back.Name"")%" with lore "%getMN(""Module-Names"", ""Back.Lore"")%" to run function openMainGUI({_p})
        make gui slot 16 of {_p} with bottle o enchanting named "%getMN(""Module-Names"", ""Exp-Deposit.Name"")%" to run:
            make gui slot 10 of {_p} with bottle o enchanting named "%getMN(""Module-Names"", ""Exp-Deposit.Name"")%" with lore "%getMN(""Module-Names"", ""Exp-Deposit.Lore"")%" to run function opManager({_p}, "dExp")
            make gui slot 13 of {_p} with paper named "%getMN(""Module-Names"", ""Information.Name"")%" with lore "%placeholder({_p}, ""exp-of-player"", ""exp-in-bank"", ""EXP"")%" to nothing
            make gui slot 16 of {_p} with bottle o enchanting named "%getMN(""Module-Names"", ""Exp-Withdraw.Name"")%" with lore "%getMN(""Module-Names"", ""Exp-Withdraw.Lore"")%" to run function opManager({_p}, "wExp")
            make gui slot 22 of {_p} with arrow named "%getMN(""Module-Names"", ""Back.Name"")%" with lore "%getMN(""Module-Names"", ""Back.Lore"")%" to run function openMainGUI({_p})
        make gui slot 22 of {_p} with barrier named "%getMN(""Module-Names"", ""Close.Name"")%" with lore "%getMN(""Module-Names"", ""Close.Lore"")%" to close
    else:
        sendYAMLFile({_p}, "Status.Log-In")

on load:
    execute console command "/skbank reload"

on unload:
    unload yaml "CONFIG"
    unload yaml "MESSAGES"

on join:
    getPlayer(player)

on quit:
    set yaml value "%player%.login-status" of file "plugins/SkBank/playerdata/%player%.yml" to false
    getPlayer(player)

function check(t: text, p: executor):
    {_p} has permission "skbank.reload":
        {_t} is "update":
            if line 1 in file "plugins/Skript/scripts/%script's name%.sk" isn't line 1 from url "https://raw.githubusercontent.com/pixache/skbankrecoded/master/SkBank.sk":
                sendYAMLFile({_p}, "Commands.Admin.Updating")
                set {_n} to line 1 in file "plugins/Skript/scripts/%script's name%.sk"
                set {_s} to line 1 from url "https://raw.githubusercontent.com/pixache/skbankrecoded/master/SkBank.sk"
                replace all "##Version: " with "" in {_s}
                replace all "##Version: " with "" in {_n}
                create dir "plugins/SkBank/backups/%{_n}%"
                set file contents of "plugins/SkBank/backups/%{_n}%/%script's name%.sk" to file contents of "plugins/Skript/scripts/%script's name%.sk"
                set file contents of "plugins/SkBank/backups/%{_n}%/messages.yml" to file contents of "plugins/SkBank/messages.yml"
                set file contents of "plugins/SkBank/backups/%{_n}%/config.yml" to file contents of "plugins/SkBank/config.yml"
                set file contents of "plugins/Skript/scripts/%script's name%.sk" to contents from url "https://raw.githubusercontent.com/pixache/skbankrecoded/master/SkBank.sk"
                execute {_p} command "/sk reload %script's name%"
                set {_ver::*} to yaml value "Commands.Admin.Updated" from "MESSAGES"
                replace all "{ver}" with "%{_s}%" in {_ver::*}
                send "%{_ver::*}%" to {_p}
                sendYAMLFile({_p}, "Commands.Admin.Backed-Up")
            else:
                sendYAMLFile({_p}, "Commands.Admin.Latest-Version")
        {_t} is "reload":
            sendYAMLFile({_p}, "Commands.Admin.Reloading")
            if dir "plugins/SkBank/" doesn't exist:
                create dir "plugins/SkBank/"
                create dir "plugins/SkBank/playerdata"
                create dir "plugins/SkBank/backups"
                set file contents of "plugins/SkBank/config.yml" to contents from url "https://raw.githubusercontent.com/pixache/skbankrecoded/master/config.yml"
                set file contents of "plugins/SkBank/messages.yml" to contents from url "https://raw.githubusercontent.com/pixache/skbankrecoded/master/messages.yml"
            load yaml "plugins/SkBank/config.yml" as "CONFIG"
            load yaml "plugins/SkBank/messages.yml" as "MESSAGES"
            save yaml "CONFIG" without extra lines between nodes
            save yaml "MESSAGES" without extra lines between nodes
            sendYAMLFile({_p}, "Commands.Admin.Reload-Complete")
            if line 1 in file "plugins/Skript/scripts/%script's name%.sk" isn't line 1 from url "https://raw.githubusercontent.com/pixache/skbankrecoded/master/SkBank.sk":
                sendYAMLFile({_p}, "Commands.Admin.Outdated-Ver")
                {_p} is a player:
                    sendYAMLFile({_p}, "Commands.Admin.Click-To-Update")
                else:
                    sendYAMLFile(console, "Commands.Admin.Only-In-Game")

command /bank [<text=help>] [<text>] [<text>]:
    aliases: skbank, skb, sb
    trigger:
        arg-1 is "help":
            set {_n::*} to yaml list "Commands.Message-Splitter" from "MESSAGES"
            set {_tip::*} to yaml list "Commands.Tip" from "MESSAGES"
            set {_help::*} to yaml list "Commands.Help-Message" from "MESSAGES"
            {_help::*} is set:
                send "%join {_n::*} with nl% " and "%join {_tip::*} with nl% "
                send "%join {_help::*} with nl% " and "%join {_n::*} with nl% "
            else:
                send "&eThere is an error with help command, contact to admin."
        arg-1 is "reload" or "update":
            check(arg-1, executor)
        arg-1 is "open":
            openMainGUI(player)
        arg-1 is "pw":
            arg-2 is "set":
                arg-3 is set:
                    setPass(player, arg-3)
                else:
                    sendYAMLFile(player, "Password.Enter-New-Pw")
            arg-2 is "change":
                arg-3 is set:
                    changePass(player, arg-3)
                else:
                    sendYAMLFile(player, "Password.Enter-New-Pw")
            arg-2 isn't set:
                execute player command "skbank help"
        arg-1 is "login":
            arg-2 is set:
                checkPass(player, arg-2)
            else:
                execute player command "skbank help"
        arg-1 is "logout":
            logOut(player)
        arg-1 is not "help" or "login" or "logout" or "pw" or "reload" or "update" or "open":
            execute player command "skbank help"
 
Son düzenleme:
Eline sağlık güzel bir skript olmuş.
 
Merhabalar efenim. Konu tasarımlarında pek iyi değilim, o yüzden direk tanıtıma geçeyim. Aklınızda geliştirmeme yardımcı olacak
fikirler varsa, lütfen söyleyin. Beni çok mutlu edersiniz.

- Skript paylaşıldı.
Banka Skripti v0.1

Özellikler:
- YAML desteği.
- Kolayca düzenlenebilir işlemler.
- 100% düzenlenebilir mesajlar.
- Hızlı adımlarla para yatırma/çekme.
- Oyun içi config/mesaj yenilemesi.
- Banka hesabı sistemi.

YAML Desteği:
Skript'i açıp düzenlemek bazen zor olur, bunun için config ve mesajlar adında iki yaml dosyası oluşturdum.
Bu dosyaları kullanarak kolayca düzenleme yapabilirsiniz.

Hızlı Adımlarla Para İşlemleri:
Banka menüsü açıldığında, hızlı şekilde istediğiniz miktar para yatırabilir, veya çekebilirsiniz.

Oyun içi config/mesaj yenilemesi:
Oyundan çıkmanıza veya ara vermenize gerek kalmadan, ya da skripte reload atmak yerine
komut kullanarak dosyaları yenileyebilirsiniz.

Banka Hesabı Sistemi:
Sunucuda kullandığınız hesabınız çalındı mı ? Dert etmeyin, bizde güvenlik ön planda!
Oyuna ilk kez katıldığınız zaman bankayı açmak için sizden bir şifre isteyecektir.
Komut kullanarak bir şifre belirleyin, sonrasında giriş yapmak için onu kullanın.
Şifreyi girmeden bankaya erişilemez, oyundan çıkıp tekrar girince hesaptan otomatik olarak çıkar.
Şifreyi kaldırma (değiştirme) sistemi de mevcuttur, kendinize yeni bir şifre istiyorsanız hemen değiştirin!​

Giriş-Çıkış Sistemi:
Banka arayüzüne erişmek için giriş yapmalısınız. Bir kez yapınca, oyundan çıkana kadar açık kalacaktır.
Veya, çıkış yapabilir ve bankayı kullanmadan oynayabilirsiniz. Size kalmış, dedim ya, güvenlik ön planda.

Görseller:

Kod:
on script load:
    mesajYenile()
    configYenile()

options:
    cam: black stained glass pane

function mesajYenile():
    load yaml "plugins/SkBank/Mesajlar/mesajlar.yml" as "BP-Mesajlar"
    set the header of "BP-Mesajlar" to "Buradan bütün banka mesajlarını değiştirebilirsiniz, kod başlıklarını ellemeyin." and "{player} = Oyuncu adı"
    if yaml node "Prefix" in "BP-Mesajlar" doesn't have value:
        set yaml value "Prefix" in "BP-Mesajlar" to "&7[&aBanka&7]"
    if yaml node "Islem-Mesajlari" in "BP-Mesajlar" doesn't have value:
        set yaml value "Islem-Mesajlari.Para-Yatirildi" in "BP-Mesajlar" to "&eBaşarıyla para yatırıldı."
        set yaml value "Islem-Mesajlari.Para-Cekildi" in "BP-Mesajlar" to "&eBaşarıyla para çekildi."
        set yaml value "Islem-Mesajlari.Banka-Dolu" in "BP-Mesajlar" to "&eBankanız tamamen dolu."
        set yaml value "Islem-Mesajlari.Para-Yok" in "BP-Mesajlar" to "&eBankanızda çekecek para kalmamış."
        set yaml value "Islem-Mesajlari.Para-Yetersiz" in "BP-Mesajlar" to "&eBu işlem için paranız yetmiyor."
        set yaml value "Islem-Mesajlari.Bakiye-Yetersiz" in "BP-Mesajlar" to "&eBankanızda bulunan para yetersiz."
    if yaml node "Giris-Cikis-Mesajlari" in "BP-Mesajlar" doesn't have value:
        set yaml value "Giris-Cikis-Mesajlari.Giris-Yapiniz" in "BP-Mesajlar" to "&eLütfen hesabınıza giriş yapın."
        set yaml value "Giris-Cikis-Mesajlari.Giris-Yapilmis" in "BP-Mesajlar" to "&eHesabınıza giriş yapmışsınız."
        set yaml value "Giris-Cikis-Mesajlari.Cikis-Yapildi" in "BP-Mesajlar" to "&eHesabınızdan çıkış yapıldı."
    if yaml node "Sifre-Mesajlari" in "BP-Mesajlar" doesn't have value:
        set yaml value "Sifre-Mesajlari.Kilit-Acildi" in "BP-Mesajlar" to "&eBanka kilidi açılmıştır."
        set yaml value "Sifre-Mesajlari.Sifre-Ayarlandi" in "BP-Mesajlar" to "&eŞifreniz başarıyla ayarlandı."
        set yaml value "Sifre-Mesajlari.Sifre-Girilmemis" in "BP-Mesajlar" to "&eLütfen şifrenizi girin."
        set yaml value "Sifre-Mesajlari.Sifre-Koyunuz" in "BP-Mesajlar" to "&eLütfen hesabınıza şifre koyun."
        set yaml value "Sifre-Mesajlari.Sifreniz-Var" in "BP-Mesajlar" to "&eZaten şifre koymuşsunuz."
        set yaml value "Sifre-Mesajlari.Sifre-Kaldirildi" in "BP-Mesajlar" to "&eHesabınızın şifresi kaldırıldı."
        set yaml value "Sifre-Mesajlari.Yeni-Sifre-Gir" in "BP-Mesajlar" to "&eLütfen yeni şifrenizi giriniz."
        set yaml value "Sifre-Mesajlari.Hatali-Sifre" in "BP-Mesajlar" to "&eGirilen şifre hatalı."
    if yaml node "Admin-Mesajlari" in "BP-Mesajlar" doesn't have value:
        set yaml value "Admin-Mesajlari.Config-Yenilendi" in "BP-Mesajlar" to "&eConfig başarıyla yenilendi."
        set yaml value "Admin-Mesajlari.Mesajlar-Yenilendi" in "BP-Mesajlar" to "&eMesajlar başarıyla yenilendi."
    set the comments of yaml node "Islem-Mesajlari" from "BP-Mesajlar" to "İşlem sırasında bu mesajlar gönderilir."
    set the comments of yaml node "Giris-Cikis-Mesajlari" from "BP-Mesajlar" to "Bankaya giriş çıkışlarda bu mesajlar gönderilir."
    set the comments of yaml node "Sifre-Mesajlari" from "BP-Mesajlar" to "Şifre ile ilgili olan mesajlar aşağıdadır."
    set the comments of yaml node "Admin-Mesajlari" from "BP-Mesajlar" to "Dosya yenilemesi yapıldığında bu mesajlar gönderilir."
    set {prefix} to yaml value "Prefix" in "BP-Mesajlar"
    save yaml "BP-Mesajlar" without extra lines between nodes

function configYenile():
    load yaml "plugins/SkBank/config.yml" as "BP-Config"
    set the header of "BP-Config" to "Buradan alım satım işlemleri için kullanılacak parayı" and "ve bekleme süresini ayarlayabilirsiniz."
    if yaml node "Borsa" in "BP-Config" doesn't have value:
        set yaml value "Borsa.Islem-1" in "BP-Config" to "1000"
        set yaml value "Borsa.Islem-2" in "BP-Config" to "2500"
        set yaml value "Borsa.Islem-3" in "BP-Config" to "5000"
        set yaml value "Borsa.Islem-4" in "BP-Config" to "10000"
        set yaml value "Borsa.Islem-5" in "BP-Config" to "25000"
        set yaml value "Borsa.Islem-6" in "BP-Config" to "50000"
        set yaml value "Borsa.Islem-7" in "BP-Config" to "100000"
    if yaml node "Modul-Isımleri" in "BP-Config" doesn't have value:
        set yaml value "Modul-Isımleri.Geri-Don" in "BP-Config" to "&6&l+ &bGeri Dön &6&l+"
        set yaml value "Modul-Isımleri.Cik" in "BP-Config" to "&6&l+ &bÇık &6&l+"
        set yaml value "Modul-Isımleri.Ayirici" in "BP-Config" to "&6&l+ &bBanka &6&l+"
        set yaml value "Modul-Isımleri.Para-Cek" in "BP-Config" to "&b» &cÇek &b»"
        set yaml value "Modul-Isımleri.Para-Yatir" in "BP-Config" to "&b» &aYatır &b»"
        set yaml value "Modul-Isımleri.Bakiye" in "BP-Config" to "&b» &3Bakiye &b»"
    set yaml value "Surum" in "BP-Config" to "v0.1"
    set the comments of yaml node "Dosya-Adı" from "BP-Config" to "Oyun içi skript yenilemesi için gereken dosya adı."
    set the comments of yaml node "Surum" from "BP-Config" to "Banka sürümüdür, değiştirmeyin."
    set {borsa::islem::1} to yaml value "Borsa.Islem-1" in "BP-Config"
    set {borsa::islem::2} to yaml value "Borsa.Islem-2" in "BP-Config"
    set {borsa::islem::3} to yaml value "Borsa.Islem-3" in "BP-Config"
    set {borsa::islem::4} to yaml value "Borsa.Islem-4" in "BP-Config"
    set {borsa::islem::5} to yaml value "Borsa.Islem-5" in "BP-Config"
    set {borsa::islem::6} to yaml value "Borsa.Islem-6" in "BP-Config"
    set {borsa::islem::7} to yaml value "Borsa.Islem-7" in "BP-Config"
    set {modul::yatir} to yaml value "Modul-Isımleri.Para-Yatir" in "BP-Config"
    set {modul::cek} to yaml value "Modul-Isımleri.Para-Cek" in "BP-Config"
    set {modul::bakiye} to yaml value "Modul-Isımleri.Bakiye" in "BP-Config"
    set {modul::ayirici} to yaml value "Modul-Isımleri.Ayirici" in "BP-Config"
    set {modul::geriDon} to yaml value "Modul-Isımleri.Geri-Don" in "BP-Config"
    set {modul::cik} to yaml value "Modul-Isımleri.Cik" in "BP-Config"
    save yaml "BP-Config" without extra lines between nodes

function placeholder(convert: text, player: player) :: text:
    replace all "{prefix}" with "%{prefix}%" in {_convert}
    replace all "{player}" with "%{_player}%" in {_convert}
    replace all "{dosya}" with "%{dosya}%" in {_convert}
    return {_convert}

on join:
    set {kilit::%player%} to false

command /banka [<text>] [<text>]:
    trigger:
#--------------------------------------------------------------
        arg-1 is not set:
            send "&8&l------------&8[&6Banka&8]&8&l------------&b"
            send "&a/banka &cşifrekoy &bsifre &f-Şifre koyar/değiştirirsiniz."
            send "&a/banka &cşifrekaldır &bsifre &f-Şifrenizi kaldırırsınız."
            send "&a/banka &cgiriş &bsifre &f-Banka hesabınıza giriş yaparsınız."
            send "&a/banka &cçıkış &f-Hesabınızdan çıkış yaparsınız."
            send "&a/banka &caç &f-Banka menüsü açılır."
            if player is op:
                send "&a/banka &cyenile &bconfig/mesajlar &f-Oyun-içi yenileme yaparsınız."
            send "&eŞifremi unuttum seçeneği yoktur,"
            send "&esakın şifrenizi unutmayın, bankanız gider."
            send "&8&l------------&8[&6Banka&8]&8&l------------&b"
#--------------------------------------------------------------
        arg-1 is "yenile":
            player is op:
                arg-2 is "config":
                    configYenile()
                    send "%{prefix}% %placeholder(yaml value ""Admin-Mesajlari.Config-Yenilendi"" in ""BP-Mesajlar"", executor)%"
                arg-2 is "mesajlar":
                    mesajYenile()
                    send "%{prefix}% %placeholder(yaml value ""Admin-Mesajlari.Mesajlar-Yenilendi"" in ""BP-Mesajlar"", executor)%"
#--------------------------------------------------------------
        arg-1 is "şifrekoy" or "sifrekoy" or "skoy":
            {kilit::%player%} is false:
                {sifre::%player%} is not set:
                    arg-2 is set:
                        set {sifre::%player%} to arg-2
                        send "%{prefix}% %placeholder(yaml value ""Sifre-Mesajlari.Sifre-Ayarlandi"" in ""BP-Mesajlar"", executor)%"
                    else:
                        send "%{prefix}% %placeholder(yaml value ""Sifre-Mesajlari.Yeni-Sifre-Gir"" in ""BP-Mesajlar"", executor)%"
                else:
                    send "%{prefix}% %placeholder(yaml value ""Sifre-Mesajlari.Sifreniz-Var"" in ""BP-Mesajlar"", executor)%"
#--------------------------------------------------------------
        arg-1 is "şifrekaldır" or "sifrekaldir" or "skaldir":
            {sifre::%player%} is set:
                {kilit::%player%} is true:
                    arg-2 is set:
                        arg-2 is {sifre::%player%}:
                            delete {sifre::%player%}
                            set {kilit::%player%} to false
                            send "%{prefix}% %placeholder(yaml value ""Sifre-Mesajlari.Sifre-Kaldirildi"" in ""BP-Mesajlar"", executor)%"
                        else:
                            send "%{prefix}% %placeholder(yaml value ""Sifre-Mesajlari.Hatali-Sifre"" in ""BP-Mesajlar"", executor)%"
                    else:
                        send "%{prefix}% %placeholder(yaml value ""Sifre-Mesajlari.Sifre-Girilmemis"" in ""BP-Mesajlar"", executor)%"
                else:
                    send "%{prefix}% %placeholder(yaml value ""Giris-Cikis-Mesajlari.Giris-Yapiniz"" in ""BP-Mesajlar"", executor)%"
            else:
                send "%{prefix}% %placeholder(yaml value ""Sifre-Mesajlari.Sifre-Koyunuz"" in ""BP-Mesajlar"", executor)%"
#--------------------------------------------------------------
        arg-1 is "giris" or "giriş" or "g" or "gir":
            {sifre::%player%} is set:
                {kilit::%player%} is false:
                    arg-2 is set:
                        arg-2 is {sifre::%player%}:
                            set {kilit::%player%} to true
                            send "%{prefix}% %placeholder(yaml value ""Sifre-Mesajlari.Kilit-Acildi"" in ""BP-Mesajlar"", executor)%"
                        else:
                            send "%{prefix}% %placeholder(yaml value ""Sifre-Mesajlari.Hatali-Sifre"" in ""BP-Mesajlar"", executor)%"
                    else:
                        send "%{prefix}% %placeholder(yaml value ""Sifre-Mesajlari.Sifre-Girilmemis"" in ""BP-Mesajlar"", executor)%"
                else:
                    send "%{prefix}% %placeholder(yaml value ""Giris-Cikis-Mesajlari.Giris-Yapilmis"" in ""BP-Mesajlar"", executor)%"
            else:
                send "%{prefix}% %placeholder(yaml value ""Sifre-Mesajlari.Sifre-Koyunuz"" in ""BP-Mesajlar"", executor)%"
#--------------------------------------------------------------
        arg-1 is "çıkış" or "cik" or "c" or "cikis":
            {sifre::%player%} is set:
                {kilit::%player%} is true:
                    set {kilit::%player%} to false
                    send "%{prefix}% %placeholder(yaml value ""Giris-Cikis-Mesajlari.Cikis-Yapildi"" in ""BP-Mesajlar"", executor)%"
                else:
                    send "%{prefix}% %placeholder(yaml value ""Giris-Cikis-Mesajlari.Giris-Yapiniz"" in ""BP-Mesajlar"", executor)%"
            else:
                send "%{prefix}% %placeholder(yaml value ""Sifre-Mesajlari.Sifre-Koyunuz"" in ""BP-Mesajlar"", executor)%"
#--------------------------------------------------------------
        arg-1 is "aç" or "ac":
            if {kilit::%player%} is true:
                wait 1 tick
                {bakiye::%player%} is not set:
                    set {bakiye::%player%} to 0
                open virtual chest with size 1 named "&4Bankam" to player
                make gui slot 0 of player with emerald named "%{modul::yatir}%" with lore "&6&l+ &7Bankana para ekle! &6&l+" to close then run player command "banka yatır"
                make gui slot 1 of player with {@cam} named "%{modul::ayirici}%" to nothing
                make gui slot 2 of player with redstone named "%{modul::cek}%" with lore "&6&l+ &7Bankadan para çek! &6&l+" to close then run player command "banka çek"
                make gui slot 7 of player with paper named "%{modul::bakiye}%" with lore "&6&l+ &eBanka Bakiyesi &7%{bakiye::%player%}% TL||&6&l+ &eSizin Bakiyeniz: &7%player's balance%" to nothing
                make gui slot 8 of player with {@cam} named "%{modul::cik}%" to close
#--------------------------------------------------------------
        arg-1 is "yatır" or "çek":
            wait 1 tick
            open virtual chest with size 1 named "&4Para Işlemleri" to player
            arg-1 is "yatır":
                make gui slot 0 of player with emerald named "%{modul::yatir}%" with lore "&6&l+ &7%{borsa::islem::1}%" to run player command "islem yatır 1"
                make gui slot 1 of player with emerald named "%{modul::yatir}%" with lore "&6&l+ &7%{borsa::islem::2}%" to run player command "islem yatır 2"
                make gui slot 2 of player with emerald named "%{modul::yatir}%" with lore "&6&l+ &7%{borsa::islem::3}%" to run player command "islem yatır 3"
                make gui slot 3 of player with emerald named "%{modul::yatir}%" with lore "&6&l+ &7%{borsa::islem::4}%" to run player command "islem yatır 4"
                make gui slot 4 of player with emerald named "%{modul::yatir}%" with lore "&6&l+ &7%{borsa::islem::5}%" to run player command "islem yatır 5"
                make gui slot 5 of player with emerald named "%{modul::yatir}%" with lore "&6&l+ &7%{borsa::islem::6}%" to run player command "islem yatır 6"
                make gui slot 6 of player with emerald named "%{modul::yatir}%" with lore "&6&l+ &7%{borsa::islem::7}%" to run player command "islem yatır 7"
                make gui slot 8 of player with {@cam} named "%{modul::geriDon}%" to close then run player command "/banka aç"
            arg-1 is "çek":
                make gui slot 0 of player with redstone named "%{modul::cek}%" with lore "&6&l+ &7%{borsa::islem::1}%" to run player command "islem çek 1"
                make gui slot 1 of player with redstone named "%{modul::cek}%" with lore "&6&l+ &7%{borsa::islem::2}%" to run player command "islem çek 2"
                make gui slot 2 of player with redstone named "%{modul::cek}%" with lore "&6&l+ &7%{borsa::islem::3}%" to run player command "islem çek 3"
                make gui slot 3 of player with redstone named "%{modul::cek}%" with lore "&6&l+ &7%{borsa::islem::4}%" to run player command "islem çek 4"
                make gui slot 4 of player with redstone named "%{modul::cek}%" with lore "&6&l+ &7%{borsa::islem::5}%" to run player command "islem çek 5"
                make gui slot 5 of player with redstone named "%{modul::cek}%" with lore "&6&l+ &7%{borsa::islem::6}%" to run player command "islem çek 6"
                make gui slot 6 of player with redstone named "%{modul::cek}%" with lore "&6&l+ &7%{borsa::islem::7}%" to run player command "islem çek 7"
                make gui slot 8 of player with {@cam} named "%{modul::geriDon}%" to close then run player command "/banka aç"
#--------------------------------------------------------------
command /islem [<text>] [<text>]:
    trigger:
        arg-1 is "yatır":
            arg-2 is "1" or "2" or "3" or "4" or "5" or "6" or "7":
                player's balance >= {borsa::islem::%arg-2%}:
                    remove {borsa::islem::%arg-2%} from player's balance
                    add {borsa::islem::%arg-2%} to {bakiye::%player%}
                    send "%{prefix}% %placeholder(yaml value ""Islem-Mesajlari.Para-Yatirildi"" in ""BP-Mesajlar"", the command sender)%"
                player's balance < {borsa::islem::%arg-2%}:
                    send "%{prefix}% %placeholder(yaml value ""Islem-Mesajlari.Para-Yetersiz"" in ""BP-Mesajlar"", the command sender)%"
                    stop
        arg-1 is "çek":
            arg-2 is "1" or "2" or "3" or "4" or "5" or "6" or "7":
                {bakiye::%player%} >= {borsa::islem::%arg-2%}:
                    remove {borsa::islem::%arg-2%} from {bakiye::%player%}
                    add {borsa::islem::%arg-2%} to player's balance
                    send "%{prefix}% %placeholder(yaml value ""Islem-Mesajlari.Para-Cekildi"" in ""BP-Mesajlar"", the command sender)%"
                {bakiye::%player%} < {borsa::islem::%arg-2%}:
                    send "%{prefix}% %placeholder(yaml value ""Islem-Mesajlari.Bakiye-Yetersiz"" in ""BP-Mesajlar"", the command sender)%"
                    stop
Oldukça başarılı.Tebrikler.Ve mesela if ve else'den yararlanabilirdin böylelikle kodu dahada uzatmazdın.
 
Oldukça başarılı.Tebrikler.Ve mesela if ve else'den yararlanabilirdin böylelikle kodu dahada uzatmazdın.


Nerelerde kullanmamı önerirsiniz ? If {...} is ... yazmak yerine sadece {...} is .... yazmayı tercih ediyorum. Bahsettiğiniz buysa düzenlerim
 
Çok güzel olmuş ellerine sağlık. Texture packı beğendim texturenin adını söyler misiniz?
 
Çok güzel olmuş ellerine sağlık. Texture packı beğendim texturenin adını söyler misiniz?

Çok teşekkür ederim. Pack ismi Faithful 1.8. Bulamazsanız müsait zamanımda size gönderebilirim
 
Nerelerde kullanmamı önerirsiniz ? If {...} is ... yazmak yerine sadece {...} is .... yazmayı tercih ediyorum. Bahsettiğiniz buysa düzenlerim
Onu bende yapıyorum,ama mesela
Kod:
        arg-1 is "yenile":
            player is op:
                arg-2 is "config":
                    configYenile()
                    send "%{prefix}% %placeholder(yaml value ""Admin-Mesajlari.Config-Yenilendi"" in ""BP-Mesajlar"", executor)%"
                arg-2 is "mesajlar":
                    mesajYenile()
                    send "%{prefix}% %placeholder(yaml value ""Admin-Mesajlari.Mesajlar-Yenilendi"" in ""BP-Mesajlar"", executor)%"
#--------------------------------------------------------------
yerine,
Kod:
        arg-1 is "yenile":
            if player is op:
                arg-2 is "config":
                    configYenile()
                    send "%{prefix}% %placeholder(yaml value ""Admin-Mesajlari.Config-Yenilendi"" in ""BP-Mesajlar"", executor)%"
                arg-2 is "mesajlar":
                    mesajYenile()
                    send "%{prefix}% %placeholder(yaml value ""Admin-Mesajlari.Mesajlar-Yenilendi"" in ""BP-Mesajlar"", executor)%"
            else:
                send "&cYeterli Yetkin Bulunmamakta!" to player
#--------------------------------------------------------------
Gibi kullanabilirsin.Böylelikle oyuncuyuda bilgilendirmiş olursun.(Tamamiyle kendi görüşümdür istediğini yapabilirsin)
 
Onu bende yapıyorum,ama mesela
Kod:
        arg-1 is "yenile":
            player is op:
                arg-2 is "config":
                    configYenile()
                    send "%{prefix}% %placeholder(yaml value ""Admin-Mesajlari.Config-Yenilendi"" in ""BP-Mesajlar"", executor)%"
                arg-2 is "mesajlar":
                    mesajYenile()
                    send "%{prefix}% %placeholder(yaml value ""Admin-Mesajlari.Mesajlar-Yenilendi"" in ""BP-Mesajlar"", executor)%"
#--------------------------------------------------------------
yerine,
Kod:
        arg-1 is "yenile":
            if player is op:
                arg-2 is "config":
                    configYenile()
                    send "%{prefix}% %placeholder(yaml value ""Admin-Mesajlari.Config-Yenilendi"" in ""BP-Mesajlar"", executor)%"
                arg-2 is "mesajlar":
                    mesajYenile()
                    send "%{prefix}% %placeholder(yaml value ""Admin-Mesajlari.Mesajlar-Yenilendi"" in ""BP-Mesajlar"", executor)%"
            else:
                send "&cYeterli Yetkin Bulunmamakta!" to player
#--------------------------------------------------------------
Gibi kullanabilirsin.Böylelikle oyuncuyuda bilgilendirmiş olursun.(Tamamiyle kendi görüşümdür istediğini yapabilirsin)

Yardım mesajında görünen yenileme komutu eğer kullanıcı op ise gönderiliyor. Yani normal oyuncular /banka yazınca "yenile" komutunu göremiyor. O yüzden gerek duymadım.
 
addonlarını söyleyebilir misin?
 
Eline sağlık, çok güzel :)
 

Başarılı bir skript olmuş. Yeni açılacak sunucum için yararlı olacağını düşünüyorum. Ellerine sağlık!​
 
Güncelleme! v0.1.3:
- Yetkililer, başka oyuncunun bakiyesine bakabilir.
- Bakım sistemi eklendi.
- Şifre değiştirme Eklendi.
- Mesajlar dosyasına {bakiye} desteği eklendi.
- Admin yardımı eklendi.
- Çoğu komuta takma ad (aliase) eklendi.
- Kodun bazı kısımları kısaltıldı.
- Çoğu mesaj yeniden düzenlendi.
- Dosyalardaki mesajların sıralaması düzenlendi.
- Yardım mesajları geliştirildi.
- Şifre kaldırma sistemi kaldırıldı.
- Oyun içi yenileme kaldırıldı.
- Bazı gereksiz mesajlar kaldırıldı.

Gelecek Güncelleme v0.1.3.x:
- Çoklu-dil seçeneği eklenecek. (İngilizce & Türkçe)
- Olası bir bug varsa, o kapatılacak.
- Ve dahası...​
 
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