diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-07-28 17:38:18 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-07-28 17:38:18 -0300 |
commit | d50cb8eff8d4f143b553cc33401f60baa6b03873 (patch) | |
tree | 84cc44bc983201b82ce96de00eaa1e8ee261d429 | |
parent | 6f018e8ed2d501d266ef47e7449a3fff939548ea (diff) | |
download | serverdata-d50cb8eff8d4f143b553cc33401f60baa6b03873.tar.gz serverdata-d50cb8eff8d4f143b553cc33401f60baa6b03873.tar.bz2 serverdata-d50cb8eff8d4f143b553cc33401f60baa6b03873.tar.xz serverdata-d50cb8eff8d4f143b553cc33401f60baa6b03873.zip |
System-based EXP UP events are now compatible with GM calls.
GM calls still override system-based experience changes.
New syntax for how system-based EXP UP events are to be used. Cap is x2.
-rw-r--r-- | npc/003-1/aahna.txt | 11 | ||||
-rw-r--r-- | npc/023-2/mk.txt | 6 | ||||
-rw-r--r-- | npc/commands/rate-management.txt | 11 | ||||
-rw-r--r-- | npc/functions/siege.txt | 20 |
4 files changed, 26 insertions, 22 deletions
diff --git a/npc/003-1/aahna.txt b/npc/003-1/aahna.txt index 9273e3955..94fff454a 100644 --- a/npc/003-1/aahna.txt +++ b/npc/003-1/aahna.txt @@ -24,14 +24,9 @@ OnInit: // Server Happy Hour OnSun1800: - /* - $@EXP_EVENT=rand(110, 115); - if ($@EXP_EVENT > 111 && $@EXP_EVENT != 115) - $@EXP_EVENT=rand(110, 115); - */ - $@EXP_EVENT=rand(115, 120); - if ($@EXP_EVENT > 115 && $@EXP_EVENT != 120) - $@EXP_EVENT=rand(115, 120); + $@EXP_EVENT=rand2(15, 20); + if ($@EXP_EVENT > 15 && $@EXP_EVENT != 20) + $@EXP_EVENT=rand2(15, 20); $@EXP_EVENT_TIME=any(1,1,1,2); donpcevent "@exprate::OnPlayerCall"; end; diff --git a/npc/023-2/mk.txt b/npc/023-2/mk.txt index 8fe91da85..60fa62361 100644 --- a/npc/023-2/mk.txt +++ b/npc/023-2/mk.txt @@ -53,13 +53,13 @@ L_Finish: channelmes("#world", "Congratulations for the draw, that was a good fight."); channelmes("#world", "The Monster King stole whatever he wanted and left."); // Reproduce the same bonus from Alpha Server - $@EXP_EVENT=125; + $@EXP_EVENT=25; donpcevent "@exprate::OnPlayerCall"; } else if (.victory_count < 100) { // 1 player for 5 minutes is enough to prevent this loss announce "The Monster King, after moping the floor with the players, accomplish what he set, and left...", bc_all|bc_npc; channelmes("#world", "The players failed miserably in stopping the Monster King."); // Reproduce the same penalty from Beta Server - $@EXP_EVENT=rand(50, 75); + $@EXP_EVENT=rand2(-50, -25); donpcevent "@exprate::OnPlayerCall"; } else { announce "The fight ends in draw, with advantage to the Monster King...", bc_all|bc_npc; @@ -127,7 +127,7 @@ OnVictory: channelmes("#world", "Getting magic is now easier!"); announce "Players have defeated the Monster King! He fleed from the cave after leaving a decoy!", bc_all|bc_npc; $MANA_BLVL-=10; - $@EXP_EVENT=125; + $@EXP_EVENT=25; donpcevent "@exprate::OnPlayerCall"; goto L_Finish2; end; diff --git a/npc/commands/rate-management.txt b/npc/commands/rate-management.txt index f04597ca9..c7945cd78 100644 --- a/npc/commands/rate-management.txt +++ b/npc/commands/rate-management.txt @@ -75,14 +75,23 @@ OnCall: end; OnPlayerCall: + /* // GM calls take precedence at any time! if (.max_hours > 0 || .hours > 0) end; + */ // $@EXP_EVENT will determine the boost and should not be above 25% // Default duration is one hour, or whatever $@EXP_EVENT_TIME is - $@EXP_EVENT=limit(0, $@EXP_EVENT, 150); + $@EXP_EVENT=limit(0, $@EXP_EVENT, 100); + $@EXP_EVENT+=.current_rate; $@EXP_EVENT_TIME=limit(1, $@EXP_EVENT_TIME, 6); + // If a GM rate-up was running, we will sum the time, too. + // It'll be rounded down. (so 1h + 30m = 1h) FIXME average is better + if (.hours || .max_hours) { + $@EXP_EVENT_TIME+=max(0, .max_hours-.hours-1); + } + // Default duration is one hour, or whatever $@EXP_EVENT_TIME is .hours = 0; .max_hours = $@EXP_EVENT_TIME; diff --git a/npc/functions/siege.txt b/npc/functions/siege.txt index ef14e6e51..95d16ebc2 100644 --- a/npc/functions/siege.txt +++ b/npc/functions/siege.txt @@ -433,9 +433,9 @@ OnRespawn: OnSergeantDeath: if ($GAME_STORYLINE == 2) $MK_TEMPVAR+=1; - getitem StrangeCoin, rand(1,5); + getitem StrangeCoin, rand2(1,5); announce("##2The Monster Sergeant was defeated by "+strcharinfo(0)+"!", bc_all); - $@EXP_EVENT=rand2(101, 103); + $@EXP_EVENT=rand2(1, 3); $@EXP_EVENT_TIME=1; donpcevent "@exprate::OnPlayerCall"; end; @@ -443,9 +443,9 @@ OnSergeantDeath: OnLieutenantDeath: if ($GAME_STORYLINE == 2) $MK_TEMPVAR+=3; - getitem StrangeCoin, rand(5,10); + getitem StrangeCoin, rand2(5,10); announce("##2The Monster Lieutenant was defeated by "+strcharinfo(0)+"!", bc_all); - $@EXP_EVENT=rand2(104, 106); + $@EXP_EVENT=rand2(4, 6); $@EXP_EVENT_TIME=1; donpcevent "@exprate::OnPlayerCall"; end; @@ -453,9 +453,9 @@ OnLieutenantDeath: OnCaptainDeath: if ($GAME_STORYLINE == 2) $MK_TEMPVAR+=5; - getitem StrangeCoin, rand(10,15); + getitem StrangeCoin, rand2(10,15); announce("##2The Monster Captain was defeated by "+strcharinfo(0)+"!", bc_all); - $@EXP_EVENT=rand2(107, 109); + $@EXP_EVENT=rand2(7, 9); $@EXP_EVENT_TIME=1; donpcevent "@exprate::OnPlayerCall"; end; @@ -463,10 +463,10 @@ OnCaptainDeath: OnColonelDeath: if ($GAME_STORYLINE == 2) $MK_TEMPVAR+=7; - getitem StrangeCoin, rand(15,20); + getitem StrangeCoin, rand2(15,20); $MOST_HEROIC$=strcharinfo(0); announce("##2The Monster Colonel was defeated by "+strcharinfo(0)+"!", bc_all); - $@EXP_EVENT=rand2(110, 112); + $@EXP_EVENT=rand2(10, 12); $@EXP_EVENT_TIME=1; donpcevent "@exprate::OnPlayerCall"; end; @@ -474,10 +474,10 @@ OnColonelDeath: OnGeneralDeath: if ($GAME_STORYLINE == 2) $MK_TEMPVAR+=9; - getitem StrangeCoin, rand(20,25); + getitem StrangeCoin, rand2(20,25); $MOST_HEROIC$=strcharinfo(0); announce("##2The Monster General was defeated by "+strcharinfo(0)+"!", bc_all); - $@EXP_EVENT=rand2(113, 115); + $@EXP_EVENT=rand2(13, 15); $@EXP_EVENT_TIME=1; donpcevent "@exprate::OnPlayerCall"; end; |