32 lines
1.2 KiB
Markdown
32 lines
1.2 KiB
Markdown
# Hector_Tudors.js — cast_pillar() (satır 1517)
|
||
|
||
[← Hector_Tudors.js](index.md) · [← Master](../../wiki.md)
|
||
|
||
```javascript
|
||
function cast_pillar(c) {
|
||
var p = c.getPlayer(); if (!p) return;
|
||
if (guard(p, "pillar")) return;
|
||
var w = c.getWorld(), a = aimPoint(p, 30);
|
||
title(p, "§9§lYÜZ SÜTUNU", "§bfışkır!");
|
||
w.playSound("minecraft:entity.generic.explode", a.x, a.y, a.z, 2, 0.7);
|
||
|
||
var t = 0, H = 12;
|
||
function loop(ctx) {
|
||
var ww = ctx.getWorld(), caster = ctx.getPlayer();
|
||
if (t >= H) return;
|
||
var yy = a.y + t * 1.2;
|
||
showHead(ww, a.x, yy, a.z, 2.2, 2);
|
||
fx(ww, "cloud", a.x, yy, a.z, 8, 0.3, 0.1, 0.3, 0.02);
|
||
fx(ww, "endRod", a.x, yy, a.z, 6, 0.2, 0.1, 0.2, 0.05);
|
||
var es = enemies(ww, a.x, a.y + 1.5, a.z, 2.5, caster);
|
||
for (var i = 0; i < es.length; i++) {
|
||
es[i].setMotion(0, 1.4, 0); es[i].setFallDistance(0);
|
||
hurt(es[i], 6, caster);
|
||
}
|
||
if (t % 3 === 0) ww.playSound("minecraft:block.note.bass", a.x, yy, a.z, 1, 0.6);
|
||
t++; ctx.scheduleScript(1, loop);
|
||
}
|
||
c.scheduleScript(1, loop);
|
||
}
|
||
```
|