SRL Archive - OSR Help

Alching procedure failing :(


Littellj

2012-03-31 19:37:47

I'm trying to make a woodcutter that alch's the logs as it gets them. The problem im running into is that it will click the alch spell, move to invy spot, then if uptext true, clicks. If not i would like it to loop into a wait, until it gets the uptext.
Suggestion?





////////////////////////////////////////////////////////////////////
/////////////{Modified from FLIGHTS Heavy Rodder!}//////////////////
////////////////////////////////////////////////////////////////////

Procedure ReadyAlch;
var
AlchBMP: Integer;
begin
AlchBMP := BitmapFromString(10, 6, 'meJwLuf2Kd8o6JkYmVl1+sVgVpk0' +
'y8sez4Uhi10WILLsQO4sHG1MOC1ABHAGl2OKaILJABDQBGQGlIAii' +
'AFOWtbwfiICyaAq+n0oEigMNZ/HJZjFwhyuA2wIAwl0jlg==');

if FindBitmapIn(AlchBMP, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(X, Y, 3, 3);
ClickMouse2(True);
end else if not FindBitmapIn(AlchBMP, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
GameTab(tab_Magic);
if FindBitmapIn(AlchBMP, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse( x, y, 5, 5);
ClickMouse2(True);
Wait(50 + random(50));
end;
end;
FreeBitmap(AlchBMP);

end;


Procedure Alch;
label
start;
begin

repeat
if InvFull then
exit;

ReadyAlch;

start:
begin
InvMMouse2(1);
if WaitUpTextMulti(['Cast', 'ow L', 'evel', 'lchem'], 600) then
begin
ClickMouse2(True);
end else
begin
Wait(RandomRange(250,500));
if(not(IsMoving_W)) then
exit;
Goto Start;
end;
Wait(500 + Random(500));
end;

until(not(IsMoving_W))

end;

Gucci

2012-03-31 22:22:06

So wait until the log is there? If so add something like this into the Alch procedure:

Repeat 
Wait(50 + Random(50))
Until(IsUpText('Log'))