summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/006-1/crazyfefe.txt2
-rw-r--r--npc/014-5-1/sagratha.txt2
-rw-r--r--npc/019-4-1/chief.txt10
-rw-r--r--npc/commands/rate-management.txt4
4 files changed, 9 insertions, 9 deletions
diff --git a/npc/006-1/crazyfefe.txt b/npc/006-1/crazyfefe.txt
index 6d7236aa7..01c298214 100644
--- a/npc/006-1/crazyfefe.txt
+++ b/npc/006-1/crazyfefe.txt
@@ -273,7 +273,7 @@ function NextRound {
areamonster "006-1", 20, 20, 70, 60, strmobinfo(1, .@monsterId), .@monsterId, 1, "Crazyfefe::OnPetDeath";
// We must lower difficulty according to summoned monster. Only 60% is lowered.
// If total level exceeds 250, it will cap at that to prevent excessive "slooping"
- $@FEFE_DIFFICULTY=$@FEFE_DIFFICULTY-max(1, min(25, .@lv)*6);
+ $@FEFE_DIFFICULTY=$@FEFE_DIFFICULTY-(limit(1, .@lv, 25)*6);
}
freeloop(false);
return;
diff --git a/npc/014-5-1/sagratha.txt b/npc/014-5-1/sagratha.txt
index c06615f2f..c22cf5d75 100644
--- a/npc/014-5-1/sagratha.txt
+++ b/npc/014-5-1/sagratha.txt
@@ -7,7 +7,7 @@
// SaggyScoreUpdate( amount )
function script SaggyScoreUpdate {
.@val=getarg(0);
- SAGRATHA_SCORE=max(-50, min(50, SAGRATHA_SCORE+.@val));
+ SAGRATHA_SCORE=limit(-50, SAGRATHA_SCORE+.@val, 50);
return;
}
diff --git a/npc/019-4-1/chief.txt b/npc/019-4-1/chief.txt
index aa45e5f5b..d0ac07fd3 100644
--- a/npc/019-4-1/chief.txt
+++ b/npc/019-4-1/chief.txt
@@ -125,15 +125,15 @@ L_Reward:
// MVP Awards
if ((.@q2*100)/$XMAS_MONEY >= 80) // 80% contribution
- getitem GoldenGift, max(1, min(3, .@q2/100000));
+ getitem GoldenGift, limit(1, .@q2/100000, 3);
else if ((.@q2*100)/$XMAS_MONEY >= 60) // 60% contribution
- getitem SilverGift, max(1, min(3, .@q2/100000));
+ getitem SilverGift, limit(1, .@q2/100000, 3);
else if ((.@q2*100)/$XMAS_MONEY >= 40) // 40% contribution
- getitem BronzeGift, max(1, min(3, .@q2/100000));
+ getitem BronzeGift, limit(1, .@q2/100000, 3);
else if ((.@q2*100)/$XMAS_MONEY >= 20) // 20% contribution
- getitem StrangeCoin, max(1, min(20, .@q2/5000));
+ getitem StrangeCoin, limit(1, .@q2/5000, 20);
else if ((.@q2*100)/$XMAS_MONEY >= 5) // 5% contribution
- getitem CasinoCoins, max(1, min(20, .@q2/5000));
+ getitem CasinoCoins, limit(1, .@q2/5000, 20);
/* The top 5 gets special rewards! */
// #1 : Xmas Gift x2
diff --git a/npc/commands/rate-management.txt b/npc/commands/rate-management.txt
index 8a95bfdef..17a7f4cf3 100644
--- a/npc/commands/rate-management.txt
+++ b/npc/commands/rate-management.txt
@@ -78,8 +78,8 @@ OnPlayerCall:
end;
// $@EXP_EVENT will determine the boost and should not be above 25%
// Default duration is one hour, or whatever $@EXP_EVENT_TIME is
- $@EXP_EVENT=max(0, min(150, $@EXP_EVENT));
- $@EXP_EVENT_TIME=max(1, min(6, $@EXP_EVENT_TIME));
+ $@EXP_EVENT=limit(0, $@EXP_EVENT, 150);
+ $@EXP_EVENT_TIME=limit(1, $@EXP_EVENT_TIME, 6);
// Default duration is one hour, or whatever $@EXP_EVENT_TIME is
.hours = 0;