summaryrefslogtreecommitdiff
path: root/world/map/npc/magic/level2-happy-curse.txt
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-11-11 17:18:14 -0500
committergumi <git@gumi.ca>2018-11-11 22:36:15 -0500
commit0e1a7f000ccdcf6f84ec66192b025f261772cdb3 (patch)
tree7367604274d14b0fdabae946985ef30fc71aa8de /world/map/npc/magic/level2-happy-curse.txt
parent15e556361dabcee7d215cb6aeb2f157d30c0963a (diff)
downloadserverdata-0e1a7f000ccdcf6f84ec66192b025f261772cdb3.tar.gz
serverdata-0e1a7f000ccdcf6f84ec66192b025f261772cdb3.tar.bz2
serverdata-0e1a7f000ccdcf6f84ec66192b025f261772cdb3.tar.xz
serverdata-0e1a7f000ccdcf6f84ec66192b025f261772cdb3.zip
give unique ids to magic spell effects
Diffstat (limited to 'world/map/npc/magic/level2-happy-curse.txt')
-rw-r--r--world/map/npc/magic/level2-happy-curse.txt14
1 files changed, 7 insertions, 7 deletions
diff --git a/world/map/npc/magic/level2-happy-curse.txt b/world/map/npc/magic/level2-happy-curse.txt
index a82dce21..535afa11 100644
--- a/world/map/npc/magic/level2-happy-curse.txt
+++ b/world/map/npc/magic/level2-happy-curse.txt
@@ -7,22 +7,22 @@
if (getskilllv(SKILL_MAGIC) < .level) end;
if (.@level <= 3 && countitem("GingerBreadMan") >= 1) delitem "GingerBreadMan", 1;
elif (.@level <= 3) end;
- set @target_id, getcharid(3, @args$);
- if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id))
- set @target_id, BL_ID; // fallback to self
set @_M_BLOCK, 1; // block casting, until the timer clears it
addtimer 1000, "Magic Timer::OnClear"; // set the new debuff
callfunc "adjust_spellpower";
set Sp, Sp - 13;
- misceffect FX_MAGIC_GREEN, strcharinfo(0);
+ misceffect FX_MAGIC_JOY_CAST, strcharinfo(0);
callfunc "magic_exp";
- if (distance(BL_ID, @target_id) >= (@spellpower/100)+1) set @target_id, BL_ID;
- if (BL_ID == @target_id) set @args$, strcharinfo(0);
+ set @distance, (@spellpower / 100) + 1;
+ foreach 0, getmap(), (POS_X - @distance), (POS_Y - @distance), (POS_X + @distance), (POS_Y + @distance), strnpcinfo(0) + "::OnHit";
+ end;
+
+OnHit:
set @joyplim_count, 1, @target_id;
set @joyplim_emote, if_then_else(getskilllv(SKILL_MAGIC_DARK) > 1, EMOTE_EVIL, EMOTE_HAPPY), @target_id;
- set @joyplim_total, (@spellpower/10), @target_id;
+ set @joyplim_total, (@spellpower / 10), @target_id;
emotion @joyplim_emote, strcharinfo(0, @target_id);
addtimer 500, strnpcinfo(0)+"::OnEmote", @target_id;
end;