summaryrefslogtreecommitdiff
path: root/npc/magic/level2-happy-curse.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-15 14:45:36 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-15 14:45:36 -0300
commit67543201d8646c059b3928d14c2591c02168237a (patch)
treefca28d81e39f5bcbf313dca3542af0aafd945483 /npc/magic/level2-happy-curse.txt
parent827a9f2be696ece2984776fcc77ebd1439db9032 (diff)
downloadserverdata-67543201d8646c059b3928d14c2591c02168237a.tar.gz
serverdata-67543201d8646c059b3928d14c2591c02168237a.tar.bz2
serverdata-67543201d8646c059b3928d14c2591c02168237a.tar.xz
serverdata-67543201d8646c059b3928d14c2591c02168237a.zip
Joyplim, Frillyar and Kalmurk
Diffstat (limited to 'npc/magic/level2-happy-curse.txt')
-rw-r--r--npc/magic/level2-happy-curse.txt30
1 files changed, 30 insertions, 0 deletions
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 <jesusalva@themanaworld.org>
+//
+// 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;
+}
+