options:
PermMsg: &cBu Komutu Kullanmaya Izniniz Yok! Kullanmak Icin Izin Bu Gerekli : &6
Perm: sirtcantasi.create
Perm2: sirtcantasi.delete
Vipperm: sirtcantasi.vip
on load:
if {sirtcantasi.id} isn't set:
set {sirtcantasi.id} to 0
on rightclick with a chest:
if player has permissions "{@Vipperm}"
loop {sirtcantasi.id} times:
add 1 to {_loop}
if name of player's held item is "%{sirtcantasi.%{_loop}%.name}%":
cancel event
open chest with {sirtcantasi.%{_loop}%.columns} rows named "%{sirtcantasi.%{_loop}%.name}%" to player
set {rows.%player%} to {sirtcantasi.%{_loop}%.columns} * 9
wait 2 ticks
loop {sirtcantasis::%player%::*}:
add loop-value to current inventory of player
set {sirtcantasis.%player%} to true
on inventory close:
if {sirtcantasis.%player%} is true:
clear {sirtcantasis::%player%::*}
loop {rows.%player%} times:
set {sirtcantasis::%player%::%loop-number - 1%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
set {sirtcantasis.%player%} to false
delete {rows.%player%}
command /sirtcantasi [<String>] [<int>] [<int>] [<text>]:
description: §cSirt Cantasi
aliases: bp, bag
trigger:
if arg 1 isn't set:
send "&6&m-----&6> &b&lSirtCantasi &6<&6&m----"
send "&4/sirtcantasi olustur <sayi> <fiyat> <isim>%nl%&6 Yeni bir sirt cantasi olusturur."
send "&4/sirtcantasi sil <id>%nl%&6 Belirlenen id'ye sahip sirt cantasini siler."
send "&4/sirtcantasi al <id>%nl%&6 Belirlenen id'ye sahip sirt cantasini satin alir."
send "&4/sirtcantasi bilgi <id>%nl%&6 Belirlenen id'ye sahip sirt cantasi hakkinda bilgi verir."
send "&4/sirtcantasi listesi%nl%&6 Sirt cantasi listesini gosterir."
if arg 1 is "olustur":
if player has permission "{@Perm}":
if arg 2 is set:
if arg 3 is set:
if arg 4 is set:
set {_var} to arg 4
replace all "&" in {_var} with "§"
add 1 to {sirtcantasi.id}
set {sirtcantasi.%{sirtcantasi.id}%.name} to {_var}
set {sirtcantasi.%{sirtcantasi.id}%.price} to arg 3
set {sirtcantasi.%{sirtcantasi.id}%.columns} to arg 2
send "&6Sirt Cantasi Olusturuldu."
else:
send "&cLutfen Sirt Cantasinin Ismini Belirleyin!"
else:
send "&cLutfen Sirt Cantasinin Fiyatini Belirleyin!"
else:
send "&cLutfen Sirt Cantasinin Buyuklugunu Belirleyin!"
else:
send "{@PermMsg}{@Perm}"
if arg 1 is "sil":
if player has permission "{@Perm2}":
if arg 2 is set:
if arg 2 is below {sirtcantasi.id} + 1:
if arg 2 is greater than 0:
delete {sirtcantasi.%arg 2%.name}
delete {sirtcantasi.%arg 2%.price}
delete {sirtcantasi.%arg 2%.columns}
delete {sirtcantasi.id}
send "&6Sirt Cantasi Silindi!"
else:
send "&cLutfen 0 ile %{sirtcantasi.id}% arasinda bir sayi girin!"
else:
send "&cLutfen 0 ile %{sirtcantasi.id}% arasinda bir sayi girin!"
else:
send "&cSilmek istediginiz sirt cantasini belirtmediniz!"
else:
send "{@PermMsg}{@Perm2}"
if arg 1 is "al":
if arg 2 is set:
if arg 2 is below {sirtcantasi.id} + 1:
if arg 2 is greater than 0:
set {_bal} to {sirtcantasi.%arg 2%.price} - 1
set {_money} to player's balance
if {_money} is greater than {_bal}:
remove {sirtcantasi.%arg 2%.price} from player's balance
give a chest named "%{sirtcantasi.%arg 2%.name}%" with lore "||&6Kapasite : &c%{sirtcantasi.%arg 2%.columns}*9%" to player
send "%{sirtcantasi.%arg 2%.name}% &6Adinda bir canta satin aldiniz&6!"
else:
send "&cYetersiz Bakiye!"
else:
send "&cLutfen 0 ile %{sirtcantasi.id}% arasinda bir sayi giriniz!"
else:
send "&cLutfen 0 ile %{sirtcantasi.id}% arasinda bir sayi giriniz!"
else:
send "&cLutfen bir sirt cantasi ID'si giriniz!"
if arg 1 is "bilgi":
if arg 2 is set:
if arg 2 is below {sirtcantasi.id} + 1:
if arg 2 is greater than 0:
send "&c--> &r%{sirtcantasi.%arg 2%.name}% &c<--"
send "&6Kapasite : &c%{sirtcantasi.%arg 2%.columns}*9%"
send "&6Fiyat : &c%{sirtcantasi.%arg 2%.price}%$"
else:
send "&cLutfen 0 ile %{sirtcantasi.id}% arasinda bir sayi giriniz!"
else:
send "&cLutfen 0 ile %{sirtcantasi.id}% arasinda bir sayi giriniz!!"
else:
send "&cLutfen bir sirt cantasi ID'si giriniz!"
if arg 1 is "listesi":
loop {sirtcantasi.id} times:
add 1 to {_loop}
send "%nl%&cSirtCantasi %{_loop}% :%nl%&6Isim : &b&r&l%{sirtcantasi.%{_loop}%.name}%%nl%&6Aciklamalar : &b/sirtcantasi bilgi %{_loop}%%nl%"
on drop:
if item is chest named "%{sirtcantasi.%{sirtcantasi.id}%.name}%" with lore "||&6Kapasite : &c%{sirtcantasi.%{sirtcantasi.id}%.columns}*9%":
cancel event
send "&6Bu esyayi yere atamassin!" to player