56 lines
1.8 KiB
Markdown
56 lines
1.8 KiB
Markdown
# ezoic_viltrumite.js — doSpeedBlitz() (satır 790)
|
||
|
||
[← ezoic_viltrumite.js](index.md) · [← Master](../../wiki.md)
|
||
|
||
Parça 1/2 · [sonraki](doSpeedBlitz-2.md)
|
||
|
||
```javascript
|
||
function doSpeedBlitz(c) {
|
||
var p = c.getPlayer();
|
||
if (!p) return;
|
||
if (onlyEzoic(p)) return;
|
||
if (onCooldown(p, "speedblitz")) return;
|
||
|
||
var w = c.getWorld();
|
||
var startPos = p.getPosition();
|
||
|
||
// Yakındaki hedefleri bul
|
||
var targets = [];
|
||
var ents = w.getEntities(startPos.x, startPos.y, startPos.z, 12);
|
||
for (var i = 0; i < ents.size(); i++) {
|
||
var e = ents.get(i);
|
||
if (e.isSame(p) || isEzoic(e)) continue;
|
||
if (!e.isLivingBase()) continue;
|
||
targets.push(e);
|
||
}
|
||
|
||
if (targets.length === 0) {
|
||
p.send("§7[Viltrumite] §cYakınlarda hedef bulunamadı!");
|
||
return;
|
||
}
|
||
|
||
// Cooldown sadece başarılı hedeflenmede başlasın
|
||
setCooldown(p, "speedblitz");
|
||
|
||
p.sendTitleDurations(0, 15, 5);
|
||
p.sendTitle("§b§l⚡ SPEED BLITZ ⚡");
|
||
w.playSound("minecraft:entity.enderdragon.flap", startPos.x, startPos.y, startPos.z, 2.0, 1.8);
|
||
spawnFx(w, "largesmoke", startPos.x, startPos.y + 0.5, startPos.z, 15, 0.4, 0.4, 0.4, 0.05);
|
||
|
||
var maxBlitz = Math.min(targets.length, 6);
|
||
var idx = 0;
|
||
|
||
function blitzNext(ctx) {
|
||
var pp = ctx.getPlayer();
|
||
if (!pp) return;
|
||
var ww = ctx.getWorld();
|
||
|
||
if (idx >= maxBlitz) {
|
||
// Başlangıç noktasına geri ışınlan
|
||
pp.setPosition(startPos.x, startPos.y, startPos.z);
|
||
pp.setMotion(0, 0, 0);
|
||
pp.setFallDistance(0);
|
||
|
||
ww.playSound("minecraft:entity.firework.large_blast", startPos.x, startPos.y, startPos.z, 1.5, 1.2);
|
||
```
|