command kod [<text>] [<text>]:
trigger:
send "&eKod kullanmak için &f/kod &ekomutunu girip boşluk bırakarak kodunu gir&f." if arg 1 isn't set
arg 1 is set
arg 1 = "liste":
send "&eBu komutu sadece yetkililer kullanabilir&f." if player doesn't have permission "kod"
stop if player doesn't have permission "kod"
send "&fListe: &e%{kodlar::*} otherwise "&eHerhangi bir kod eklenmemiş."%" if arg 1 = "liste"
stop
arg 1 != "oluştur" or "liste" or "sil":
send "&eBöyle bir kod bulunmamaktadır." if {kodlar::*} doesn't contain arg 1
stop if {kodlar::*} doesn't contain arg 1
send "&eBu kodu daha önce kullanmışsın." if {kod.%arg 1%::%player's uuid%} = 0
stop if {kod.%arg 1%::%player's uuid%} = 0
send "&eKod başarıyla kullanıldı&f."
console command "%{kodkomut::%arg 1%}%"
set {kod.%arg 1%::%player's uuid%} to 0
stop
arg 1 = "sil":
send "&eBu komutu sadece yetkililer kullanabilir&f." if player doesn't have permission "kod"
stop if player doesn't have permission "kod"
send "&eBir kod belirtmelisin&f." if arg 2 isn't set
stop if arg 2 isn't set
send "&eBöyle bir kod bulunamadı&f." if {kodlar::*} doesn't contain arg 2
stop if {kodlar::*} doesn't contain arg 2
delete {kod.%arg 2%::%players' uuid%}
remove arg 2 from {kodlar::*}
send "&eKod başarıyla silindi&f."
stop
arg 1 = "oluştur":
send "&eBu komutu yetkililer kullanabilir&f." if player doesn't have permission "kod"
stop if player doesn't have permission "kod"
send "&eBir kod oluşturmak için &f/kod oluştur &ekomutunu girip boşluk bırakarak kodu girebilirsin&f." if arg 2 isn't set
stop if arg 2 isn't set
send "&eBu kod zaten bulunuyor&f. &eSilmek için <tooltip:&e/kod sil %arg 2%><command:/kod sil %arg 2%>&f&nburaya<reset>&e tıkla." if {kodlar::*} contains arg 2
stop if {kodlar::*} contains arg 2
add arg 2 to {kodlar::*}
set {kodkomut::%arg 2%} to "eco give %player% 10000"
send "&eBaşarıyla yeni kod eklendi.%nl%&eSohbete &f/ &eişareti olmadan bir komut gir, girilen komut bu kodun ödül komutu olacak&f.%nl%&eEğer &fiptal &eyazarsan koda ana ödül kalır&f. (&e10.000 bakiye&f)"
set player's metadata "KOD" to arg 2
stop
chat:
player's metadata "KOD" is set
message = "iptal":
cancel event
send "&eKod ödülü değiştirilmedi&f."
delete player's metadata "KOD"
stop
cancel event
set {kodkomut::%player's metadata "KOD"%} to message
send "&eÖdül değiştirildi&f."
delete player's metadata "KOD"
stop