RuneDragon
2013-05-16 17:11:16
I am modifying combat script to take loot.
I added procedure
Call it before attacking NPC.
Now script find the loot. Click on it. My char walk over the loot stack.
Since my char moved, x and y get changed. So next 2 ClickMouse2 miss click.
Calling the CheckLoot procedure while standing on loot stack won't work as.. loot is not visible.
How do i get the loot ? May be get my current x,y (where my char standing) and click to take loot. If there any function to do that ?
I added procedure
Procedure CheckLoot;
begin
Writeln('CheckLoot');
if FindObjCustom(x,y,['ake','Take'],[7414386,7350664,6624140,5640311], 10) then
begin
Writeln('FOUND Loot');
PlaySound('G:\rs\beep.wav');
MMouse(x,y, 0, 0);
ClickMouse2(mouse_left);
while (IsMoving = True) do
begin
wait(100);
end;
ClickMouse2(mouse_left);
wait(randomRange(100,450));
ClickMouse2(mouse_left);
wait(randomRange(100,450));
end;
end;
Call it before attacking NPC.
Now script find the loot. Click on it. My char walk over the loot stack.
Since my char moved, x and y get changed. So next 2 ClickMouse2 miss click.
Calling the CheckLoot procedure while standing on loot stack won't work as.. loot is not visible.
How do i get the loot ? May be get my current x,y (where my char standing) and click to take loot. If there any function to do that ?