diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-04-22 11:19:53 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-04-22 11:19:53 -0300 |
commit | 3ad72c73ac63aeaaa629450b326063bda6a03d10 (patch) | |
tree | 8d639ec9bc2a36aaf82bc73f822f3478a8c7b0c5 /npc/functions | |
parent | de1ab31800a499d760b52275bc264bed21ac672c (diff) | |
download | serverdata-3ad72c73ac63aeaaa629450b326063bda6a03d10.tar.gz serverdata-3ad72c73ac63aeaaa629450b326063bda6a03d10.tar.bz2 serverdata-3ad72c73ac63aeaaa629450b326063bda6a03d10.tar.xz serverdata-3ad72c73ac63aeaaa629450b326063bda6a03d10.zip |
Replace VarDiffValue with is_between
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/main.txt | 8 | ||||
-rw-r--r-- | npc/functions/mobhunter.txt | 10 |
2 files changed, 5 insertions, 13 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 01559de24..e0a36ddcd 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -256,14 +256,6 @@ function script any_of { // TMW2 Custom Functions ///////////////////////////////////////////// -// Function meant to be used by Grand Hunter Quest -// result is: lower < target <= higher -// VarDiffValue ( lower, higher, target) -function script VarDiffValue { - .@val=getarg(2); - return (getarg(0) < .@val && getarg(1) >= .@val); -} - // Function meant to be used by Main Storyline Quest // msObjective ( condition , message ) function script msObjective { diff --git a/npc/functions/mobhunter.txt b/npc/functions/mobhunter.txt index e08ac4429..464a88ef9 100644 --- a/npc/functions/mobhunter.txt +++ b/npc/functions/mobhunter.txt @@ -99,7 +99,7 @@ function script GHQ_GetRewardsOnMilestone { //if (getq2(General_Hunter) >= 10000) goto L_Finish; // 1st step: 1000 kills - if (VarDiffValue(.@old, .@new, 1000)) { + if (is_between(.@old, .@new, 1000)) { mesc l("Goal: @@/@@ reached!", .@new, 1000), 2; .@xp+=.@blv*10; .@gp+=(.@bhp/2); @@ -109,7 +109,7 @@ function script GHQ_GetRewardsOnMilestone { } // 2nd step: 2500 kills - if (VarDiffValue(.@old, .@new, 2500)) { + if (is_between(.@old, .@new, 2500)) { mesc l("Goal: @@/@@ reached!", .@new, 2500), 2; .@xp+=.@blv*25; .@gp+=.@bhp; @@ -119,7 +119,7 @@ function script GHQ_GetRewardsOnMilestone { } // 3rd step: 5000 kills - if (VarDiffValue(.@old, .@new, 5000)) { + if (is_between(.@old, .@new, 5000)) { mesc l("Goal: @@/@@ reached!", .@new, 5000), 2; .@xp+=.@blv*50; .@gp+=.@bhp; @@ -129,7 +129,7 @@ function script GHQ_GetRewardsOnMilestone { } // 4th step: 7500 kills - if (VarDiffValue(.@old, .@new, 7500)) { + if (is_between(.@old, .@new, 7500)) { mesc l("Goal: @@/@@ reached!", .@new, 7500), 2; .@xp+=.@blv*75; .@gp+=.@bhp; @@ -139,7 +139,7 @@ function script GHQ_GetRewardsOnMilestone { } // 5th step: 10000 kills - if (VarDiffValue(.@old, .@new, 10000)) { + if (is_between(.@old, .@new, 10000)) { mesc l("Goal: @@/@@ reached!", .@new, 10000), 2; // Main reward |