From 3722e44b177a130970ad7fd1442fcf8adf792b45 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 18 Feb 2020 09:27:42 -0300 Subject: Use Battle Rating to determine PvP Experience Gain, and also control CoD. On CoD, you can have up to 10× more BR to get bottled dust loot. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- npc/functions/hub.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index d82f19d6a..8367d9bdf 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -296,6 +296,8 @@ function script HUB_PvP { .@atk=get_BR(getcharid(3)); .@def=get_BR(killedrid); .@honor=calc_HR(getcharid(3), killedrid); + .@bxp=max(readparam(BaseLevel, killedrid), .@def); + .@jxp=readparam(JobLevel, killedrid); .@m$=getmap(); // This is an official PVP Map @@ -328,8 +330,6 @@ function script HUB_PvP { // That is, read total attack, defense, HP, evasion and hit chance // And compare with your own readparam2(), then use a % and a table // based on your (assassin's) level. - .@bxp=readparam(BaseLevel, killedrid); - .@jxp=readparam(JobLevel, killedrid); if (compare(.@m$, "001-8")) { // Quirino Voraz PVP Arena // You get 5 times killed player level, and 1 time job level @@ -345,11 +345,10 @@ function script HUB_PvP { } else if (compare(.@m$, "001-10-1")) { // Call Of Dusty Boss Room // You _may_ get a Bottled Dusty at random, but dead player status affect - .@bagistr=(readparam2(bAgi, killedrid)*2)+readparam2(bDex, killedrid); - //.@b2=readparam(MaxHp, killedrid); - if (.@bagistr > 20) + if (.@def > .@atk/10) { if (rand2(0,250) < readparam2(bLuk)+readparam2(bLuk, killedrid)) getitem BottledDust, any(1,1,2); + } } else { // Anywhere else // You get 0.5 times killed player level, and 0 times job level -- cgit v1.2.3-70-g09d2