diff options
Diffstat (limited to 'world/map/npc/magic')
-rw-r--r-- | world/map/npc/magic/level1-detect-magic.txt | 4 | ||||
-rw-r--r-- | world/map/npc/magic/level2-lay-on-hands.txt | 16 | ||||
-rw-r--r-- | world/map/npc/magic/level2-rain.txt | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/world/map/npc/magic/level1-detect-magic.txt b/world/map/npc/magic/level1-detect-magic.txt index e70c6218..f22be844 100644 --- a/world/map/npc/magic/level1-detect-magic.txt +++ b/world/map/npc/magic/level1-detect-magic.txt @@ -11,6 +11,10 @@ set .@range, (@spellpower/50)+1; foreach 1, getmap(), POS_X - .@range, POS_Y - .@range, POS_X + .@range, POS_Y + .@range, strnpcinfo(0) + "::OnNearbyNpc"; + if (getmap() == "099-4") + addtimer 10, "#TMWFinalExam::OnMiteyo"; + if (getmap() == "099-5" && debug) + addtimer 10, "#TMWFinalExam::OnMiteyo"; callfunc "magic_exp"; end; diff --git a/world/map/npc/magic/level2-lay-on-hands.txt b/world/map/npc/magic/level2-lay-on-hands.txt index 819f0ea2..29d9292b 100644 --- a/world/map/npc/magic/level2-lay-on-hands.txt +++ b/world/map/npc/magic/level2-lay-on-hands.txt @@ -10,6 +10,8 @@ if (get(GM, @target_id) == 1) end; if (Hp <= get(MaxHp, @target_id) / 20) end; // hp needs to be > 1/20 * target hp callfunc "adjust_spellpower"; + if (getmap() == "099-4") goto L_SpecialRules4; + if (getmap() == "099-5") goto L_SpecialRules5; if (distance(BL_ID, @target_id) >= (((sqrt(@spellpower)*12)+@spellpower)/100)+2) end; if (sc_check(SC_HALT_REGENERATE,@target_id)) end; if (getequipid(equip_head, @args$) == 888) end; // magic gm top hat @@ -55,6 +57,20 @@ L_Mouboo: callfunc "QuestMoubooHeal"; end; +// Special rules for a couple special maps +L_SpecialRules4: + if (getmap(@target_id) != "099-5") end; + if (sc_check(SC_HALT_REGENERATE,@target_id)) end; + if (getequipid(equip_head, @args$) == 888) end; // magic gm top hat + set @needed, get(MaxHp, @target_id) - get(Hp, @target_id); + goto L_Pay; +L_SpecialRules5: + if (getmap(@target_id) != "099-4") end; + if (sc_check(SC_HALT_REGENERATE,@target_id)) end; + if (getequipid(equip_head, @args$) == 888) end; // magic gm top hat + set @needed, get(MaxHp, @target_id) - get(Hp, @target_id); + goto L_Pay; + OnInit: set .school, SKILL_MAGIC_LIFE; set .invocation$, chr(MAGIC_SYMBOL) + "inma"; // used in npcs that refer to this spell diff --git a/world/map/npc/magic/level2-rain.txt b/world/map/npc/magic/level2-rain.txt index df8ef1c9..fac98690 100644 --- a/world/map/npc/magic/level2-rain.txt +++ b/world/map/npc/magic/level2-rain.txt @@ -9,7 +9,7 @@ OnCast: if (getskilllv(SKILL_MAGIC) < .level) end; if (Sp < 17) end; explode .@map_ext[0], getmap(), "-"; - if (.@map_ext[1] != 1) end; // XXX this is fugly, in the future let's use MF_OUTSIDE to detect if a map is "outside" or "inside" + if (.@map_ext[1] != 1 && getmap() != "099-5") end; // XXX this is fugly, in the future let's use MF_OUTSIDE to detect if a map is "outside" or "inside" if (getmapflag(getmap(), MF_TOWN)) end; if (getskilllv(.school) < 4 && countitem("BottleOfWater") >= 1) delitem "BottleOfWater", 1; elif (getskilllv(.school) < 4) end; |