summaryrefslogtreecommitdiff
path: root/world/map/npc/magic/level2-protect.txt
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/magic/level2-protect.txt')
-rw-r--r--world/map/npc/magic/level2-protect.txt26
1 files changed, 20 insertions, 6 deletions
diff --git a/world/map/npc/magic/level2-protect.txt b/world/map/npc/magic/level2-protect.txt
index 7abc9a1a..5447f4e0 100644
--- a/world/map/npc/magic/level2-protect.txt
+++ b/world/map/npc/magic/level2-protect.txt
@@ -1,17 +1,18 @@
-|script|protect|32767
{
- if(call("magic_checks")) end;
- if (Sp < 14) end;
- set .@level, getskilllv(.school);
- if (.@level < .level) end;
- if (getskilllv(SKILL_MAGIC) < .level) end;
- if (.@level <= 3 && countitem("HardSpike") < 1) end;
set @target_id, getcharid(3, @args$);
if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id) == 1)
set @target_id, BL_ID; // fallback to self
callfunc "adjust_spellpower";
if (distance(BL_ID, @target_id) >= (@spellpower/30)+2) set @target_id, BL_ID;
if (BL_ID == @target_id) set @args$, strcharinfo(0);
+ if (sc_check(SC_PHYS_SHIELD_ITEM, @target_id)) goto L_Itsanc; // itsanc has top priority and can't be overwritten by betsanc
+ if(call("magic_checks")) end;
+ if (Sp < 14) end;
+ set .@level, getskilllv(.school);
+ if (.@level < .level) end;
+ if (getskilllv(SKILL_MAGIC) < .level) end;
+ if (.@level <= 3 && countitem("HardSpike") < 1) end;
if (get(GM, @target_id) == 1) end;
if (get(Hp, @target_id) < 1) end;
if (getequipid(equip_head, strcharinfo(0, @target_id)) == 888) end;
@@ -44,6 +45,19 @@ OnEnd:
misceffect FX_MAGIC_SHIELD_ENDS, strcharinfo(0);
end;
+L_Itsanc:
+ if (BL_ID == @target_id) goto L_ItsancSelf;
+ goto L_ItsancOther;
+
+L_ItsancSelf:
+ message strcharinfo(0), "Shield : You are still itsanced, This blocks your spell.";
+ end;
+
+L_ItsancOther:
+ message strcharinfo(0), "Shield : Your target is still itsanced, This blocks your spell.";
+ end;
+
+
L_SpecialRules6:
if ($@KIMARR_EVENT < 1) goto L_Pay;
if (@target_id == BL_ID) goto L_Pay;