SRL Archive - OSR Help

UpText Not Working on Second loop of my script?


Cage

2013-09-28 18:04:06



procedure GetClayFromBank;

begin
if bankscreen then
begin
WriteLn('found bankscreen');
if finddtm(CLAYDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
AL_MissMouse(Point(X, Y), 2, 2);
sleep(180 + random(220));
if IsUpText('oft') then
begin
Writeln('Taking Clay');
AL_FastClick(mouse_right);
sleep(212 + random(159));
chooseoption('Withdraw-All');
closebank;
sleep(215 + random(242));
findnoninventoryrandoms();
end
end
end
end;



Results from a test done on a door using the uptext.

1st loop = Close Door
2nd loop = lFn Fioorm@@m

Sorry to post again so soon… However, every procedure which uses ISUpText such as the one above work perfectly the first time round in my scripts, however, they fail to detect the uptext at all the second time the scripts loops.

Any ideas on what potentially could cause this? You would think if it works the first time it would again?

tealc

2013-09-28 19:56:18

From: Cage


procedure GetClayFromBank;

begin
if bankscreen then
begin
WriteLn('found bankscreen');
if finddtm(CLAYDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
AL_MissMouse(Point(X, Y), 2, 2);
sleep(180 + random(220));
if IsUpText('oft') then
begin
Writeln('Taking Clay');
AL_FastClick(mouse_right);
sleep(212 + random(159));
chooseoption('Withdraw-All');
closebank;
sleep(215 + random(242));
findnoninventoryrandoms();
end
end
end
end;



Results from a test done on a door using the uptext.

1st loop = Close Door
2nd loop = lFn Fioorm@@m

Sorry to post again so soon… However, every procedure which uses ISUpText such as the one above work perfectly the first time round in my scripts, however, they fail to detect the uptext at all the second time the scripts loops.

Any ideas on what potentially could cause this? You would think if it works the first time it would again?


are you changing the color tolerance with out changing it back to the default values?

Cage

2013-09-29 07:00:57

Resolved. Tealc, you were correct. It was down to not changing the colour tolerance back to their default values after altering them, just in case any new scriptwriters come across a similar problem.

Thanks!