summaryrefslogtreecommitdiff
path: root/world/map/npc/magic/level2-lay-on-hands.txt
diff options
context:
space:
mode:
authorHoraK-FDF <horak-fdf@web.de>2022-10-24 23:39:58 +0000
committerJesusalva Jesusalva <jesusalva@themanaworld.org>2022-10-24 23:39:58 +0000
commit58e4b21b96d2bc4dae2c7132ec675faef0538bee (patch)
tree4a84a9f5711b6da10ac1e2552863a21f1a40ad0f /world/map/npc/magic/level2-lay-on-hands.txt
parentb2522339a26f153a1214fd57d9b0a7c83fd3c6f2 (diff)
downloadserverdata-58e4b21b96d2bc4dae2c7132ec675faef0538bee.tar.gz
serverdata-58e4b21b96d2bc4dae2c7132ec675faef0538bee.tar.bz2
serverdata-58e4b21b96d2bc4dae2c7132ec675faef0538bee.tar.xz
serverdata-58e4b21b96d2bc4dae2c7132ec675faef0538bee.zip
magic use cooldown symbols. Also, restrict magic on Kimarr.
Diffstat (limited to 'world/map/npc/magic/level2-lay-on-hands.txt')
-rw-r--r--world/map/npc/magic/level2-lay-on-hands.txt15
1 files changed, 11 insertions, 4 deletions
diff --git a/world/map/npc/magic/level2-lay-on-hands.txt b/world/map/npc/magic/level2-lay-on-hands.txt
index 29d9292b..ee75a0d0 100644
--- a/world/map/npc/magic/level2-lay-on-hands.txt
+++ b/world/map/npc/magic/level2-lay-on-hands.txt
@@ -9,18 +9,20 @@
if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id) || BL_ID == @target_id) end;
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
- set @needed, get(MaxHp, @target_id) - get(Hp, @target_id);
+ if (getmap() == "099-4") goto L_SpecialRules4;
+ if (getmap() == "099-5") goto L_SpecialRules5;
+ if (getmap() == "033-1") goto L_SpecialRules6;
goto L_Pay;
L_Pay:
+ set @needed, get(MaxHp, @target_id) - get(Hp, @target_id);
set @_M_BLOCK, 1; // block casting, until the timer clears it
addtimer 500, "Magic Timer::OnClear"; // XXX should this be 0 ?
+ sc_start SC_COOLDOWN, 500, 0, BL_ID;
+ callfunc "adjust_spellpower";
set Sp, Sp - 10;
misceffect FX_MAGIC_LAY_CAST, strcharinfo(0); // on caster
misceffect FX_MAGIC_LAY_HIT, @args$; // on target
@@ -70,6 +72,11 @@ L_SpecialRules5:
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_SpecialRules6:
+ if ($@KIMARR_EVENT < 1) goto L_Pay;
+ if ($@Fluffy_FighterID != @target_id) goto L_Pay;
+ message strcharinfo(0), "You can't heal others hunting here.";
+ end;
OnInit:
set .school, SKILL_MAGIC_LIFE;