SkBank Recoded
Kodu buradan almanızı tavsiye etmem, tüm güncellemeler GitHub üzerinden ilerleyecektir.
Tıklayarak GitHub sayfasını ziyaret edip detaylı bilgi alabilirsiniz.
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.
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İ
Görseller:
Güncel değildir, fazla değişiklik olmadığı için değiştirmedim.
Ana Menü:
Para Yatırma-Çekme Menüsü:
Tecrübe Yatırma-Çekme Menüsü:
YAML Dosyaları:
Kayıt Dosyası: Tıkla Git
Mesajlar: Tıkla Git
Config: Tıkla Git
Kodu buradan almanızı tavsiye etmem, tüm güncellemeler GitHub üzerinden ilerleyecektir.
Tıklayarak GitHub sayfasını ziyaret edip detaylı bilgi alabilirsiniz.
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.
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!
- 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ı.
- 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.
- 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.
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İ
Görseller:
Güncel değildir, fazla değişiklik olmadığı için değiştirmedim.
Ana Menü:
Para Yatırma-Çekme Menüsü:
Tecrübe Yatırma-Çekme Menüsü:
YAML Dosyaları:
Kayıt Dosyası: Tıkla Git
Mesajlar: Tıkla Git
Config: Tıkla Git
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: