#Kodlama; smt287
#MC-TR.com
#EventSk
#Sürüm 1.0 (canım sıkılınca üstüne bişeyler eklerim belki)
command /event [<text>] [<text>]:
permission: sk.admin
permission message: &cBunu yapmak için yetkin yok!
trigger:
if arg 1 is not set:
send " &7> &6/event yerayarla &r- &eevent yerini ayarlar"
send " &7> &6/event spawnayarla &r- &espawn yerini ayarlar"
send " &7> &6/event saatayarla <saat> &r- &eevent saat(ler)ini ayarlar"
send " &7> &6Örnek Saat;&r12:00 - 13:00 - 15:40 - 23:59"
send " &7> &6/event saatleri &r- &eevent saatlerini gösterir"
send " &7> &6/event baslat &r- &eeventi başlatır"
if arg 1 is "yerayarla":
set {event} to location of player
execute player command "rain add EVENT"
send " &7> &aEvent yeri başarıyla ayarlandı!"
if arg 1 is "saatayarla":
execute player command "tce set %arg 2%:00 event baslat"
add arg-2 to {eventsaatleri::*}
send " &7> &aEvent saati başarıyla ayarlandı!"
send " &7> &aEvent Saati;&9 %arg 2%"
if arg 1 is "saatler":
send "&7> &6Event Saatleri:"
set {_esn} to 1
loop {eventsaatleri::*}:
set {esn.%loop-value%} to {_esn}
send "%{esn.%loop-value%}%. %loop-value%"
add 1 to {_esn}
if arg 1 is "spawnayarla":
set {spawn} to location of player
send " &7> &aSpawn yeri başarıyla ayarlandı!"
if arg 1 is "baslat":
broadcast " &7> &aEvent 1 dakika içinde başlayacaktır!"
broadcast " &7> &aEvent başladığında event alanına otomatik olarak çekileceksiniz!"
wait 1 minute
set {eventbasladi} to true
loop all players:
teleport loop-player to {event}
broadcast " &7> &aEvent başladı!"
broadcast " &7> &aEvent 3 dakika içinde bitecektir!"
execute console command "rain diamond EVENT"
wait 30 second
execute console command "rain goldingot EVENT"
wait 30 second
execute console command "rain ironingot EVENT"
wait 30 second
execute console command "rain emerald EVENT"
wait 30 second
execute console command "rain redstone EVENT"
wait 30 second
execute console command "rain diamond EVENT"
wait 30 second
execute console command "rain goldenapple EVENT"
delete {eventbasladi}
broadcast " &7> &aEvent bitmiştir, iyi oyunlar!"
loop all players:
teleport loop-player to {spawn}
wait 0.5 second
teleport loop-player to {spawn}
on command:
if {eventbasladi} is true:
command is not "login"
command is not "register"
command is not "kayitol"
command is not "kayit"
command is not "l"
command is not "giris"
command is not "heal"
command is not "feed"
if player doesn't have the permission "sk.admin":
cancel event
send " &7> &cEventte iken komut kullanamazsın!"
on join:
if {eventbasladi} is true:
if player doesn't have the permission "sk.admin":
send " &7> &aEvent aktif olduğu için event alanına yönlendiriliyorsunuz..."
teleport player to {event}
wait 2 second
teleport player to {event}
on region exit:
if "%region at player%" contains "event":
if player doesn't have the permission "sk.admin":
teleport player to {event}
send " &7> &cEvent devam ederken, event alanından ayrılamazsın!"