
Originally Posted by
Nikkos
Just put a bag on the floor of the tomb for example.
Once het gets to waypoint X he checks the supplies
if <XX he opens the backpack and picks up XX supplies
Yes but the script side of that is a tad more confusing. Watch...
lua code:local spearID = 1234
local stockPos = {x = 1234, y = 1234, z = 7}
registerEventListener(WALKER_SELECTLABEL, "onLabel")
function onLabel(label)
if (label == 'Restock') then
if (Self.ItemCount(spearID) <= 10) then
Walker.Stop()
local c = Container.New(Self.UseItemFromGround(stockPos.x, stockPos.y, stockPos.z))
wait(1000, 1200)
if c:isOpen() then
-- Here is where it's a bit more involved, this is just assuming the manas are directly inside the bp on ground. Finding them inside another bp would be even harder.
while Self.ItemCount(spearID) <= 20 do
for s = 0, c:ItemCount() do
local i = c:GetItemData(s)
if (i.id == manaID) then
c:MoveItemToContainer(s, 0, math.min(100, maxManas - Self.ItemCount(manaID)))
wait(500, 900)
break
end
end
end
else
print("Opening container failed.")
end
Self.Equip(spearID, 'weapon')
wait(500, 900)
Walker.Start()
end
end
end