Runescape Pro
03-14-2011, 01:59 AM
Long story short: Tutorial runner.
I never really have free time but I've been working on it today. When you entire whatever username you want, if the name is unavailable, then you can choose one of three options.
My code:
Begin
SetupSRL;
Unavailable[0]:='hy not';Unavailable[1]:='try on';Unavailable[2]:='these nam';Unavailable[3]:='Why no';Unavailable[4]:='of th';Unavailable[5]:='ame';Unavailable[6]:='ot try';Unavailable[7]:='se nam';
ActivateClient;
Wait(2000);
If FindTextTPAMulti(12378347, 4, 98, 234, 308, 253, Unavailable, 'XPChars', Nothing) Then Writeln('Found it!');
End.
The error:
Compiled succesfully in 1156 ms.
SRL Compiled in 16 msec
Error: Exception: Access violation at line 473
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
And opens this(Text.scar line 473):
{************************************************* ******************************
Function LoadTextTPA(Text : String; Chars : Integer;var height : integer) : TPointArray;
By: Raymond
Description: Loads a TPA of the text.. It also returns the real height
of the Text.. Used in FindTextTPAinTPA
************************************************** *****************************}
{$IFNDEF SIMBA}
function LoadTextTPA(Text: string; Chars: Integer; var height: integer): TPointArray;
var
DC: HDC;
CTS, w, h :INteger;
BMP: Integer;
begin;
BMP := CreateBitmapMaskFromText(Text,Chars);
DC := GetClientCanvas.Handle;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(0);
GetBitmapSize(BMP,W,H);
SetTargetDc(GetBitmapDc(BMP));
FindColorsTolerance(Result,clwhite,0,0,w+1,h+1,0);
height := h - 1;
SetTargetDC(DC);
ColorToleranceSpeed(CTS);
FreeBitmap(BMP);
end;
{$ELSE}
function LoadTextTPA(Text, Chars: string; var height: integer): TPointArray;
var
w: integer;
begin
**This line**result := TPAFromText(text,chars,w,height);**This line**
dec(height);
end;
{$ENDIF}
I guess its have a problem creating the tpa? Help please! :)
I never really have free time but I've been working on it today. When you entire whatever username you want, if the name is unavailable, then you can choose one of three options.
My code:
Begin
SetupSRL;
Unavailable[0]:='hy not';Unavailable[1]:='try on';Unavailable[2]:='these nam';Unavailable[3]:='Why no';Unavailable[4]:='of th';Unavailable[5]:='ame';Unavailable[6]:='ot try';Unavailable[7]:='se nam';
ActivateClient;
Wait(2000);
If FindTextTPAMulti(12378347, 4, 98, 234, 308, 253, Unavailable, 'XPChars', Nothing) Then Writeln('Found it!');
End.
The error:
Compiled succesfully in 1156 ms.
SRL Compiled in 16 msec
Error: Exception: Access violation at line 473
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
And opens this(Text.scar line 473):
{************************************************* ******************************
Function LoadTextTPA(Text : String; Chars : Integer;var height : integer) : TPointArray;
By: Raymond
Description: Loads a TPA of the text.. It also returns the real height
of the Text.. Used in FindTextTPAinTPA
************************************************** *****************************}
{$IFNDEF SIMBA}
function LoadTextTPA(Text: string; Chars: Integer; var height: integer): TPointArray;
var
DC: HDC;
CTS, w, h :INteger;
BMP: Integer;
begin;
BMP := CreateBitmapMaskFromText(Text,Chars);
DC := GetClientCanvas.Handle;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(0);
GetBitmapSize(BMP,W,H);
SetTargetDc(GetBitmapDc(BMP));
FindColorsTolerance(Result,clwhite,0,0,w+1,h+1,0);
height := h - 1;
SetTargetDC(DC);
ColorToleranceSpeed(CTS);
FreeBitmap(BMP);
end;
{$ELSE}
function LoadTextTPA(Text, Chars: string; var height: integer): TPointArray;
var
w: integer;
begin
**This line**result := TPAFromText(text,chars,w,height);**This line**
dec(height);
end;
{$ENDIF}
I guess its have a problem creating the tpa? Help please! :)