summaryrefslogtreecommitdiff
path: root/world/map/npc/002-1/elanore.txt
diff options
context:
space:
mode:
authorWushin <pasekei@gmail.com>2015-04-30 00:19:27 -0500
committerWushin <pasekei@gmail.com>2015-04-30 00:19:27 -0500
commit86cc243c069b90c3eb47df1faede506822634f4a (patch)
tree06fa0213f689fc1e5dd3ef03b99eed1b427bf7b0 /world/map/npc/002-1/elanore.txt
parent17a8452f5a55f93f7d38e027b69d98445daabdef (diff)
parenta413653361e218695fa6305d760c22458ac78657 (diff)
downloadserverdata-86cc243c069b90c3eb47df1faede506822634f4a.tar.gz
serverdata-86cc243c069b90c3eb47df1faede506822634f4a.tar.bz2
serverdata-86cc243c069b90c3eb47df1faede506822634f4a.tar.xz
serverdata-86cc243c069b90c3eb47df1faede506822634f4a.zip
Merge pull request #346 from mekolat/global-handler
onlogin & cleanup
Diffstat (limited to 'world/map/npc/002-1/elanore.txt')
-rw-r--r--world/map/npc/002-1/elanore.txt34
1 files changed, 18 insertions, 16 deletions
diff --git a/world/map/npc/002-1/elanore.txt b/world/map/npc/002-1/elanore.txt
index be14c8bc..b6cdde5a 100644
--- a/world/map/npc/002-1/elanore.txt
+++ b/world/map/npc/002-1/elanore.txt
@@ -17,6 +17,24 @@ function|script|ElanoreFix
return;
}
+function|script|elanore_decrease_exp
+{
+ if (attachrid(@killerrid) == 0)
+ end;
+ set @Q_heal_exp, MAGIC_EXPERIENCE >> 24;
+ if (@Q_heal_exp < 8) goto L_OnPcKillWipe;
+ set @Q_heal_exp, @Q_heal_exp - 8;
+ goto L_OnPcKillFinish;
+
+L_OnPcKillWipe:
+ set @Q_heal_exp, 0;
+ goto L_OnPcKillFinish;
+
+L_OnPcKillFinish:
+ set MAGIC_EXPERIENCE, (MAGIC_EXPERIENCE & ~(255 << 24)) | (@Q_heal_exp << 24);
+ return;
+}
+
002-1,75,62,0|script|Elanore#_M|108
{
set @has_magic, getskilllv(SKILL_MAGIC);
@@ -155,22 +173,6 @@ L_Main:
"Goodbye!", L_bye;
goto L_Close;
-OnPCKillEvent:
- if (attachrid(@killerrid) == 0)
- end;
- set @Q_heal_exp, MAGIC_EXPERIENCE >> 24;
- if (@Q_heal_exp < 8) goto L_OnPcKillWipe;
- set @Q_heal_exp, @Q_heal_exp - 8;
- goto L_OnPcKillFinish;
-
-L_OnPcKillWipe:
- set @Q_heal_exp, 0;
- goto L_OnPcKillFinish;
-
-L_OnPcKillFinish:
- set MAGIC_EXPERIENCE, (MAGIC_EXPERIENCE & ~(255 << 24)) | (@Q_heal_exp << 24);
- goto L_Close;
-
L_Lifestones:
mes "[Elanore the Healer]";
mes "\"I always need components for my own healing spells. If you bring me ten gamboge leaves, ten alizarin leaves, ten mauve leaves and ten cobalt leaves, I can make ten lifestones; I will give you half of them.\"";