From 3d4cc7b6adfa50c2b22c774810ae32448e7d9711 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 28 Oct 2019 18:49:23 -0300 Subject: Rebirth - The permanent experience bonus (5% per rebirth) --- npc/003-3/malindou.txt | 8 +++++--- npc/functions/util.txt | 19 +++++++++++++------ 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; } -- cgit v1.2.3-60-g2f50