From c2970a2d7efbb94b2971fdbcc53e1789484a86e2 Mon Sep 17 00:00:00 2001 From: HoraK-FDF Date: Tue, 25 Oct 2022 00:02:55 +0200 Subject: magic use cooldown symbols fix --- world/map/npc/magic/level2-barrier.txt | 5 +++-- world/map/npc/magic/level2-flying-backpack.txt | 5 +++-- world/map/npc/magic/level2-protect.txt | 5 +++-- world/map/npc/magic/level2-rain.txt | 10 +++------- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/world/map/npc/magic/level2-barrier.txt b/world/map/npc/magic/level2-barrier.txt index 4a791577..7ca9c587 100644 --- a/world/map/npc/magic/level2-barrier.txt +++ b/world/map/npc/magic/level2-barrier.txt @@ -5,7 +5,8 @@ set .@level, getskilllv(.school); if (.@level < .level) end; if (getskilllv(SKILL_MAGIC) < .level) end; - if (.@level <= 3 && countitem("SmallMushroom") < 1) end; + if (.@level <= 3 && countitem("SmallMushroom") < 1) end; + elif (.@level <= 3) 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 @@ -18,7 +19,7 @@ goto L_Pay; L_Pay: - delitem "SmallMushroom", 1; + if (.@level <= 3) delitem "SmallMushroom", 1; set @_M_BLOCK, 1; // block casting, until the timer clears it addtimer 1000, "Magic Timer::OnClear"; // set the new debuff sc_start SC_COOLDOWN, 1000, 0, BL_ID; diff --git a/world/map/npc/magic/level2-flying-backpack.txt b/world/map/npc/magic/level2-flying-backpack.txt index 91994175..b3013db0 100644 --- a/world/map/npc/magic/level2-flying-backpack.txt +++ b/world/map/npc/magic/level2-flying-backpack.txt @@ -5,7 +5,8 @@ set .@level, getskilllv(.school); if (.@level < .level) end; if (getskilllv(SKILL_MAGIC) < .level) end; - if (.@level <= 3 && countitem("SilkCocoon") < 1) end; + if (.@level <= 3 && countitem("SilkCocoon") < 1) end; + elif (.@level <= 3) 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 @@ -16,7 +17,7 @@ goto L_Pay; L_Pay: - delitem "SilkCocoon", 1; + if (.@level <= 3) delitem "SilkCocoon", 1; set @_M_BLOCK, 1; // block casting, until the timer clears it addtimer 1000, "Magic Timer::OnClear"; // set the new debuff sc_start SC_COOLDOWN, 1000, 0, BL_ID; diff --git a/world/map/npc/magic/level2-protect.txt b/world/map/npc/magic/level2-protect.txt index 8fcc8c0a..d46577a0 100644 --- a/world/map/npc/magic/level2-protect.txt +++ b/world/map/npc/magic/level2-protect.txt @@ -5,7 +5,8 @@ set .@level, getskilllv(.school); if (.@level < .level) end; if (getskilllv(SKILL_MAGIC) < .level) end; - if (.@level <= 3 && countitem("HardSpike") < 1) 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 @@ -19,7 +20,7 @@ goto L_Pay; L_Pay: - 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 sc_start SC_COOLDOWN, 1500, 0, BL_ID; diff --git a/world/map/npc/magic/level2-rain.txt b/world/map/npc/magic/level2-rain.txt index 83cb4f89..7d642425 100644 --- a/world/map/npc/magic/level2-rain.txt +++ b/world/map/npc/magic/level2-rain.txt @@ -7,21 +7,17 @@ OnCast: if(call("magic_checks")) end; if (getskilllv(.school) < .level) end; if (getskilllv(SKILL_MAGIC) < .level) end; + if (getskilllv(.school) < 4 && countitem("BottleOfWater") < 1) end; + elif (getskilllv(.school) < 4) end; if (Sp < 17) end; explode .@map_ext[0], getmap(), "-"; 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 (countitem("BottleOfWater") < 1) end; - if (getskilllv(.school) < 4 && countitem("BottleOfWater") >= 1) goto L_Continue; - elif (getskilllv(.school) < 4) end; - goto L_Continue; - -L_Continue: if (getmap() == "033-1") goto L_SpecialRules6; goto L_Pay; L_Pay: - delitem "BottleOfWater", 1; + if (getskilllv(.school) < 4) delitem "BottleOfWater", 1; set Sp, Sp - 17; set @_M_BLOCK, 1; // block casting, until the timer clears it addtimer 3000, "Magic Timer::OnClear"; // set the new debuff -- cgit v1.2.3-60-g2f50