summaryrefslogtreecommitdiff
path: root/npc/functions/util.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-10-28 18:49:23 -0300
committerJesusaves <cpntb1@ymail.com>2019-10-28 18:49:23 -0300
commit3d4cc7b6adfa50c2b22c774810ae32448e7d9711 (patch)
tree368dba030ff1639c6797d72d56efe3538c77011a /npc/functions/util.txt
parentdb39e7e210590596cd58406d606958aa1c161997 (diff)
downloadserverdata-3d4cc7b6adfa50c2b22c774810ae32448e7d9711.tar.gz
serverdata-3d4cc7b6adfa50c2b22c774810ae32448e7d9711.tar.bz2
serverdata-3d4cc7b6adfa50c2b22c774810ae32448e7d9711.tar.xz
serverdata-3d4cc7b6adfa50c2b22c774810ae32448e7d9711.zip
Rebirth - The permanent experience bonus (5% per rebirth)
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;
}