It's time to ask a question...
I tried to make a script that helps me on picking up boxes but it needs some improvement. The issue is that the way i made it the bot opens a box and when it is open he runs to the spot where the box was. I'd prefer the bot to recognize that he clicked the box and was opening it (or someone else opened) and just click the second nearest box.
I think this has to do with the "fadig away" of opened boxes, so that they are still there even if they have been opened already.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
for k,v in pairs(settings.profile.skills) do
v.AutoUse = false
end
while (true) do
local target = player:findNearestNameOrId("Mysterious Treasure Chest");
if ((target) and (100 > distance(target.X, target.Z, player.X, player.Z))) then
local time = os.time()
while (target and target.Name == "Mysterious Treasure Chest") do
player:target_Object(target.Name);
--target:update()
player:clearTarget();
yrest(700)
if (os.time() - time) > 1 then
cprintf(cli.yellow,"break1...\n")
break
end
end
else
cprintf(cli.yellow,"No boxes around...\n")
player:sleep()
end
player:clearTarget();
end
</onload>
</waypoints>Maybe this can be done with a table?
Br
nuker