summaryrefslogtreecommitdiff
path: root/world/map/npc/magic/event-boss-powerup-disarm.txt
diff options
context:
space:
mode:
authorHello=) <hello@themanaworld.org>2024-04-10 15:41:30 +0300
committerLed Mitz <smoothshifter@tuta.io>2024-04-11 04:58:52 +0000
commitf71f26affd599fa87a4c03319a979c6786f978f3 (patch)
tree027d57a4c8ffb34ae00c970c8c467e74a46a9a7f /world/map/npc/magic/event-boss-powerup-disarm.txt
parent6312f7e082bdaae46cdcb9679dd74c7c778bf652 (diff)
downloadserverdata-f71f26affd599fa87a4c03319a979c6786f978f3.tar.gz
serverdata-f71f26affd599fa87a4c03319a979c6786f978f3.tar.bz2
serverdata-f71f26affd599fa87a4c03319a979c6786f978f3.tar.xz
serverdata-f71f26affd599fa87a4c03319a979c6786f978f3.zip
Initial commit of Dungeon Master/Boss Event spells/actions toolkit by Hello=)
Few things to keep in mind: 1) This commit lands DEBUG version of thing to give some ideas how it could happen. 2) This version is very "chatty" and spits a lot of debug messages to General chat. Next commits would remove most of non-essential spell messages. 3) This version allows ANYONE to invoke spells and should not be used on production! Next commits would address this, uplifting spell invocation requirements. 4) Cooldown times are too low, to facilitate testing. Should be fixed in next commits. Next commits would 5) Some effects need to be rewired, and few more spells could possibly be added.
Diffstat (limited to 'world/map/npc/magic/event-boss-powerup-disarm.txt')
-rw-r--r--world/map/npc/magic/event-boss-powerup-disarm.txt47
1 files changed, 47 insertions, 0 deletions
diff --git a/world/map/npc/magic/event-boss-powerup-disarm.txt b/world/map/npc/magic/event-boss-powerup-disarm.txt
new file mode 100644
index 00000000..b1fb1a42
--- /dev/null
+++ b/world/map/npc/magic/event-boss-powerup-disarm.txt
@@ -0,0 +1,47 @@
+-|script|powerup-disarm|32767
+{
+ end;
+
+OnCast:
+ message strcharinfo(0), "[boss-disarm] : -> OnCast";
+ if(call("boss_powerup_checks")) end;
+ message strcharinfo(0), "[boss-disarm] : after boss powerup check";
+ if (getmapflag(getmap(), MF_TOWN)) goto L_Fail_town;
+ message strcharinfo(0), "[boss-disarm] : after mapflags check";
+// TBD who can use this.
+ 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_MEDIUM_EXPLOSION, strcharinfo(0);
+ set @dist, 12;
+ foreach 0, getmap(), (POS_X - @dist), (POS_Y - @dist), (POS_X + @dist), (POS_Y + @dist), strnpcinfo(0) + "::OnHit";
+ message strcharinfo(0), "[boss-disarm] : after foreach";
+ message strcharinfo(0), "[boss-disarm] : <- OnCast";
+ end;
+
+OnHit:
+ if (@target_id == BL_ID) end; // Do not disarm caster
+ if ((get(Hp, @target_id)) < 1) end; // Do not touch dead
+ message strcharinfo(0, @target_id), "[boss-disarm] : "+strcharinfo(0, BL_ID)+" disarms you!";
+ addtimer 500, strnpcinfo(0)+"::OnUnequip", @target_id;
+ end;
+
+OnUnequip:
+ misceffect FX_EMOTE_SURPRISE, strcharinfo(0);
+ unequipbyid 8; // Hand ?1
+ unequipbyid 9; // Hand ?2
+ unequipbyid 10; // Ammo
+ end;
+
+L_Fail_town:
+ message strcharinfo(0), "[boss-disarm] : can't mass-poison in towns!";
+ end;
+
+OnInit:
+ set .school, SKILL_MAGIC;
+ set .invocation$, chr(MAGIC_SYMBOL) + "mapdisarm"; // used in npcs that refer to this spell
+ void call("magic_register", "OnCast");
+ set .level, 0;
+ set .exp_gain, 0;
+ end;
+}