summaryrefslogtreecommitdiff
path: root/npc/functions/util.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/util.txt')
-rw-r--r--npc/functions/util.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index c32a831e1..3b05c799b 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -841,3 +841,17 @@ function script MapToLoc {
return .@locs$[.@lx];
}
+// Grants newcomers exp boost. Returns bonus %
+// NewcomerEXPDROPUP( - )
+function script NewcomerEXPDROPUP {
+ .@AVG_LEVEL=($@hoblvl_value[0]+$@hoblvl_value[1]+$@hoblvl_value[2])/3;
+ .@BONUS=min(50, .@AVG_LEVEL/2);
+ .@BONUS-=BaseLevel;
+ .@BONUS=max(1, .@BONUS);
+ sc_end SC_CASH_PLUSEXP;
+ sc_end SC_CASH_RECEIVEITEM;
+ sc_start SC_CASH_PLUSEXP, 7200000, .@BONUS;
+ sc_start SC_CASH_RECEIVEITEM, 7200000, .@BONUS;
+ return .@BONUS;
+}
+