summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/functions/hub.txt4
-rw-r--r--npc/magic/demure.txt14
2 files changed, 10 insertions, 8 deletions
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 2ff91352a..93c71f4b7 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -303,9 +303,13 @@ function script HUB_SkillInvoke {
.@dmg=AdjustSpellpower(300);
harm(@skillTarget, .@dmg, HARM_MAGI, Ele_Holy);
break;
+ // CLASS_OTHER
case TMW2_PARUM:
SK_parum();
break;
+ case TMW2_DEMURE:
+ SK_Demure();
+ break;
// Summons which never fail
case TMW2_ZARKOR:
SummonMagic(@skillId, CaveMaggot, 2, @skillLv);
diff --git a/npc/magic/demure.txt b/npc/magic/demure.txt
index d8a1f349c..cbb7a5641 100644
--- a/npc/magic/demure.txt
+++ b/npc/magic/demure.txt
@@ -9,10 +9,6 @@
// After level 1, evade penalty/cooldown raises in 1s per additional level
//
// Cooldown is cast duration
-
-- script sk#demure 32767,{
- end;
-
/*
SC_INCAGI: 190
SC_INCVIT: 191
@@ -65,8 +61,7 @@
*/
-OnCall:
-
+function script SK_Demure {
// Check cooldown
if (@demure_at > gettimetick(2)) {
dispbottom l("Skill is in cooldown for @@.", FuzzyTime(@demure_at));
@@ -94,13 +89,17 @@ OnCall:
sc_start SC_ATTHASTE_POTION2, .@length, .@effect;
sc_start SC_INCFLEERATE, (.@length+.@malus), .@penalty;
- // set cooldown
+ // set cooldown and timer
@demure_at=gettimetick(2);
@demure_at=@demure_at+(.@length+.@malus)/1000;
addtimer(rand(786,1346), "sk#demure::OnTMW2DemureCheck");
// Get a few mana experience points (this is NOT used by Mana Stone)
GetManaExp(TMW2_DEMURE, rand(1,getskilllv(TMW2_DEMURE)));
+ return;
+}
+
+- script sk#demure 32767,{
end;
// If you switch to a bow, you lose the effect at once and loop dies
@@ -114,6 +113,5 @@ OnTMW2DemureCheck:
end;
OnInit:
- bindatcmd "sk-demure", "sk#demure::OnCall", 0, 100, 0;
end;
}