(HELP) Question about checking backpack item status
Posted: Thu Apr 19, 2012 8:49 am
OK, so I have been able to split what I need between three waypoint files, and they transition correctly, and the waypoint sells to a vender correctly. I however have a problem with it checking my inventory the way I need/want it to.
Waypoint, the first: This waypoint is my main botting waypoint. It is in this file I have it check for durability and total number of empty slots. The durability check works as far as I know, but should be unneccessary since my back pack should be filling up much faster than my weapon will be going down. My code for the items check is this:
I am doing it this way because I can't get it to do what I want it to do. This works.
What I want it to do: I want it to check JUST bags 1, 2, and 3; then if there is less than 5 spaces, go sell.
I have 4 bags and I would like to keep my potions and arrows, and misc items in the 4th backpack and have it not factored into the item count.
After reading a bit on the forum, I came up with the following:
I got the range code from the RoM Functions page of the SolarWiki
This, however, does not seem to check bag 3 as I had hoped. I just wanted it to check bag 3 because it will be the last of my 3 backpacks to fill up, making it unnecessary to check the first 2.
Any tips from some seasoned code junkies?
Waypoint, the first: This waypoint is my main botting waypoint. It is in this file I have it check for durability and total number of empty slots. The durability check works as far as I know, but should be unneccessary since my back pack should be filling up much faster than my weapon will be going down. My code for the items check is this:
Code: Select all
if 35 > inventory:itemTotalCount(0) then
loadPaths("Sardo_repair")
endWhat I want it to do: I want it to check JUST bags 1, 2, and 3; then if there is less than 5 spaces, go sell.
I have 4 bags and I would like to keep my potions and arrows, and misc items in the 4th backpack and have it not factored into the item count.
After reading a bit on the forum, I came up with the following:
Code: Select all
if ( inventory:itemTotalCount(0, bag3) < 5 ) then
loadPaths("Sardo_repair")
endCode: Select all
inventory:itemTotalCount(itemNameOrId, range)Any tips from some seasoned code junkies?