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.txt14
1 files changed, 6 insertions, 8 deletions
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;
}