diff options
author | Wushin <pasekei@gmail.com> | 2016-05-11 16:50:15 -0500 |
---|---|---|
committer | Wushin <pasekei@gmail.com> | 2016-05-11 16:50:15 -0500 |
commit | 6fb28669713684116e3598cbfad078bffb7f0531 (patch) | |
tree | d478ccf6e0ed83ab1e6aa59f09b74f14c55dd0cc /world/map/npc/magic/level2-protect.txt | |
parent | 9218cfaba1337e0098f147cd58d0496bdaf14728 (diff) | |
parent | a25fa832a47e27a56be017bbb58b85ba7f072507 (diff) | |
download | serverdata-6fb28669713684116e3598cbfad078bffb7f0531.tar.gz serverdata-6fb28669713684116e3598cbfad078bffb7f0531.tar.bz2 serverdata-6fb28669713684116e3598cbfad078bffb7f0531.tar.xz serverdata-6fb28669713684116e3598cbfad078bffb7f0531.zip |
Merge pull request #496 from mekolat/end-message
a bit of everything
Diffstat (limited to 'world/map/npc/magic/level2-protect.txt')
-rw-r--r-- | world/map/npc/magic/level2-protect.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/world/map/npc/magic/level2-protect.txt b/world/map/npc/magic/level2-protect.txt index 659efdc1..38ea6a7d 100644 --- a/world/map/npc/magic/level2-protect.txt +++ b/world/map/npc/magic/level2-protect.txt @@ -6,7 +6,6 @@ if (.@level < .level) end; if (getskilllv(SKILL_MAGIC) < .level) end; if (.@level <= 3 && countitem("HardSpike") < 1) end; - elif (.@level <= 3) end; set @target_id, getcharid(3, @args$); if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id)) set @target_id, BL_ID; // fallback to self @@ -15,7 +14,7 @@ if (distance(BL_ID, @target_id) >= (@spellpower/30)+2) set @target_id, BL_ID; if (get(@antiprotect, @target_id) > 0) end; - delitem "HardSpike", 1; + if (.@level <= 3) delitem "HardSpike", 1; set @_M_BLOCK, 1; // block casting, until the timer clears it addtimer 1500, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; @@ -29,10 +28,12 @@ set @betsanc_time, .@time, @target_id; sc_start SC_PHYS_SHIELD, .@time, max(15,(@spellpower/20))+5, @target_id; message @args$, "Shield : You feel more protected."; - addtimer @betsanc_time, strnpcinfo(0)+"::OnEnd", @target_id; + set @betsanc_future, gettimetick(0) + @betsanc_time - 100, @target_id; + addtimer @betsanc_time - 100, strnpcinfo(0)+"::OnEnd", @target_id; end; OnEnd: + if (gettimetick(0) - @betsanc_future < 0) end; if (sc_check(SC_PHYS_SHIELD) != 1) end; message strcharinfo(0), "Shield : You feel less protected."; misceffect FX_MAGIC_SHIELD_ENDS, strcharinfo(0); |