Page 1 of 1

Bot don't use hp potions

Posted: Mon Jan 28, 2013 7:22 am
by edecr
Hello people,

I have a big problem! I started playing the Portuguese version of the game and as I have little time to play, I started using bot rom.
My problem is related to the use of potions hp.
This is the message that appears: "No more (usable) hp potions available at bagslot 1 to 240." I have potions in my bag ;)
Ex: local item = inventory.findItem(200811)
In this case item returns nil, do not use the name of the item because it is in Portuguese and has special characters. Ex: English = "Health Potions" | Portuguse = "Poções de Cura" (ç and õ).
Another function that was tried using inventory.useItem(200811) but this function use findItem too.
Sorry for my bad english, I'm brazilian.
Thank you in advance!

Re: Bot don't use hp potions

Posted: Mon Jan 28, 2013 7:34 am
by lisa
it checks for the id aswell, so the name shouldn't be an issue.

Code: Select all

item.Id == itemNameOrId
I suspect you might have an incorrect address for inventory.
save this file to the rom/userfunctions folder
userfunction_printinventory.lua
(324 Bytes) Downloaded 146 times
Start bot using commandline as the waypoint

Code: Select all

rom/bot path:commandline
type

Code: Select all

printinventory()
It will then print on your micromacro screen all the inventory info.

Re: Bot don't use hp potions

Posted: Mon Jan 28, 2013 7:40 am
by rock5
Just to make sure, you have Barbarian Herbs(Ervas Bárbaras) in your bags?

Re: Bot don't use hp potions

Posted: Mon Jan 28, 2013 8:11 am
by edecr
Hello lisa and rock5,
At the moment I'm at work. Thanks for the quick help from you!
I tested with all below level 25 potions, including "Ervas Barbáras".
In an hour, I go home and test their tips.
Thank you again.

Re: Bot don't use hp potions

Posted: Mon Jan 28, 2013 9:53 am
by edecr
Hello again,
lisa, I did what you asked me.
I added a picture with the result.
function_return.png
thx

Re: Bot don't use hp potions

Posted: Mon Jan 28, 2013 12:24 pm
by rock5
What version of the game does the Portuguese use anyway?

Re: Bot don't use hp potions

Posted: Mon Jan 28, 2013 12:37 pm
by edecr
The version of the game is 4.0.6

Re: Bot don't use hp potions

Posted: Mon Jan 28, 2013 12:58 pm
by rock5
A lot of places seem to be using 4.0.6. Try this version
http://www.solarstrike.net/phpBB3/viewt ... 625#p41625
Just follow the instructions.

Re: Bot don't use hp potions

Posted: Mon Jan 28, 2013 1:13 pm
by edecr
I'm working, when I get home I'll try your tip.
Thank you again rock5 and lisa.

Re: Bot don't use hp potions

Posted: Mon Jan 28, 2013 6:59 pm
by edecr
Thanks for the help rock5 and lisa.
I used the link that you shared rock5 and the tips of lisa.
Now the bot is working perfectly!!