Files

38 lines
1.5 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 — cast_mark() (satır 1742)
[← Hector_Tudors.js](index.md) · [← Master](../../wiki.md)
```javascript
function cast_mark(c) {
var p = c.getPlayer(); if (!p) return;
if (guard(p, "mark")) return;
var w = c.getWorld();
var target = pickTarget(p, 40);
if (!target) { p.sendActionBar("§7Hedef yok — bir düşmana bak"); p.getStates().setNumber("bk_cd_mark", 0); return; }
var pos = p.getPosition();
title(p, "§c§lKAFA DAMGASI", "§4mühürlendi");
w.playSound("minecraft:entity.elder_guardian.curse", pos.x, pos.y, pos.z, 1, 1.2);
var t = 0, DELAY = 40;
function loop(ctx) {
var ww = ctx.getWorld(), caster = ctx.getPlayer();
var tp; try { tp = target.getPosition(); } catch (e) { return; }
showHead(ww, tp.x, tp.y + target.getHeight() + 0.4, tp.z, 1.4 + Math.sin(t * 0.5) * 0.2, 2);
fx(ww, "reddust", tp.x, tp.y + 1, tp.z, 6, 0.4, 0.6, 0.4, 0);
if (t >= DELAY) {
boom(ww, tp.x, tp.y + 1, tp.z, 4);
var es = enemies(ww, tp.x, tp.y + 1, tp.z, 5, caster);
for (var i = 0; i < es.length; i++) {
var ep = es[i].getPosition();
hurt(es[i], 26, caster);
es[i].addMotion((ep.x - tp.x) * 0.3, 0.6, (ep.z - tp.z) * 0.3);
es[i].setFallDistance(0);
}
return;
}
t++; ctx.scheduleScript(1, loop);
}
c.scheduleScript(1, loop);
}
```