From 67543201d8646c059b3928d14c2591c02168237a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 15 Apr 2021 14:45:36 -0300 Subject: Joyplim, Frillyar and Kalmurk --- npc/magic/level2-happy-curse.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 npc/magic/level2-happy-curse.txt (limited to 'npc/magic/level2-happy-curse.txt') diff --git a/npc/magic/level2-happy-curse.txt b/npc/magic/level2-happy-curse.txt new file mode 100644 index 00000000..08987293 --- /dev/null +++ b/npc/magic/level2-happy-curse.txt @@ -0,0 +1,30 @@ +// The Mana World script +// Author: Jesusalva +// +// Magic Script: SKILL_JOYPLIM (Level 1) +// School: General 2 + +function script SK_Joyplim { + delitem GingerBreadMan, 1; + .@b=(BL_PC | BL_PET | BL_MER | BL_HOM); // | BL_MOB + .@r=3+cap_value(getskilllv(SKILL_MAGIC)+(@skillLv/2), 1, 12); // Your radius + .@s=AdjustSpellpower(100); // Your magical stamina + .@c=cap_value(11-@skillLv, 1, 10)*2; // MATK stamina cost per char + .@e=(getskilllv(SKILL_MAGIC_DARK) ? E_EVIL : E_HAPPY); // Emote + + getmapxy(.@m$, .@x, .@y, 0); + + // TODO: Maybe put this loop in a timer, etc? But... Do we want to? + .@c=getunits(.@b, .@mbs, false, .@m$, .@x-.@r, .@y-.@r, .@x+.@r, .@y+.@r); + for (.@i = 0; .@i < .@c; .@i++) { + unitemote(.@mbs[.@i], E_HAPPY); + // Stamina cost + .@s-=.@c; + if (.@s < 0) + break; + } + specialeffect(FX_MAGIC_JOY_CAST, AREA, getcharid(3)); + GetManaExp(@skillId, 2); + return; +} + -- cgit v1.2.3-70-g09d2