Hello
I'm trying improve my pet system, it already has bonus but is always on the max, how can I do to calculate the bonus based on pet level?
My system is something like this:
-- [ITEM VNUM] MOB_VNUM, DEFAULT NAME, buff_idx, spawn_effect_idx, amount of bonus or none, id bonus, value bonus, etc
[53005] = { 34004, "'s Azrael Bebe", 6, 2, 66, 20, 63, 15},
...
pet.summon(mobVnum, petName, pc.getqf("pet_"..item.vnum.."_level"), false)
if pet_info[4] != nil then
local num_bonus = pet_info[4] -- number of bonus to apply
for i = 1, num_bonus, 1 do
affect.add_collect(pet_info[5+2*(i-1)], pet_info[6+2*(i-1)], 60*60*24*365)
end
end
Exemple:
The objective is that the bonus 66 (exp bonus) has a max of 20% and it improves until gets to 20%, based on the pet level (my pet level max is 120)
How can I do that?
Thanks