summaryrefslogtreecommitdiff
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
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)
-rw-r--r--npc/003-3/malindou.txt8
-rw-r--r--npc/functions/util.txt19
2 files changed, 18 insertions, 9 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index 39ce3041d..3da53f9cb 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -536,8 +536,10 @@ OnPCBaseLvUpEvent:
NewcomerEXPDROPUP();
break;
case 20:
- sc_end SC_CASH_PLUSEXP;
- sc_end SC_CASH_RECEIVEITEM;
+ if (!REBIRTH) {
+ sc_end SC_CASH_PLUSEXP;
+ sc_end SC_CASH_RECEIVEITEM;
+ }
break;
case 25:
if (#REFERRAL_PROG && BaseLevel == 25 && #REFERRAL_CTRL < 1) {
@@ -603,7 +605,7 @@ OnPCLoginEvent:
ALCReset();
// Newbie bonuses recalc
- if (BaseLevel < 20) NewcomerEXPDROPUP();
+ if (BaseLevel < 20 || REBIRTH) NewcomerEXPDROPUP();
// Daily rewards (The first with dialog interactions)
daily_login_bonus_handler();
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;
}