summaryrefslogtreecommitdiff
path: root/world/map/npc/magic/level2-shear.txt
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/magic/level2-shear.txt')
-rw-r--r--world/map/npc/magic/level2-shear.txt14
1 files changed, 11 insertions, 3 deletions
diff --git a/world/map/npc/magic/level2-shear.txt b/world/map/npc/magic/level2-shear.txt
index af825727..f65119c3 100644
--- a/world/map/npc/magic/level2-shear.txt
+++ b/world/map/npc/magic/level2-shear.txt
@@ -12,9 +12,8 @@
setarray @chipchipspell[0],
@spellpower,
(((200 - Agi) * 2000) / 200); //delay
- overrideattack 1, @chipchipspell[1], 1, ATTACK_ICON_SHEARING, 30, strnpcinfo(0)+"::OnAttack";
callfunc "magic_exp";
- end;
+ goto L_FreeRecast;
OnAttack:
if (isloggedin(@target_id)) goto L_FreeRecast; // can not shear a player
@@ -23,6 +22,7 @@ OnAttack:
sc_start SC_SHEARED, 600000, 0, @target_id;
set .@score, rand(1000 - rand(@chipchipspell[0]));
set .@id, get(Class, @target_id); // get the mob ID
+ set @chipchipspell[2], 0;
if (.@id == 1020 && .@score < 300) set .@item$, "WhiteFur"; // Fluffy
elif (.@id == 1027 && .@score < 300) set .@item$, "WhiteFur"; // EasterFluffy
@@ -43,11 +43,19 @@ OnAttack:
end;
L_FreeRecast:
+ set @chipchipspell[2], 1;
addtimer 0, strnpcinfo(0) + "::OnSetRecast"; // we can't do it while already overridden, until it reaches a script terminator
end;
+OnDischarge:
+ if (@chipchipspell[2] < 1) end;
+ set @chipchipspell[2], 0;
+ misceffect FX_FIRE_BURST, strcharinfo(0);
+ overrideattack;
+ end;
+
OnSetRecast:
- overrideattack 1, @chipchipspell[1], 1, ATTACK_ICON_SHEARING, 30, strnpcinfo(0)+"::OnAttack";
+ overrideattack @chipchipspell[1], 1, ATTACK_ICON_SHEARING, 30, strnpcinfo(0)+"::OnAttack";
end;
OnInit: