Kod:
on inventory click:
clicked slot is 35
player's gamemode is survival
cancel event
lore of clicked slot is " &5Envanter: &61" or " &5Envanter: &62"
if {ciftenvanter.%player%} is 2:
set {esay.%player%} to 0
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &c5 Saniye bekle"
loop 36 times:
set {2cenv.%player%.%{esay.%player%}%} to slot {esay.%player%} of player's inventory
set slot {esay.%player%} of player's inventory to {1cenv.%player%.%{esay.%player%}%}
add 1 to {esay.%player%}
{esay.%player%} is 35
clear {2cenv.%player%.35}
set {ciftenvanter.%player%} to 1
clear {esay.%player%}
wait 1 seconds
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &c4 Saniye bekle"
wait 1 seconds
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &c3 Saniye bekle"
wait 1 seconds
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &c2 Saniye bekle"
wait 1 seconds
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &c1 Saniye bekle"
wait 1 seconds
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &5Envanter: &61"
stop
if {ciftenvanter.%player%} is 1:
set {esay.%player%} to 0
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &c5 Saniye bekle"
loop 36 times:
set {1cenv.%player%.%{esay.%player%}%} to slot {esay.%player%} of player's inventory
set slot {esay.%player%} of player's inventory to {2cenv.%player%.%{esay.%player%}%}
add 1 to {esay.%player%}
{esay.%player%} is 35
clear {1cenv.%player%.35}
set {ciftenvanter.%player%} to 2
clear {esay.%player%}
wait 1 seconds
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &c4 Saniye bekle"
wait 1 seconds
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &c3 Saniye bekle"
wait 1 seconds
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &c2 Saniye bekle"
wait 1 seconds
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &c1 Saniye bekle"
wait 1 seconds
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &5Envanter: &62"
stop
on join:
if {ciftenvanter.%player%} is not set:
set {ciftenvanter.%player%} to 1
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &5Envanter: &61"
else:
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &5Envanter: &6%{ciftenvanter.%player%}%"
on death:
victim is a player
loop drops:
loop-value is chest named "&5&l► &aEnvanter değiştir"
remove loop-value from the drops
if player doesn't have permission "ciftenv.sk":
if {ciftenvanter.%victim%} is 2:
set {esay2.%victim%} to 0
loop 35 times:
drop {1cenv.%victim%.%{esay2.%victim%}%} at victim's location
clear {1cenv.%victim%.%{esay2.%victim%}%}
add 1 to {esay2.%victim%}
{esay2.%victim%} is 35
clear {esay2.%victim%}
stop
if {ciftenvanter.%victim%} is 1:
set {esay2.%victim%} to 0
loop 35 times:
drop {2cenv.%victim%.%{esay2.%victim%}%} at victim's location
clear {2cenv.%victim%.%{esay2.%victim%}%}
add 1 to {esay2.%victim%}
{esay2.%victim%} is 35
clear {esay2.%victim%}
stop
on respawn:
if {ciftenvanter.%player%} is not set:
set {ciftenvanter.%player%} to 1
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &5Envanter: &61"
else:
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &5Envanter: &6%{ciftenvanter.%player%}%"
command /clear [<player>]:
permission: op.sk
permission message: &cBu komut için gerekli yetkiye sahip değilsiniz.
trigger:
arg-1 is set:
arg-1 is online:
clear arg-1's inventory
set arg-1's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &5Envanter: &6%{ciftenvanter.%arg-1%}%"
send "&6%player% &aisimli yetkili görünen envanterinizi temizledi" to arg-1
send "&6%arg-1% &aisimli oyuncunun şu anda açık olan envanteri temizlendi" to player
else:
clear player's inventory
set player's slot 35 to chest named "&5&l► &aEnvanter değiştir" with lore " &5Envanter: &6%{ciftenvanter.%player%}%"
send "&aGörünen envanteriniz temizlendi" to player