diff options
author | Hello TMW <hello@themanaworld.org> | 2024-10-30 18:03:06 +0000 |
---|---|---|
committer | Led Mitz <smoothshifter@tuta.io> | 2024-10-30 18:03:06 +0000 |
commit | ad066a6c3faf848f3fc82c58bfbc8eaa1a422ea4 (patch) | |
tree | 56d6a7bd9cb55bcfcf03555e53428c00634d71df /world/map | |
parent | b63ac45a0596b7e65af091b1b7530a82f0ffd36a (diff) | |
download | serverdata-ad066a6c3faf848f3fc82c58bfbc8eaa1a422ea4.tar.gz serverdata-ad066a6c3faf848f3fc82c58bfbc8eaa1a422ea4.tar.bz2 serverdata-ad066a6c3faf848f3fc82c58bfbc8eaa1a422ea4.tar.xz serverdata-ad066a6c3faf848f3fc82c58bfbc8eaa1a422ea4.zip |
Bosspowers overhaul - new spells, fixes, tweaks,...
**NOTE: depends on** https://git.themanaworld.org/legacy/serverdata/-/merge_requests/814 to be merged before it.
(uses TeleportManager features to open warps - otherwise mapserver would fail to start)
Rather big BossPowers (pseudo)spells pack including tweaks/fixes/new features:
* #totheabyss/#tothecrypt: Randomize warp times so players see each other teleporting.
* #totheabyss/#tothecrypt: Hopefully fix DCs and boss sudden deaths on teleport.
* #tormenta: try to restore original class of caster on timeout and visuals.
* bosspowers checks: small changes to how it done and unification with TeleportManager.
** Eventer flag is IS_EVENTER in both.
** DENY is PER ACCOUNT (#BP_DISABLE) - otherwise ppl can bypass DENY flag by creating new char.
* Extras: few functions for magic refactors (used by multitarget lightning, WIP).
* #mappoison: reduce cooldown.
* #headshot: reduce cooldown and slow player on hit.
* #mapmanadrain: reduce cooldown.
* #maplifedrain: reduce cooldown.
* #grenades: nearly stun players for short time + reduce cooldown.
* #mapmassslow: new spell, does what advertised, makes boss considerably more scary.
* New pseudospell, #bossflee. Example: #bossflee 070-1 25 25
(lets boss to escape in a stylish manner, opening transient teleport)
Diffstat (limited to 'world/map')
-rw-r--r-- | world/map/npc/magic/_import.txt | 2 | ||||
-rw-r--r-- | world/map/npc/magic/_procedures.txt | 118 | ||||
-rw-r--r-- | world/map/npc/magic/event-boss-powerup-flee.txt | 94 | ||||
-rw-r--r-- | world/map/npc/magic/event-boss-powerup-grenades.txt | 5 | ||||
-rw-r--r-- | world/map/npc/magic/event-boss-powerup-headshot.txt | 5 | ||||
-rw-r--r-- | world/map/npc/magic/event-boss-powerup-lifedrain.txt | 4 | ||||
-rw-r--r-- | world/map/npc/magic/event-boss-powerup-manadrain.txt | 4 | ||||
-rw-r--r-- | world/map/npc/magic/event-boss-powerup-massslow.txt | 35 | ||||
-rw-r--r-- | world/map/npc/magic/event-boss-powerup-poison.txt | 4 | ||||
-rw-r--r-- | world/map/npc/magic/event-boss-powerup-tormenta.txt | 5 | ||||
-rw-r--r-- | world/map/npc/magic/event-boss-powerup-totheabyss.txt | 17 | ||||
-rw-r--r-- | world/map/npc/magic/event-boss-powerup-tothecrypt.txt | 13 |
12 files changed, 257 insertions, 49 deletions
diff --git a/world/map/npc/magic/_import.txt b/world/map/npc/magic/_import.txt index 4c5dc1ed..395bbd96 100644 --- a/world/map/npc/magic/_import.txt +++ b/world/map/npc/magic/_import.txt @@ -56,3 +56,5 @@ npc: npc/magic/event-boss-powerup-tothecrypt.txt npc: npc/magic/event-boss-powerup-disarm.txt npc: npc/magic/event-boss-powerup-grenades.txt npc: npc/magic/event-boss-powerup-headshot.txt +npc: npc/magic/event-boss-powerup-massslow.txt +npc: npc/magic/event-boss-powerup-flee.txt diff --git a/world/map/npc/magic/_procedures.txt b/world/map/npc/magic/_procedures.txt index 601d5b15..517373e2 100644 --- a/world/map/npc/magic/_procedures.txt +++ b/world/map/npc/magic/_procedures.txt @@ -94,50 +94,49 @@ L_Return: return 0; } - -// this function is call()-only // Custom version of checks for Dungeon Masters boss "powerups". // Both GMs and player eventers MAY eventually call "boss powerups". // By default, only GMs >= 40 can use BossPowers, but: -// - If someone abuses BossPowers, setting #BOSS_POWERS_DISABLED = 1 on them locks them out. -// - Some (trusted) player can be allowed to invoke this by setting #IS_EVENTER = 42 on them. +// - If someone abuses BossPowers, setting #BP_DISABLED = 1 on them locks them out. +// - Some (trusted) player can be allowed to invoke this by setting BP_EVENTER = 42 on them. // On TMWA these changes need GM Lv 80 to issue @setvar, so access can only be changed by Lv 80. // Advantage of this permissions system is: no need to shuffle GM levels, nor there's need to restart server. - function|script|boss_powerup_checks { - set .@flags, getarg(0); - set .@nonmagic, .@flags & (1<<0); - - if ($BOSS_KILLSWITCH) goto L_Killswitch; // If things go wrong, boss powers can be completely disabled. - if (#BOSS_POWERS_DISABLED) goto L_Killswitch; // If someone abuses BossPowers they can get DENY flag set. - if (HIDDEN) goto L_Hidden; // can not cast with @hide - if (@_M_BLOCK) goto L_Blocked; // check if last debuff ended - if (Hp < 1) goto L_Dead; // can not cast when dead - if (GM >= 40) goto L_Allowed; // GM >= 40 can use boss actions - if (#IS_EVENTER == 42) goto L_Allowed; // Trusted player(s) could be allowed to access Eventer "magic": - // Use @setvar #IS_EVENTER 0 42 Nick (GM Lv 80 command) to do it. + if (HIDDEN) goto L_Hidden; // can not cast with @hide + if (Hp < 1) goto L_Dead; // can not cast when dead + if (@_M_BLOCK) goto L_Blocked; // check if last debuff ended + if ($BP_DISABLE) goto L_Killswitch1; // If things go wrong, boss powers can be completely disabled. + if (#BP_DISABLE) goto L_Killswitch2; // If someone abuses BossPowers there's _per-account_ DENY flag. + if (GM >= 40) goto L_Allowed; // GM >= 40 can use boss actions. + if (IS_EVENTER == 42) goto L_Allowed; // Trusted player(s) could be allowed to access Eventer "magic": + // Use @setvar BP_EVENTER 0 42 Nick (GM Lv 80 command). smsg SMSG_FAILURE, "BossPowers: Only few of mere mortals may try to enter the twilight zone"; - return 1; // Not allowed by default. + return 1; // Not allowed by default. L_Allowed: - return 0; // Whoever gets here allowed to invoke BossPowers spells + return 0; // Whoever gets here allowed to invoke BossPowers spells -L_Killswitch: - smsg SMSG_FAILURE, "BossPowers: disabled by kill switch!"; +L_Dead: + smsg SMSG_FAILURE, "BossPowers: you're dead!"; return 2; L_Hidden: smsg SMSG_FAILURE, "BossPowers: can't be used when hidden!"; return 3; -L_Blocked: - smsg SMSG_FAILURE, "BossPowers: cooldown is in effect. Please wait."; +L_Killswitch1: + smsg SMSG_FAILURE, "BossPowers: unavailable at the moment (KillSwitch 1)"; return 4; -L_Dead: - smsg SMSG_FAILURE, "BossPowers: you're dead!"; +L_Killswitch2: + smsg SMSG_FAILURE, "BossPowers: unavailable at the moment (KillSwitch 2)"; return 5; + +L_Blocked: + smsg SMSG_FAILURE, "BossPowers: cooldown is in effect. Please wait."; + return 6; + } function|script|elt_damage @@ -286,3 +285,74 @@ function|script|gain_heal_xp L_Return: return 0; } + +// magic_activity should be called with player RID attached. +// This function used to keep track of magic activity. +function|script|magic_activity +{ + set CASTS, CASTS + 1; + if (CASTS < 0) set CASTS, 1; // overflow + return; +} + +// consume_sp must be called with player RID attached. +// Params: arg(0): amount of XP to consume. +// Return: 0 on success. On failure: nonzero + message to caster. +function|script|consume_sp +{ + if (getarg(0) <= 0) goto L_SpArgFail; // Usage bug? Function fails. + if (Sp < getarg(0)) goto L_NoSp; // Caster lacks enough Sp, fail. + set Sp, (Sp - getarg(0)); // Consume Sp and return success. + callfunc "magic_activity"; // Call activity here to unclutter spells. + return 0; + +L_NoSp: + message strcharinfo(0), "Magic : ##3##BNot enough Mana!"; + return 1; + +L_SpArgFail: + debugmes "bug: consume_sp needs arg(0) > 0"; + return 2; +} + +// spell_lv_checks helper must be called by spell NPC, with player RID attached. +// It expects "typical" spell NPC structure with .level ans .school +// Params: no args. Data taken from spell NPC. +// Return: 0 on success. On failure: nonzero + message to caster. +function|script|lvl_and_school_check +{ + if ((.level <= 0) || (.school <= 0)) goto L_LvCkFail; // Weird/missing school/level on NPC? + if (getskilllv(SKILL_MAGIC) < .level) goto L_LvCkReqs; // General magic < required level? + if (getskilllv(.school) < .level) goto L_LvCkReqs; // Magic school < required level? + return 0; // All checks passed -> success. + +L_LvCkReqs: + message strcharinfo(0), "Magic : ##3##BThis spell too hard for you yet."; + return 1; // User below spell requirements set on spell's NPC + +L_LvCkFail: + debugmes "bug: lvl_and_school_check needs .school and .level > 0 on spell NPC"; + return 2; // NPC bug or not called by spell NPC -> fail +} + +// magic_cooldown helper should be called with player RID attached. +// This function used to lock out spell. +// Input: arg0 - length of cooldown. +// Input: arg1 - optional: custom SC_COOLDOWN ID to use. +function|script|magic_block +{ + if (getarg(0) <= 0) goto L_Block_Fail; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer getarg(0), "Magic Timer::OnClear"; // Disable spell casting + if (getarg(1) > 0) goto L_CustomCool; // Custom cooldown ID given? + sc_start SC_COOLDOWN, getarg(0), 0, BL_ID; // If not -> default SC_COOLDOWN + return; + +L_CustomCool: + sc_start getarg(1), getarg(0), 0, BL_ID; // Apply custom cooldown. + return; + +L_Block_Fail: + debugmes "bug: magic_block needs arg(0) > 0"; + return; // Called wrong way -> spell bug. +} diff --git a/world/map/npc/magic/event-boss-powerup-flee.txt b/world/map/npc/magic/event-boss-powerup-flee.txt new file mode 100644 index 00000000..ee0e68a3 --- /dev/null +++ b/world/map/npc/magic/event-boss-powerup-flee.txt @@ -0,0 +1,94 @@ +// Opens transient teleport to allow boss to flee! +-|script|powerup-flee|32767 +{ + end; + +OnCast: + if (call("boss_powerup_checks")) end; + if (call("bossflee_parseargs")) goto L_EscPlanFail1; // @VARs like @POS_X set by bossflee_parseargs() +// Create actual teleport NPC ------- src map - src x src y --- name --- -NPC- Sz Sz dst map - dst x - dst y --time----cookie---managed? + set .@tp, call("teleport_create", getmap(), @POS_X, @POS_Y, "#bossflee", 324, 0, 0, @DSTMAP$, @DST_X, @DST_Y, 7000, 0xBADB055, 0); + if (.@tp <= 0) goto L_EscPlanFail2; // Has puppet() failed? + set .info$, "Teleport : Boss escapes!", .@tp; // on-click message. + set .cantpass$, "Teleport : somehow structure ignores you", .@tp; // "can't pass" message. + set teleport_cookie, 0xBADB055; // Allow caller (boss) to use teleport + mapannounce getmap(), strcharinfo(0)+" : Catch me, if you can!", 0; + end; + +L_EscPlanFail1: + message strcharinfo(0), "[#bossflee] : Escape plan status: fail! (bad destination?)"; + end; + +L_EscPlanFail2: + message strcharinfo(0), "[#bossflee] : Escape plan status: fail! (teleport creation failed)"; + end; + +// Puppet (teleportation pads) logic below. +// Invoked when player steps on npc. +OnTouch: + if ((.cookie) && (teleport_cookie != .cookie)) goto L_CantPass; + set teleport_cookie, 0; // Clear teleport cookie of player on teleport use. + sc_start SC_SLOWMOVE, .fx_time+100, 100000; // Slow player temporarily to avoid movement VS warp DCs + addtimer .fx_time, strnpcinfo(0)+"::OnTeleport"; // time before teleporting away + misceffect .fx; // Default .fx set in teleport_add, other code can override it. + end; + +L_CantPass: + message strcharinfo(0), .cantpass$; // NPC var allows to change message. + end; // "keyed" teleport and player didnt had proper cookie. + +// Teleportation timer event (attached to player). Queued by OnTouch. +OnTeleport: + warp .dstmap$, .dst_x, .dst_y; + end; + +// Invoked on timed teleport's NPC timer expired. +OnTeleportExpired: + destroy; + +OnInit: + set .invocation$, chr(MAGIC_SYMBOL) + "bossflee"; // used in npcs that refer to this spell + void call("magic_register", "OnCast"); + end; +} + +// Based on TeleportManager code - with +// This function MUST be invoked with player RID attached by powerup-flee +// Inputs: nothing, but assumes args$ set. +// Return: <= 0 on failure, 1 on success. +// Return: sets @POS_X, @POS_X, @DSTMAP$, @DST_X, @DST_Y, @NPCSPRITE, @TIMEOUT +function|script|bossflee_parseargs +{ + callfunc "argv_splitter"; + set @DSTMAP$, @argv$[0]; // Destination map + set @DST_X, @argv[1]; // Dst warp coordinates + set @DST_Y, @argv[2]; // Dst warp coordinates + // Check DST map is okay + if !(call("teleport_map_valid", @DSTMAP$)) goto L_FailBadmap; // DST: invalid map? + // Check DST X,Y sane + if ((@DST_X <= 0) || (@DST_Y <= 0)) goto L_FailBadDstXY1; // DST: invalids coords <= 0? + if ((getmapmaxx(@DSTMAP$) < @DST_X) || (getmapmaxy(@DSTMAP$) < @DST_Y)) goto L_FailBadDstXY2; // Outside of map? + // Check if DST is collision + if (iscollision(@DSTMAP$, @DST_X, @DST_Y)) goto L_FailDstCollide; + // Try adaptive NPC placement. Above caller if there's room or on caller if not. + set @POS_X, POS_X; + if ((POS_Y > 2) && !(iscollision(getmap(), POS_X, (POS_Y-2)))) set @POS_Y, (POS_Y - 2); + else set @POS_Y, POS_Y; // Overhead placement failed, use caller's tile + return 0; // Everything OK + +L_FailBadmap: + message strcharinfo(0), "[#bossflee] : unknown flee map:" + @DSTMAP$; + return 1; + +L_FailBadDstXY1: + message strcharinfo(0), "[#bossflee] : flee map X,Y must be > 0! Given X=" + @DST_X + " Y=" + @DST_Y; + return 2; + +L_FailBadDstXY2: + message strcharinfo(0), "[#bossflee] : flee map X,Y outside of map! Given X=" + @DST_X+ " Y=" + @DST_Y; + return 3; + +L_FailDstCollide: + message strcharinfo(0), "[#bossflee] : flee MAP=" + @DSTMAP$ + " X=" + @DST_X + " Y=" + @DST_Y + " is a collision (impassable)"; + return 4; +} diff --git a/world/map/npc/magic/event-boss-powerup-grenades.txt b/world/map/npc/magic/event-boss-powerup-grenades.txt index 0a692314..bf4d30c7 100644 --- a/world/map/npc/magic/event-boss-powerup-grenades.txt +++ b/world/map/npc/magic/event-boss-powerup-grenades.txt @@ -6,8 +6,8 @@ OnCast: if(call("boss_powerup_checks")) end; if (getmapflag(getmap(), MF_TOWN)) goto L_Fail_town; set @_M_BLOCK, 1; // block casting, until the timer clears it - addtimer 16000, "Magic Timer::OnClear"; // set the new debuff - sc_start SC_COOLDOWN, 16000, 0, BL_ID; + addtimer 12000, "Magic Timer::OnClear"; // set the new debuff + sc_start SC_COOLDOWN, 12000, 0, BL_ID; misceffect FX_MEDIUM_EXPLOSION, strcharinfo(0); set @dist, 5; foreach 0, getmap(), (POS_X - @dist), (POS_Y - @dist), (POS_X + @dist), (POS_Y + @dist), strnpcinfo(0) + "::OnHit"; @@ -22,6 +22,7 @@ OnHit: OnGrenadeHit: misceffect FX_MEDIUM_SMOKE, strcharinfo(0); + sc_start SC_SLOWMOVE, 2000, 900, @target_id; // Slow (almost stun) player temporarily heal (0 - rand(Hp)), 0; set Sp, (Sp / 3); end; diff --git a/world/map/npc/magic/event-boss-powerup-headshot.txt b/world/map/npc/magic/event-boss-powerup-headshot.txt index 5e3dc4f9..546ab32f 100644 --- a/world/map/npc/magic/event-boss-powerup-headshot.txt +++ b/world/map/npc/magic/event-boss-powerup-headshot.txt @@ -11,8 +11,8 @@ OnCast: if ((get(Hp, @target_id)) < 1) goto L_Too_dead; // Do not touch dead if (target(BL_ID, @target_id, 0x20) != 0x20) goto L_No_los; set @_M_BLOCK, 1; // block casting, until the timer clears it - addtimer 16000, "Magic Timer::OnClear"; // set the new debuff - sc_start SC_COOLDOWN, 16000, 0, BL_ID; + addtimer 10000, "Magic Timer::OnClear"; // set the new debuff + sc_start SC_COOLDOWN, 10000, 0, BL_ID; misceffect FX_MEDIUM_EXPLOSION, strcharinfo(0); misceffect FX_CHANNELLING_CAST_RED, @target_id; @@ -20,6 +20,7 @@ OnCast: set Sp, 1, @target_id; // Hurt target if (@tgthp < 1500) set @tgthp, 1; // Boss or not? (>3000 HP) set Hp, @tgthp, @target_id; // Hurt target + sc_start SC_SLOWMOVE, 3000, 5000; // Slow player temporarily message strcharinfo(0, @target_id), "[boss-headshot] : "+strcharinfo(0, BL_ID)+" shot you!"; set @tgthp, 0; end; diff --git a/world/map/npc/magic/event-boss-powerup-lifedrain.txt b/world/map/npc/magic/event-boss-powerup-lifedrain.txt index 5399ea37..aa4e7181 100644 --- a/world/map/npc/magic/event-boss-powerup-lifedrain.txt +++ b/world/map/npc/magic/event-boss-powerup-lifedrain.txt @@ -6,8 +6,8 @@ OnCast: if(call("boss_powerup_checks")) end; if (getmapflag(getmap(), MF_TOWN)) goto L_Fail_town; set @_M_BLOCK, 1; // block casting, until the timer clears it - addtimer 30000, "Magic Timer::OnClear"; // set the new debuff - sc_start SC_COOLDOWN, 30000, 0, BL_ID; + addtimer 12000, "Magic Timer::OnClear"; // set the new debuff + sc_start SC_COOLDOWN, 12000, 0, BL_ID; misceffect FX_PENTAGRAM_BURST, strcharinfo(0); set @dist, 12; foreach 0, getmap(), (POS_X - @dist), (POS_Y - @dist), (POS_X + @dist), (POS_Y + @dist), strnpcinfo(0) + "::OnHit"; diff --git a/world/map/npc/magic/event-boss-powerup-manadrain.txt b/world/map/npc/magic/event-boss-powerup-manadrain.txt index b6f7f835..8c42bde9 100644 --- a/world/map/npc/magic/event-boss-powerup-manadrain.txt +++ b/world/map/npc/magic/event-boss-powerup-manadrain.txt @@ -6,8 +6,8 @@ OnCast: if(call("boss_powerup_checks")) end; if (getmapflag(getmap(), MF_TOWN)) goto L_Fail_town; set @_M_BLOCK, 1; // block casting, until the timer clears it - addtimer 20000, "Magic Timer::OnClear"; // set the new debuff - sc_start SC_COOLDOWN, 20000, 0, BL_ID; + addtimer 12000, "Magic Timer::OnClear"; // set the new debuff + sc_start SC_COOLDOWN, 12000, 0, BL_ID; misceffect FX_CHANNELLING_CAST_BLUE, strcharinfo(0); set @dist, 16; foreach 0, getmap(), (POS_X - @dist), (POS_Y - @dist), (POS_X + @dist), (POS_Y + @dist), strnpcinfo(0) + "::OnHit"; diff --git a/world/map/npc/magic/event-boss-powerup-massslow.txt b/world/map/npc/magic/event-boss-powerup-massslow.txt new file mode 100644 index 00000000..6c10cfa3 --- /dev/null +++ b/world/map/npc/magic/event-boss-powerup-massslow.txt @@ -0,0 +1,35 @@ +-|script|powerup-massslow|32767 +{ + end; + +OnCast: + if(call("boss_powerup_checks")) end; + if (getmapflag(getmap(), MF_TOWN)) goto L_Fail_town; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 10000, "Magic Timer::OnClear"; // set the new debuff + sc_start SC_COOLDOWN, 10000, 0, BL_ID; + misceffect FX_PENTAGRAM_BURST, strcharinfo(0); + set @dist, 12; + foreach 0, getmap(), (POS_X - @dist), (POS_Y - @dist), (POS_X + @dist), (POS_Y + @dist), strnpcinfo(0) + "::OnHit"; + end; + +OnHit: + if (@target_id == BL_ID) end; // Do not slow caster + if (get(Hp, @target_id) <= 0) end; // Dont slow dead. + message strcharinfo(0, @target_id), "[boss-massslow] : "+strcharinfo(0, BL_ID)+" cast slow spell on you!"; + misceffect 23, strcharinfo(0, @target_id); // Show slow effect + sc_start SC_SLOWMOVE, 5000, 300, @target_id; // Slow player temporarily + end; + +L_Fail_town: + message strcharinfo(0), "[boss-massslow] : city protected by strong magic, your spell dissipates"; + end; + +OnInit: + set .school, SKILL_MAGIC; + set .invocation$, chr(MAGIC_SYMBOL) + "mapmassslow"; // used in npcs that refer to this spell + void call("magic_register", "OnCast"); + set .level, 0; + set .exp_gain, 0; + end; +} diff --git a/world/map/npc/magic/event-boss-powerup-poison.txt b/world/map/npc/magic/event-boss-powerup-poison.txt index a37f5aa9..777930c1 100644 --- a/world/map/npc/magic/event-boss-powerup-poison.txt +++ b/world/map/npc/magic/event-boss-powerup-poison.txt @@ -6,8 +6,8 @@ OnCast: if (call("boss_powerup_checks")) end; if (getmapflag(getmap(), MF_TOWN)) goto L_Fail_town; set @_M_BLOCK, 1; // block casting, until the timer clears it - addtimer 16000, "Magic Timer::OnClear"; // set the new debuff - sc_start SC_COOLDOWN, 16000, 0, BL_ID; + addtimer 10000, "Magic Timer::OnClear"; // set the new debuff + sc_start SC_COOLDOWN, 10000, 0, BL_ID; misceffect FX_MAGIC_SNAKE_CAST, strcharinfo(0); set @dist, 12; foreach 0, getmap(), (POS_X - @dist), (POS_Y - @dist), (POS_X + @dist), (POS_Y + @dist), strnpcinfo(0) + "::OnHit"; diff --git a/world/map/npc/magic/event-boss-powerup-tormenta.txt b/world/map/npc/magic/event-boss-powerup-tormenta.txt index 52e6f42f..a5b47fdf 100644 --- a/world/map/npc/magic/event-boss-powerup-tormenta.txt +++ b/world/map/npc/magic/event-boss-powerup-tormenta.txt @@ -6,6 +6,7 @@ OnCast: if(call("boss_powerup_checks")) end; bonus bMaxHP, 20000; set Hp, (Hp+20000), BL_ID; + set @oldclass, get(Class, BL_ID); set Class, 1137, BL_ID; warp getmap(), POS_X, POS_Y; // Refresh witch appearance addtimer 1500, strnpcinfo(0)+"::OnFix"; @@ -23,9 +24,11 @@ OnFix: L_done: message strcharinfo(0, BL_ID), "[boss-tormenta] : Tormenta impersonation ended!"; set @fix_count, 0; - set Class, 0, BL_ID; + set Class, @oldclass, BL_ID; bonus bMaxHP, 0; set Hp, 100, BL_ID; + sc_start SC_SLOWMOVE, 500, 10000; // Slow player temporarily to avoid movement VS warp DCs + warp getmap(), POS_X, POS_Y; // warp (under char's RID!) end; OnInit: diff --git a/world/map/npc/magic/event-boss-powerup-totheabyss.txt b/world/map/npc/magic/event-boss-powerup-totheabyss.txt index d215db8b..c271a260 100644 --- a/world/map/npc/magic/event-boss-powerup-totheabyss.txt +++ b/world/map/npc/magic/event-boss-powerup-totheabyss.txt @@ -9,8 +9,8 @@ OnCast: if (call("boss_powerup_checks")) end; if (getmapflag(getmap(), MF_TOWN)) goto L_Fail_town; set @_M_BLOCK, 1; // block casting, until the timer clears it - addtimer 60000, "Magic Timer::OnClear"; // set the new debuff - sc_start SC_COOLDOWN, 60000, 0, BL_ID; + addtimer 30000, "Magic Timer::OnClear"; // set the new debuff + sc_start SC_COOLDOWN, 30000, 0, BL_ID; misceffect FX_RED_MAGIC_CAST, strcharinfo(0); set @dist, 25; foreach 0, getmap(), (POS_X - @dist), (POS_Y - @dist), (POS_X + @dist), (POS_Y + @dist), strnpcinfo(0) + "::OnHit"; @@ -18,24 +18,25 @@ OnCast: OnHit: if ((get(Hp, @target_id)) < 1) end; // Do not touch dead - set Sp, 1, @target_id; // Hurt target - set Hp, min(((Hp/2)), 100), @target_id; // Hurt target - sc_start SC_POISON, 1, 10, @target_id; // Poison target message strcharinfo(0, @target_id), "[boss-to-the-abyss] : "+strcharinfo(0, BL_ID)+" ##B PULLS YOU TO THE ABYSS!!"; misceffect FX_RED_MAGIC_CAST, strcharinfo(0, @target_id); - addtimer 1000, strnpcinfo(0)+"::OnTeleport", @target_id; + sc_start SC_SLOWMOVE, 6000, 10000; // Slow player temporarily to avoid movement VS warp DCs + addtimer 500+rand(500), strnpcinfo(0)+"::OnTeleport", @target_id; end; // Runs attached to player, beware. Dont try access vars from former code! OnTeleport: warp "070-3", 40+rand(5), 25+rand(5); // warp (under char's RID!) - addtimer 1500, strnpcinfo(0)+"::OnArrival"; // To play FX after player's arrival -> map + set Sp, 1; // Hurt target + set Hp, (Hp/4); // Hurt target + sc_start SC_POISON, 1, 10; // Poison target + addtimer 1000, strnpcinfo(0)+"::OnArrival"; // To play FX after player's arrival -> map end; // Done. // Runs attached to player, beware. Dont try access vars from former code! OnArrival: misceffect 50, strcharinfo(0); // Unfortunately hell glow lacks const. - addtimer 15000, strnpcinfo(0)+"::OnClean"; // To cancel former "infinite" FX. + addtimer 2800, strnpcinfo(0)+"::OnClean"; // To cancel former "infinite" FX. end; // Done. // Runs attached to player, beware. Dont try access vars from former code! diff --git a/world/map/npc/magic/event-boss-powerup-tothecrypt.txt b/world/map/npc/magic/event-boss-powerup-tothecrypt.txt index 8ae4b3b6..cf189fb4 100644 --- a/world/map/npc/magic/event-boss-powerup-tothecrypt.txt +++ b/world/map/npc/magic/event-boss-powerup-tothecrypt.txt @@ -9,8 +9,8 @@ OnCast: if (call("boss_powerup_checks")) end; if (getmapflag(getmap(), MF_TOWN)) goto L_Fail_town; set @_M_BLOCK, 1; // block casting, until the timer clears it - addtimer 60000, "Magic Timer::OnClear"; // set the new debuff - sc_start SC_COOLDOWN, 60000, 0, BL_ID; + addtimer 30000, "Magic Timer::OnClear"; // set the new debuff + sc_start SC_COOLDOWN, 30000, 0, BL_ID; misceffect FX_BLUE_MAGIC_CAST, strcharinfo(0); set @dist, 25; foreach 0, getmap(), (POS_X - @dist), (POS_Y - @dist), (POS_X + @dist), (POS_Y + @dist), strnpcinfo(0) + "::OnHit"; @@ -19,23 +19,24 @@ OnCast: OnHit: if ((get(Hp, @target_id)) < 1) end; // Do not touch dead set Sp, 1, @target_id; // Hurt target - set Hp, min(((Hp/2)), 100), @target_id; // Hurt target + set Hp, (Hp/4), @target_id; // Hurt target sc_start SC_POISON, 1, 10, @target_id; // Poison target message strcharinfo(0, @target_id), "[boss-to-the-crypt] : "+strcharinfo(0, BL_ID)+" ##B PULLS YOU TO THE CRYPT!!"; misceffect FX_CHANNELLING_RAISE, strcharinfo(0, @target_id); - addtimer 1000, strnpcinfo(0)+"::OnTeleport", @target_id; + sc_start SC_SLOWMOVE, 6000, 10000; // Slow player temporarily to avoid movement VS warp DCs + addtimer 500+rand(500), strnpcinfo(0)+"::OnTeleport", @target_id; end; // Runs attached to player, beware. Dont try access vars from former code! OnTeleport: warp "027-5", 71+rand(3), 51+rand(3); // warp (under char's RID!) - addtimer 1500, strnpcinfo(0)+"::OnArrival"; // To play FX after player's arrival -> map + addtimer 1000, strnpcinfo(0)+"::OnArrival"; // To play FX after player's arrival -> map end; // Done. // Runs attached to player, beware. Dont try access vars from former code! OnArrival: misceffect 50, strcharinfo(0); // Unfortunately hell glow lacks const. - addtimer 15000, strnpcinfo(0)+"::OnClean"; // To cancel former "infinite" FX. + addtimer 2800, strnpcinfo(0)+"::OnClean"; // To cancel former "infinite" FX. end; // Done. // Runs attached to player, beware. Dont try access vars from former code! |