summaryrefslogtreecommitdiff
path: root/world/map
diff options
context:
space:
mode:
Diffstat (limited to 'world/map')
-rw-r--r--world/map/npc/magic/_import.txt1
-rw-r--r--world/map/npc/magic/level0-discharge.txt18
-rw-r--r--world/map/npc/magic/level2-shear.txt5
3 files changed, 22 insertions, 2 deletions
diff --git a/world/map/npc/magic/_import.txt b/world/map/npc/magic/_import.txt
index 2ef595af..e99d14dd 100644
--- a/world/map/npc/magic/_import.txt
+++ b/world/map/npc/magic/_import.txt
@@ -1,4 +1,5 @@
npc: npc/magic/_procedures.txt
+npc: npc/magic/level0-discharge.txt
npc: npc/magic/level0-wand.txt
npc: npc/magic/level1-aggravate.txt
npc: npc/magic/level1-experience.txt
diff --git a/world/map/npc/magic/level0-discharge.txt b/world/map/npc/magic/level0-discharge.txt
new file mode 100644
index 00000000..7b2cfa8c
--- /dev/null
+++ b/world/map/npc/magic/level0-discharge.txt
@@ -0,0 +1,18 @@
+-|script|discharge spell|32767
+{
+ if(call("magic_checks")) end;
+ callfunc "magic_exp";
+
+ // tell the spells they were discharged
+ // XXX: maybe we could make it do area damage when you discharge (release your energy all of a sudden)
+ addtimer 0, "::OnDischarge"; // seeks OnDischarge in ALL npcs
+ end;
+
+OnInit:
+ set .school, SKILL_MAGIC;
+ set .invocation$, chr(MAGIC_SYMBOL) + "discharge"; // used in npcs that refer to this spell
+ void call("magic_register");
+ set .level, 0;
+ set .exp_gain, 0;
+ end;
+}
diff --git a/world/map/npc/magic/level2-shear.txt b/world/map/npc/magic/level2-shear.txt
index 4c1df781..91bb4de0 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 @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,6 +43,7 @@ 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;