BuzTacı
Demir Cevheri Gibiyim
- Katılım
- 6 Eylül 2024
- Mesajlar
- 187
- Elmaslar
- 14
- Puan
- 745
- Yaş
- 15
- Konum
- Türkiye
- Minecraft
- texas41
Discord:
texas41_
Kodu değiştirdin mi? Değiştirdiysen son versiyonunu atar mısın? /elysium olarak kaydetmemiştim komutu.
Ayrıca kodu yükledikten sonra sunucunu yeniden başlatmayı unutma.
Sadece dunya ismini ve komutu değiştirdum okadar
options:
world: "Elysium" # buraya dünya ismi gir, dünyaışınlan komutu girildiğinde bu dünyaya atacak.
area: 300 # 300x300'lük bir alanda lokasyon bulacak.
blacklistedUnderBlocks: lava or water or air # seçilen lokasyonun altında istenilmeyen bloklar.
command /Elysium:
trigger:
if world of player isn't {@world}:
if {lastLocation::%player%} is set:
teleport player to {lastLocation::%player%}
stop
set {_loc1} to spawn of world {@world}
set {_loc2} to spawn of world {@world}
set y-coord of {_loc1} to 0
set y-coord of {_loc2} to 0
add {@area} to {_loc1}'s x-coord
add {@area} to {_loc1}'s z-coord
remove {@area} from {_loc2}'s x-coord
remove {@area} from {_loc2}'s z-coord
set {_loc} to getRandomLocation({_loc1}, {_loc2})
while isSafeToTeleport({_loc}) isn't true:
add 1 to y-coord of {_loc}
if y-coord of {_loc} > 200:
set {_loc} to getRandomLocation({_loc1}, {_loc2})
teleport player to {_loc}
else:
send "&cBu dünyada bu komutu kullanamazsın." to player
play sound "block.note_block.bass" at pitch 0.5 to player
on quit:
if world of player is {@world}:
set {lastLocation::%player%} to location of player
on teleport:
if world of past event-location is {@world}:
set {lastLocation::%player%} to past event-location
local function getRandomLocation(loc1: location, loc2: location) :: location:
set {_randomX} to random number between x-coord of {_loc1} and x-coord of {_loc2}
set {_randomZ} to random number between z-coord of {_loc1} and z-coord of {_loc2}
set {_loc} to location(0,0,0, world of {_loc1})
set x-coord of {_loc} to {_randomX}
set y-coord of {_loc} to 0
set z-coord of {_loc} to {_randomZ}
return {_loc}
local function isSafeToTeleport(loc: location) :: boolean:
set {_blockabove} to {_loc}
add 1 to y-coord of {_blockabove}
set {_block2above} to {_loc}
add 2 to y-coord of {_block2above}
if (block at {_loc}) or (block at {_blockabove}) or (block at {_block2above}) is solid:
return false
if block under {_loc} is {@blacklistedUnderBlocks}:
return false
if block under {_loc} isn't solid:
return false
return true