Page 2 of 2

Re: Dissassemble Materials

Posted: Thu Dec 12, 2013 5:24 am
by lolilol
Ok I dit that before but it's not work . I have this message :xxxx\xxx\xxx\xx\/bot.lua:688: No waypoints to go to waypoint file.
Ty for your replies

Re: Dissassemble Materials

Posted: Thu Dec 12, 2013 8:55 am
by rock5
That message means it finished the code in the onload section. That should only happen when you run out of the itemname.

Re: Dissassemble Materials

Posted: Thu Dec 12, 2013 9:15 am
by lolilol
haa coool probleme with my native language, so I put in english and it's ok, thank you very much ! :)

Re: Dissassemble Materials

Posted: Thu Dec 12, 2013 7:20 pm
by spyfromsiochain
For several mats in a job:

Code: Select all

<waypoints type="TRAVEL">
<onLoad> 
itemname1 ="Maple Plank" 
itemname2 ="Oak Plank" 
itemname3 ="Pine Plank" 
itemname4 ="Holly Plank" 

RoMScript("CloseAllWindows()") -- Don't want to accidentaly sell stuff!
while inventory:getItemCount(itemname1) > 0 do
for i, item in pairs(inventory.BagSlot) do 
if item.Name == itemname1 then
item:use() -- Breaks it up
yrest(2000)
end
end
end

while inventory:getItemCount(itemname2) > 0 do
for i, item in pairs(inventory.BagSlot) do 
if item.Name == itemname2 then
item:use() -- Breaks it up
yrest(2000)
end
end
end

while inventory:getItemCount(itemname3) > 0 do
for i, item in pairs(inventory.BagSlot) do 
if item.Name == itemname3 then
item:use() -- Breaks it up
yrest(2000)
end
end
end

while inventory:getItemCount(itemname4) > 0 do
for i, item in pairs(inventory.BagSlot) do 
if item.Name == itemname4 then
item:use() -- Breaks it up
yrest(2000)
end
end
end

</onLoad> 
</waypoints>