Files

26 lines
1.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Hector_Tudors.js — eng_pillar() (satır 2498)
[← Hector_Tudors.js](index.md) · [← Master](../../wiki.md)
```javascript
function eng_pillar(c, sk) {
var p = c.getPlayer(); if (!p) return; if (guard(p, sk.k)) return;
var cf = sk.cfg, w = c.getWorld(), a = aimPoint(p, cf.range || 30);
etitle(p, sk);
if (cf.snd) w.playSound(cf.snd, a.x, a.y, a.z, 2, 0.7);
var t = 0, H = cf.height || 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, cf.up || 1.4, 0); es[i].setFallDistance(0); hurt(es[i], cf.dmg || 6, caster); }
t++; ctx.scheduleScript(1, loop);
}
c.scheduleScript(1, loop);
}
```