ZaSz
2009-04-07 18:04:40
ok so i did
it finds items perfectly, but after I pick them up and go on, the next time i call the procedure, it checks where the last item was as if the item was still on the ground…
This is annoying once ive picked up 4 items cause it takes forever to pick up the only item on the ground…
HELP please.
procedure pickupitems;
begin
if FindGroundItems(itemd, [idi1,idi2,idi3], 10) then
begin
for I := 0 to high(itemd) do
begin
gametab(4);
if (DistanceFrom(point(itemd[i].tile.x,itemd[i].tile.y)) < 8) then
begin
itempos := TileToMS(point(itemd[i].tile.x,itemd[i].Tile.y), Random(5));
mmouse(itempos.x,itempos.y,0,0);
wait(200+random(400));
for d := 0 to 2 do
if OptionExists(itemnames[d]) then
begin
mouse(itempos.x,itempos.y,1,1,false);
wait(300+random(600));
R_ChooseOption('ake '+itemnames[d]);
work;
end;
end;
if (DistanceFrom(point(itemd[i].tile.x,itemd[i].tile.y)) > 7) then
begin
walktotile(itemd[i].tile,2,1);
wait(400+random(400));
itempos := TileToMS(point(itemd[i].tile.x,itemd[i].Tile.y), Random(5));
mmouse(itempos.x,itempos.y,0,0);
wait(200+random(400));
for d := 0 to 2 do
if OptionExists(itemnames[d]) then
begin
mouse(itempos.x,itempos.y,1,1,false);
wait(300+random(600));
R_ChooseOption('ake '+itemnames[d]);
work;
end;
end;
end;
end;
end;it finds items perfectly, but after I pick them up and go on, the next time i call the procedure, it checks where the last item was as if the item was still on the ground…
This is annoying once ive picked up 4 items cause it takes forever to pick up the only item on the ground…
HELP please.