Page 1 of 1

Not using MP Potion

Posted: Wed Feb 17, 2010 1:02 am
by hax
My Bot does not use MP potions anymore, only HP potions.
I got this in my profile:

Code: Select all

		<option name="HP_LOW"			value="85" />
		<option name="MP_LOW_POTION"	value="30" />
		<option name="HP_LOW_POTION"	value="35" />
		<option name="USE_HP_POTION"	value="best" />	<!-- potion select strategy: best|minstack -->
		<option name="USE_MANA_POTION"	value="best" />	<!-- potion select strategy: best|minstack -->
My class is rouge/priest and I'm using the lvl 41 potions. I haven't tried to take the old potions with me yet.
Anyone else encountered this problem?

Re: Not using MP Potion

Posted: Sun Feb 21, 2010 9:16 am
by b e n n i
I have exactly the same problem.
My bot doesn't use MP potions anymore.
I think its since the last game update.

If I use that code in OnSkillCast

Code: Select all

if( 35 > player.MP/player.MaxMP*100 ) then
inventory:useItem(201060)
end
The Bot use a MP Potion after each Fight, no matter how many MP it have.

My class is also Rouge/Priest an I'm using also the lvl 41 potions. I tried the potion above too (lvl 36 I think), they doesnt work also.

Re: Not using MP Potion

Posted: Sun Feb 21, 2010 3:21 pm
by Administrator
You should be using MP2 and MaxMP2, since your secondary class uses mana. Or, Mana and MaxMana (which doesn't mater which is primary or secondary).

Anyways, there's no reason you shouldn't be using potions. My best bet is you've got files that don't match your game version, or there's a problem parsing your item links.

Re: Not using MP Potion

Posted: Sun Feb 21, 2010 6:11 pm
by hax
I've tried reinstalling the bot, changing the game language from german to english but nothing helps.
Even the script in OnSkillCast doens't work for me, but I don't know exactly if I need to put the potions in a certain inventory slot ^^

Re: Not using MP Potion

Posted: Sun Feb 21, 2010 6:40 pm
by Administrator
They only need to be within the first two pages of your inventory (ie. the free pages). Try putting this in your waypoint file and see what it outputs:

Code: Select all

printf("Mana: %s, Max mana: %s\n", tostring(player.Mana), tostring(player.MaxMana))

Re: Not using MP Potion

Posted: Mon Feb 22, 2010 8:38 am
by b e n n i
Now I know, what the problem is.

The bot thinks always that i have full mana (see attachment).

I put the code in OnSkillCast and in every line is Mana the same as Max mana.

Re: Not using MP Potion

Posted: Mon Feb 22, 2010 3:28 pm
by Administrator
Think I've found the problem.
Open rom/addresses.lua, look for this:

Code: Select all

	pawnMP2_offset = 0x2E0,
Change to:

Code: Select all

	pawnMP2_offset = 0x2DC,
Save and see what happens.

Re: Not using MP Potion

Posted: Tue Feb 23, 2010 1:12 pm
by b e n n i
Very fast response!!!!!!! :D :D :D

Now it works :mrgreen: :mrgreen: :mrgreen:

Big THX ;) ;) ;)