zabuzo
Well-Known Member
- Joined
- Jun 10, 2016
- Messages
- 238
- Reaction score
- 54
I found here on this forum the famous bonus party x4 to 8.60
On the script each vocation give +50% exp, so 200% total with 4 vocations (2x)
But i'm making a custom project, with custom vocation and idk how to adapt this
This is the bonus code:
this is my vocation base:
i would like to edit the c++ code to something like this:
so with 2 vocations xp = (66% * 2) + 17 = 150% (1.5x), or just 2 vocations = 150% (1.5x)
and all 3 vocations xp = (66% * 3) + 2 = 200% (2x), or just 3 vocations = 200% (2x)
i also want to each rooker count as a new vocation so rookers could make their teams to get out of rook more faster
so with 2 rookers xp = (66% * 2) + 17 = 150% (1.5x), or just 2 rookers = 150% (1.5x)
so with 3 rookers xp = (66% * 3) + 2 = 200% (2x), or just 3 rookers = 200% (2x)
is anyone know how to?
On the script each vocation give +50% exp, so 200% total with 4 vocations (2x)
But i'm making a custom project, with custom vocation and idk how to adapt this
This is the bonus code:
Code:
uint32_t Player::getBaseVoc() {
uint32_t curVoc = vocationId;
Vocation* voc = Vocations::getInstance()->getVocation(curVoc);
while(voc->getFromVocation() != curVoc) {
curVoc = voc->getFromVocation();
voc = Vocations::getInstance()->getVocation(curVoc);
}
return curVoc;
}
double Player::getPartyBonus() {
double bonus = 1;
bool vocations[] = {false, false, false, false, false, false, false, false};
if(Party* party = this->getParty()) {
if(party->isSharedExperienceEnabled() && party->isSharedExperienceActive()) {
PlayerVector list = party->getMembers();
list.push_back(party->getLeader());
for(PlayerVector::const_iterator it = list.begin(); it != list.end(); ++it) {
uint32_t vocId = (*it)->getBaseVoc();
if(!vocations[vocId]) {
vocations[vocId] = true;
bonus += 0.50;
}
}
}
}
return bonus;
}
this is my vocation base:
Code:
local voc = getPlayerVocation(pid)
if voc == 0 then
ROOKER = true
elseif voc == 1 or voc == 4 or voc == 5 or voc == 6 or voc == 7 then
HUMAN = true
elseif voc == 2 or voc == 8 or voc == 9 or voc == 10 then
VAMPIRE = true
elseif voc == 3 or voc == 11 or voc == 12 or voc == 13 or voc == 14 or voc == 15 or voc == 16 or voc == 17 then
WEREWOLF = true
end
i would like to edit the c++ code to something like this:
so with 2 vocations xp = (66% * 2) + 17 = 150% (1.5x), or just 2 vocations = 150% (1.5x)
and all 3 vocations xp = (66% * 3) + 2 = 200% (2x), or just 3 vocations = 200% (2x)
i also want to each rooker count as a new vocation so rookers could make their teams to get out of rook more faster
so with 2 rookers xp = (66% * 2) + 17 = 150% (1.5x), or just 2 rookers = 150% (1.5x)
so with 3 rookers xp = (66% * 3) + 2 = 200% (2x), or just 3 rookers = 200% (2x)
is anyone know how to?