Log in

View Full Version : Help with Inv and use on object!



BigRedJapan
06-01-2012, 01:03 AM
Procedure LanteronLight;

Var
lX, lY, gX, gY: Integer;


Begin
Wait(1000);
lX:=MICX;
lY:=MICY;
If FindObjTPA(lX, lY, 10771522, 15, 1, 4, 5, 150, ['se Sap', 'phire', 're lant']) Then
Begin
StatsGuise('Found Lantern');
WriteLn('Found Lantern');
GetMousePos(lX, lY);
Mouse(lX, lY, 5, 5, False);
WaitOption('Use Sapphire lantern', 500)
Begin
Wait(4000);
if FindColorSpiralTolerance(gX, gY, 8871996, 6, 2, 332, 106, 20)Then
Begin
MoveMouse(gX, gY);
Wait(1500);
HoldMouse(gX, gY, 1);
ReleaseMouse(gX, gY, 1);
Wait(6000);
end;
end;
end;
end;
Its not working for me!

i need to make it grab the lantern in my pack and use it on something!
Really need some advise!

x[Warrior]x3500
06-01-2012, 01:33 AM
use either a dtm or a bmp, it would be easier

riwu
06-01-2012, 01:42 AM
WaitOption('Use Sapphire lantern', 500)
Are u sure the actual text is exactly this? (case sensitive) Actually it doesn't have to be so specific, try replace it with 'apph' or 'ante'.

Also
MoveMouse(gX, gY);
Wait(1500);
HoldMouse(gX, gY, 1);
ReleaseMouse(gX, gY, 1);
Wait(6000);
This is very botlike. Try use includes functions:
MMouse(gX,gY,5,5);
wait(RandomRange(1000,2000));
ClickMouse2(true);
Wait(RandomRange(5000,7000));

BigRedJapan
06-01-2012, 01:59 AM
WaitOption('Use Sapphire lantern', 500)


I think it has to be the full thing because its clicking! And that is spelled right!

MMouse(gX,gY,5,5);
wait(RandomRange(1000,2000));
ClickMouse2(true);
Wait(RandomRange(5000,7000));

Thanks!