Jump to content

Calculate pet system bonus based on pet level


Go to solution Solved by PACI,

Recommended Posts

  • Management

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

raw

raw

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.