summaryrefslogtreecommitdiff
path: root/world/map/npc/magic
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-05-01 11:05:13 -0400
committermekolat <mekolat@users.noreply.github.com>2016-05-01 11:05:13 -0400
commit59f26d0b42143ba632d9a1bbfe2cdd896ca933cd (patch)
treeb2e8634b9be7198d51a0c7ca9cc2c8f26e70d8b5 /world/map/npc/magic
parent179a355d8b359ff361a82425fa5f6d022ee11dae (diff)
downloadserverdata-59f26d0b42143ba632d9a1bbfe2cdd896ca933cd.tar.gz
serverdata-59f26d0b42143ba632d9a1bbfe2cdd896ca933cd.tar.bz2
serverdata-59f26d0b42143ba632d9a1bbfe2cdd896ca933cd.tar.xz
serverdata-59f26d0b42143ba632d9a1bbfe2cdd896ca933cd.zip
add `discharge` spell
Diffstat (limited to 'world/map/npc/magic')
-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;