on load:
delete {scash::*}
if file "plugins/FCash/config.yml" doesn't exists:
create file "./plugins/FCash/config.yml"
# Sunucu
set yaml value "Prefix" from file "../../FCash/config.yml" to "&8[&aSO-Shop&8]"
set yaml value "KrediTur" from file "../../FCash/config.yml" to "&6SO-Kredisi"
set yaml value "Market.Adi" from file "../../FCash/config.yml" to "&lMARKET"
set yaml value "Kredi.Adi" from file "../../FCash/config.yml" to "&6Kredi"
set yaml value "Kredi.Slot" from file "../../FCash/config.yml" to "4"
add "&8&m---------------------------" to yaml list "Kredi.Aciklama" from file "../../FCash/config.yml"
add "" to yaml list "Kredi.Aciklama" from file "../../FCash/config.yml"
add "&6&l> &fKredin: {KREDI}" to yaml list "Kredi.Aciklama" from file "../../FCash/config.yml"
add "" to yaml list "Kredi.Aciklama" from file "../../FCash/config.yml"
add "&8&m---------------------------" to yaml list "Kredi.Aciklama" from file "../../FCash/config.yml"
set yaml value "Anahtar.Adi" from file "../../FCash/config.yml" to "&6Anahtar"
set yaml value "Anahtar.Slot" from file "../../FCash/config.yml" to "6"
set yaml value "Anahtar.Fiyat" from file "../../FCash/config.yml" to "20"
set yaml value "Anahtar.Mesaj" from file "../../FCash/config.yml" to "&7Basariyla &6Anahtar &7satin aldiniz!"
add "&8&m---------------------------" to yaml list "Anahtar.Aciklama" from file "../../FCash/config.yml"
add "" to yaml list "Anahtar.Aciklama" from file "../../FCash/config.yml"
add "&6&l> &fAnahtar Satin Al!" to yaml list "Anahtar.Aciklama" from file "../../FCash/config.yml"
add "" to yaml list "Anahtar.Aciklama" from file "../../FCash/config.yml"
add "&8&m---------------------------" to yaml list "Anahtar.Aciklama" from file "../../FCash/config.yml"
add "give {OYUNCU} 1" to yaml list "Anahtar.Komutlar" from file "../../FCash/config.yml"
wait 1 second
set {scash::prefix} to single value "Prefix" get of "./plugins/FCash/config.yml" parsed as text
set {scash::kt} to single value "KrediTur" get of "./plugins/FCash/config.yml" parsed as text
set {scash::ma} to single value "Market.Adi" get of "./plugins/FCash/config.yml" parsed as text
set {scash::ki} to single value "Kredi.Adi" get of "./plugins/FCash/config.yml" parsed as text
set {scash::ks} to single value "Kredi.Slot" get of "./plugins/FCash/config.yml" parsed as number
set {_altbilgi::*} to yaml list "Kredi.Aciklama" from file "../../FCash/config.yml"
set {scash::ka} to ""
loop {_altbilgi::*}:
set {scash::ka} to "%{scash::ka}%&7%loop-value%&r||"
set {scash::ai} to single value "Anahtar.Adi" get of "./plugins/FCash/config.yml" parsed as text
set {scash::as} to single value "Anahtar.Slot" get of "./plugins/FCash/config.yml" parsed as number
set {scash::af} to single value "Anahtar.Fiyat" get of "./plugins/FCash/config.yml" parsed as number
set {scash::am} to single value "Anahtar.Mesaj" get of "./plugins/FCash/config.yml" parsed as text
set {_altbilgi2::*} to yaml list "Anahtar.Aciklama" from file "../../FCash/config.yml"
set {scash::aa} to ""
loop {_altbilgi2::*}:
set {scash::aa} to "%{scash::aa}%&7%loop-value%&r||"
replace all "{FIYAT}" with "%{scash::af}%" in {scash::aa}
command /cash [<text>] [<text>] [<text>]:
trigger:
if arg-1 is "+":
if player has permission "fcash.+":
set {_pc} to single value "Oyuncular.%arg-2%.Kredi" get of "./plugins/FCash/data.yml" parsed as number
set {_gc} to arg-3 parsed as number
if {_gc} is set:
set {_nc} to {_pc} + {_gc}
set yaml value "Oyuncular.%arg-2%.Kredi" from file "../../FCash/data.yml" to "%{_nc}%"
message "%{scash::prefix}% &a%arg-2% &7Adlı Oyuncuya &a%arg-3% &7%{scash::kt}% &7Verdiniz Artık &a%{_nc}% &7%{scash::kt}% &7Var!"
else:
message "%{scash::prefix}%&7Hatalı Bir Sayı Girdiniz!"
else:
message "%{scash::prefix}%&c&oBunun İçin &efcash.+ &c&oYetkin Olması Gerek!"
else if arg-1 is "-":
if player has permission "fcash.-":
set {_pc} to single value "Oyuncular.%arg-2%.Kredi" get of "./plugins/FCash/data.yml" parsed as number
set {_gc} to arg-3 parsed as number
if {_gc} is set:
set {_nc} to {_pc} - {_gc}
set yaml value "Oyuncular.%arg-2%.Kredi" from file "../../FCash/data.yml" to "%{_nc}%"
message "%{scash::prefix}% &c%arg-2% &7Adlı Oyuncudan &c%arg-3% &7%{scash::kt}% &7Aldınız. Artık &c%{_nc}% &7%{scash::kt}% &7Var!"
else:
message "%{scash::prefix}%&7Hatalı bir Sayı Girdiniz!"
else:
message "%{scash::prefix}%&c&oBunun İçin &efcash.- &c&oYetkin Olması Gerek!"
else if arg-1 is "sorgula":
if player has permission "fcash.sorgula":
if arg-2 is set:
set {_pc} to single value "Oyuncular.%arg-2%.Kredi" get of "./plugins/FCash/data.yml" parsed as number
set {_pc} to "%{_pc}%"
replace all "<none>" with "0" in {_pc}
message "%{scash::prefix}% &a%arg-2% : &f%{_pc}%"
else:
message "%{scash::prefix}%&7Hatalı Bir Oyuncu Girdiniz!"
else:
message "%{scash::prefix}%&c&oBunun İçin &efcash.sorgula &c&oYetkin Olması Gerek!"
else if arg-1 is "market":
set {_pc} to single value "Oyuncular.%player%.Kredi" get of "./plugins/FCash/data.yml" parsed as number
open chest with 1 rows named "%{scash::ma}%" to player
wait 3 ticks
set {_ka} to "%{scash::ka}%"
replace all "{KREDI}" with "%{_pc}% %{scash::kt}%" in {_ka}
replace all "<none>" with "0" in {_ka}
format slot {scash::ks} - 1 of player with book named "%{scash::ki}%" with lore "%{_ka}%" to be unstealable
format slot {scash::as} - 1 of player with chest named "%{scash::ai}%" with lore "%{scash::aa}%" to close then run [execute player command "cash satinal"]
else if arg-1 is "bak":
set {_pc} to single value "Oyuncular.%player%.Kredi" get of "./plugins/FCash/data.yml" parsed as number
set {_pc} to "%{_pc}%"
replace all "<none>" with "0" in {_pc}
message "%{scash::prefix}% &aKredin : &f%{_pc}% %{scash::kt}%"
else if arg-1 is "satinal":
set {_pc} to single value "Oyuncular.%player%.Kredi" get of "./plugins/FCash/data.yml" parsed as number
if {_pc} is greater than or equal to {scash::af}:
set {_commands::*} to yaml list "Anahtar.Komutlar" from file "../../FCash/config.yml"
loop {_commands::*}:
set {_k} to "%loop-value%"
replace all "{OYUNCU}" with "%player%" in {_k}
execute console command "%{_k}%"
set {_nc} to {_pc} - {scash::af}
set yaml value "Oyuncular.%player%.Kredi" from file "../../FCash/data.yml" to "%{_nc}%"
message "%{scash::prefix}% %{scash::am}%"
stop
else:
message "%{scash::prefix}% &cYeterli %{scash::kt}% &cYok!"
else:
message "&6&m=============&2&lS&c&lO&7-&bCash&6&m============="
message "&6&l| &f/cash bak &7- Ne Kadar %{scash::kt}% &7Olduğuna Bakar"
message "&6&l| &f/cash market &7- Marketi Açar"
if player has permission "fcash.+":
message "&6&l| &f/cash + <Oyuncu> <Miktar> &7- Oyuncuya %{scash::kt}%&7 Verir!"
if player has permission "fcash.-":
message "&6&l| &f/cash - <Oyuncu> <Miktar> &7- Oyuncudan %{scash::kt}%&7 Alır!"
if player has permission "fcash.sorgula":
message "&6&l| &f/cash sorgula <Oyuncu> &7- Oyuncunun %{scash::kt}%&7'ini Gösterir!"