Yakman
08-26-2006, 12:39 PM
there are a few occations when people use IsTextAt2 in SRL when they should not, :mad: this function only works if you put loadchars('') in your main loop
i know that loadchars('') is not used in SRL because if it was, you would get the message "font loaded from c://program files/..../scar/charsrs2/"
one example is in skills/woodcutting.scar, DropAllLogs
rocedure DropAllLogs;
var
rx, ry, m, n : Integer;
begin
Status('Dropping Logs');
Gametab(4)
begin
for M:=1 to 7 do
begin
for n:=1 to 4 do
begin
rx := 544 + (n * 42)
ry := 192 + (m * 36)
mmouse(rx, ry, 0, 0)
wait(100 + random(100));
if (IsTextAt2(9, 9, 'Wield', 100)) or
(IsTextAt2(9, 9, 'Search Bird', 100)) or
(IsTextAt2(9, 9, 'Use Knife', 100)) or
(IsTextAt2(9, 9, 'Use Tinder', 100)) then
Chopped := Chopped - 1;
Another example is in core/text.scar, FindTextSpiral, i understand this because it was made by people who didn't use loadchars2 or IsTextAtEx (khain and ohdearurdead)
GetMousePos(x, y);
x := x - step;
MoveMouseSmooth(x, y);
Wait(SpiralWait);
if (IsTextAt2(9, 9, txt, 100)) then
FoundText := True;
until (qx >= x) or (FoundText);
if (FoundText) then
Break;
My point is, in the next SRL, change these IsTextAt2 to IsUpText or something, otherwise it will not work unless we all put loadchars('') in our main loops :(
i know that loadchars('') is not used in SRL because if it was, you would get the message "font loaded from c://program files/..../scar/charsrs2/"
one example is in skills/woodcutting.scar, DropAllLogs
rocedure DropAllLogs;
var
rx, ry, m, n : Integer;
begin
Status('Dropping Logs');
Gametab(4)
begin
for M:=1 to 7 do
begin
for n:=1 to 4 do
begin
rx := 544 + (n * 42)
ry := 192 + (m * 36)
mmouse(rx, ry, 0, 0)
wait(100 + random(100));
if (IsTextAt2(9, 9, 'Wield', 100)) or
(IsTextAt2(9, 9, 'Search Bird', 100)) or
(IsTextAt2(9, 9, 'Use Knife', 100)) or
(IsTextAt2(9, 9, 'Use Tinder', 100)) then
Chopped := Chopped - 1;
Another example is in core/text.scar, FindTextSpiral, i understand this because it was made by people who didn't use loadchars2 or IsTextAtEx (khain and ohdearurdead)
GetMousePos(x, y);
x := x - step;
MoveMouseSmooth(x, y);
Wait(SpiralWait);
if (IsTextAt2(9, 9, txt, 100)) then
FoundText := True;
until (qx >= x) or (FoundText);
if (FoundText) then
Break;
My point is, in the next SRL, change these IsTextAt2 to IsUpText or something, otherwise it will not work unless we all put loadchars('') in our main loops :(