summaryrefslogtreecommitdiff
path: root/npc/magic/demure.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/magic/demure.txt')
-rw-r--r--npc/magic/demure.txt19
1 files changed, 18 insertions, 1 deletions
diff --git a/npc/magic/demure.txt b/npc/magic/demure.txt
index 0a6f6d8bf..79dfa6601 100644
--- a/npc/magic/demure.txt
+++ b/npc/magic/demure.txt
@@ -62,7 +62,7 @@
SC_MOVHASTE_INFINITY: 60
SC_PLUSATTACKPOWER: 61
SC_PLUSMAGICPOWER: 62
-
+
*/
OnCall:
@@ -73,6 +73,13 @@ OnCall:
end;
}
+ // non-melee weapons not allowed
+ // TODO: Run this check on a loop in case player is switching weapons
+ if (getiteminfo(getequipid(EQI_HAND_R), ITEMINFO_RANGE) > 3) {
+ dispbottom l("Only melee weapons are permitted for use with this skill.");
+ end;
+ }
+
// Check requisites
if (!MagicCheck(TMW2_DEMURE, 100, 100))
end;
@@ -96,6 +103,16 @@ OnCall:
GetManaExp(TMW2_DEMURE, rand(1,getskilllv(TMW2_DEMURE)));
end;
+// If you switch to a bow, you lose the effect at once and loop dies
+OnTMW2DemureCheck:
+ if (@demure_at < gettimetick(2))
+ end;
+ if (getiteminfo(getequipid(EQI_HAND_R), ITEMINFO_RANGE) > 3)
+ sc_start SC_ATTHASTE_POTION2, 100, -50;
+ else
+ addtimer(rand(786,1346), "::OnTMW2DemureCheck");
+ end;
+
OnInit:
bindatcmd "sk-demure", "sk#demure::OnCall", 0, 100, 0;
end;