This is what I'm doing I'm trying to train archery on an artic orge lord. But during the night I run out of arrows so I log off what I wanted it to do was check for the arrows and once I run out I want it to refill from a secure. Maybe I'm going about it all wrong maybe I should have it check for item and if item isn't there then put xxxx amount in my backpack
Nope, you got the right idea. Pretty simple really, something like:
repeat
finditem %arrowtypes
If #findstack < somenumber
{
set %arrowstoget #MAXWEIGHT - #WEIGHT ;arrows are one stone
gosub restock %arrowstoget
}
until
sub restock
namespace push
namespace local restock
set !arrows %1
get your arrows out of the secure
put them in your pack
etc
etc
Namespace stuff
return
You know, something along these lines. I need to go watch Stranger Things so I'm hurrying

X