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.txt19
1 files changed, 13 insertions, 6 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index e673bcaba..683beb917 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -850,14 +850,21 @@ function script MapToLoc {
// 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);
+ // Newbies
+ if (!REBIRTH) {
+ .@AVG_LEVEL=($@hoblvl_value[0]+$@hoblvl_value[1]+$@hoblvl_value[2])/3;
+ .@BONUS=min(50, .@AVG_LEVEL/2);
+ .@BONUS-=BaseLevel;
+ .@BONUS=max(1, .@BONUS);
+ // Rebirth
+ } else {
+ .@BONUS=REBIRTH*5;
+ }
+ // Defaults to 24 hours
sc_end SC_CASH_PLUSEXP;
sc_end SC_CASH_RECEIVEITEM;
- sc_start SC_CASH_PLUSEXP, 7200000, .@BONUS*2/3;
- sc_start SC_CASH_RECEIVEITEM, 7200000, .@BONUS;
+ sc_start SC_CASH_PLUSEXP, 86400000, (REBIRTH ? .@BONUS : .@BONUS*2/3);
+ sc_start SC_CASH_RECEIVEITEM, 86400000, .@BONUS;
return .@BONUS;
}