Page 1 of 1

No more (useable) hp potions ... message

Posted: Sun Dec 02, 2012 5:35 pm
by RomJunkie
The bot can no longer find any hp/mana/phirius potions in bagslots 1 - 240, yet I am carrying several stacks of each (mixed throughout my bags).

I updated the bot from the last patch. What do I need to do?

Re: No more (useable) hp potions ... message

Posted: Sun Dec 02, 2012 5:52 pm
by Rickster
have you enabled the following profile settings?
<option name="USE_PHIRIUS_POTION" value="true" /> <!-- false | true if you want to use the Phirus Potions -->
<option name="PHIRIUS_MP_LOW" value="40" />
<option name="PHIRIUS_HP_LOW" value="40" />

Re: No more (useable) hp potions ... message

Posted: Sun Dec 02, 2012 6:06 pm
by RomJunkie
of course I have. I am saying that the bot is displaying messages of: "no more (useable) mana potions available at bagslot 1 to 240". It wouldn't say that if it wasn't configured to use them.

It worked perfectly piror to the latest update (though I am not suggesting the update is the cause). I may have screwed something up but don't know where to look.

I have verified that the "consumable.xml"?? file is intact and is listing my items correctly.

Re: No more (useable) hp potions ... message

Posted: Sun Dec 02, 2012 7:11 pm
by lisa
you can test the addresses for bags with this little userfunction

Code: Select all

function printinventory()
	local bags = {}
	inventory:update()
	for slot = 61, 240 do
		item = inventory.BagSlot[slot]
 	    if item.Available and  item.Name ~= "<EMPTY>" then
			table.insert(bags, {Name = item.Name, Id = item.Id, Rlevel = item.RequiredLvl, stats = item.Stats})
		end;
	end;
	table.print(bags)
end

Re: No more (useable) hp potions ... message

Posted: Sun Dec 02, 2012 11:56 pm
by RomJunkie
I got this: "attempt to index global 'inventory' (a nill value)"

Here's the script I rolled (copied and emptied from another):
------------------------------------
include("addresses.lua");
include("functions.lua");
function printinventory()
local bags = {}
inventory:update()
for slot = 61, 240 do
item = inventory.BagSlot[slot]
if item.Available and item.Name ~= "<EMPTY>" then
table.insert(bags, {Name = item.Name, Id = item.Id, Rlevel = item.RequiredLvl, stats = item.Stats})
end;
end;
table.print(bags)
end
function main()
printinventory()
end
startMacro(main, true);
----------------------------------
I think it is erring on the "inventory:update()" call.

Re: No more (useable) hp potions ... message

Posted: Mon Dec 03, 2012 12:04 am
by lisa
make up a userfunction file in the userfunctions folder and add that function to it. I have one called
userfunction_lisafunctions.lua
which I just put in random functions for testing.

Then start the bot with commandline

Code: Select all

rom/bot path:commandline
then call the function from the command prompt, it will look something like this

Code: Select all

Loaded waypoint path commandline.xml
No return path with default naming commandline_return.xml found.
We use the normal waypoint path commandline.xml now.

        RomBot command line
Type in 'q' (without quotes) to quit.
Command> printinventory()
table: 03E6C100
1:      table: 03E6E478
        Id:     205844
        stats:  table: 03298E70
        Name:   Elemental Hammer Ball
        Rlevel: 1
2:      table: 03E6E4A0
        Id:     240181
        stats:  table: 03298E98
        Name:   Phirius Shell
        Rlevel: 1
3:      table: 03E6E4F0
        Id:     203038
        stats:  table: 03297D90
        Name:   Phirius Token Coin
        Rlevel: 1
Command>
it should print any items you have in your bags, the normal backpack bags 1-6 not the item shop bag or transumter space.

If it prints the items fine then the issue is not the addresses for inventory, atleast it will rule it out or prove it is the issue =)

Re: No more (useable) hp potions ... message

Posted: Mon Dec 03, 2012 5:57 pm
by RomJunkie
Thanks Lisa, but I ended up deleting the entire folder and refreshing it from svn before I saw your message. The problem went away, so I'm happy ... and back to botting.

Re: No more (useable) hp potions ... message

Posted: Mon Dec 03, 2012 8:08 pm
by lisa
RomJunkie wrote:Thanks Lisa, but I ended up deleting the entire folder and refreshing it from svn before I saw your message. The problem went away, so I'm happy ... and back to botting.
glad it works again =)