# /satisakoy <fiyat> komutu - yalnızca OP'ler
command /satisakoy <number>:
permission: op
trigger:
set {_target} to targeted block
if {_target} is not set:
send "&cBakılan bir blok bulunamadı."
stop
set {_loc} to location of {_target}
set {_key} to "%world of {_loc}%:%x of {_loc}%:%y of {_loc}%:%z of {_loc}%"
set {satisbloklari::%{_key}%::fiyat} to arg-1
set {satisbloklari::%{_key}%::blok} to type of {_target}
send "&aBlok fiyatı ayarlandı: %{arg-1}%$"
every 1 tick:
loop all players:
set {_block} to loop-player's targeted block
if {_block} is not air:
set {_loc} to location of {_block}
set {_key} to "%world of {_loc}%:%x of {_loc}%:%y of {_loc}%:%z of {_loc}%"
if {satisbloklari::%{_key}%::fiyat} is set:
set {_fiyat} to {satisbloklari::%{_key}%::fiyat}
send action bar "&eFiyat: %{_fiyat}%$ &7(Sağ tıkla almak için)" to loop-player
on right click:
if event-block is a block:
set {_loc} to location of event-block
set {_key} to "%world of {_loc}%:%x of {_loc}%:%y of {_loc}%:%z of {_loc}%"
if {satisbloklari::%{_key}%::fiyat} is set:
set {_fiyat} to {satisbloklari::%{_key}%::fiyat}
set {_bloktipi} to {satisbloklari::%{_key}%::blok}
if balance of player >= {_fiyat}:
withdraw {_fiyat} from player
give {_bloktipi} to player
send "&aSatın alındı! %{_fiyat}%$ ödediniz."
else:
send "&cYeterli paranız yok. Gerekli: %{_fiyat}%$"
command /satisakoy <number>:
permission: op
trigger:
set {_target} to targeted block
if {_target} is not set:
send "&cBakılan bir blok bulunamadı."
stop
set {_loc} to location of {_target}
set {_key} to "%world of {_loc}%:%x of {_loc}%:%y of {_loc}%:%z of {_loc}%"
set {satisbloklari::%{_key}%::fiyat} to arg-1
set {satisbloklari::%{_key}%::blok} to type of {_target}
send "&aBlok fiyatı ayarlandı: %{arg-1}%$"
every 1 tick:
loop all players:
set {_block} to loop-player's targeted block
if {_block} is not air:
set {_loc} to location of {_block}
set {_key} to "%world of {_loc}%:%x of {_loc}%:%y of {_loc}%:%z of {_loc}%"
if {satisbloklari::%{_key}%::fiyat} is set:
set {_fiyat} to {satisbloklari::%{_key}%::fiyat}
send action bar "&eFiyat: %{_fiyat}%$ &7(Sağ tıkla almak için)" to loop-player
on right click:
if event-block is a block:
set {_loc} to location of event-block
set {_key} to "%world of {_loc}%:%x of {_loc}%:%y of {_loc}%:%z of {_loc}%"
if {satisbloklari::%{_key}%::fiyat} is set:
set {_fiyat} to {satisbloklari::%{_key}%::fiyat}
set {_bloktipi} to {satisbloklari::%{_key}%::blok}
if balance of player >= {_fiyat}:
withdraw {_fiyat} from player
give {_bloktipi} to player
send "&aSatın alındı! %{_fiyat}%$ ödediniz."
else:
send "&cYeterli paranız yok. Gerekli: %{_fiyat}%$"