summaryrefslogtreecommitdiff
path: root/world/map
diff options
context:
space:
mode:
authorHoraK-FDF <horak-fdf@web.de>2024-10-30 16:32:58 +0000
committerLed Mitz <smoothshifter@tuta.io>2024-10-30 16:32:58 +0000
commitab666be35fa773e3ebddb4fff1033104592ce856 (patch)
treefb99a2566609956119d4c6fd48dbc6c94b091934 /world/map
parent63856c5d27c1d378a28d293bd5196bde89f007d7 (diff)
downloadserverdata-ab666be35fa773e3ebddb4fff1033104592ce856.tar.gz
serverdata-ab666be35fa773e3ebddb4fff1033104592ce856.tar.bz2
serverdata-ab666be35fa773e3ebddb4fff1033104592ce856.tar.xz
serverdata-ab666be35fa773e3ebddb4fff1033104592ce856.zip
betsanc if itsanced
with this an itsanced caster can still betsanc others.
Diffstat (limited to 'world/map')
-rw-r--r--world/map/npc/magic/level2-protect.txt23
1 files changed, 16 insertions, 7 deletions
diff --git a/world/map/npc/magic/level2-protect.txt b/world/map/npc/magic/level2-protect.txt
index 87d010f8..5447f4e0 100644
--- a/world/map/npc/magic/level2-protect.txt
+++ b/world/map/npc/magic/level2-protect.txt
@@ -1,18 +1,18 @@
-|script|protect|32767
{
- if (sc_check(SC_PHYS_SHIELD_ITEM)) goto L_Itsanc; // itsanc has top priority and cant 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;
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;
@@ -46,9 +46,18 @@ OnEnd:
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;