SRL Archive - Help

How to create your own uptext?


rj

2013-01-06 23:12:30

How would I create my own uptext? The one in the tutorial section seems to be outdated because the picture's won't load and it involves replacing the current RS uptext, as I just want to add it to my own include.

Anyone know a different tutorial?


So far all I have is this from a old tut:

program CharacterStuff;
{$I SRL/SRL.Simba}
var
x,y,Text,Char_r:integer;
Procedure Font;
begin
Char_r:=CreateBitmapMaskFromText('r', Text)//inbetween the ' ' is obviously your Char. but remember i said ANSII? yes this will convert it for you so make sure to name it properly.
//activateclient;
if FindBitmapMaskTolerance(Char_r, x, y, 0, 0, 100, 100, 30, 30) then//this is the function i tested with notepad feel free to do the same....
begin
movemouse(x,y);
end;
end;
begin
LoadFont(SoulSplitOption, True);

end;
end.

but I get this error:


[Error] (10:1): Type mismatch at line 9
Compiling failed.

Olly

2013-01-07 00:32:24

pretty sure the ocr does everything for you, just do loadfont() ?

rj

2013-01-07 09:59:45

which i can do how? lol

xtrapsp

2013-01-07 10:03:39

in your main loop



LoadFont(UpChars, True);

replace UpChars with your own font

rj

2013-01-07 10:09:36

From: xtrapsp
in your main loop



LoadFont(UpChars, True);

replace UpChars with your own font




program CharacterStuff;
{$I SRL/SRL.Simba}
var
x,y,Text,Char_r:integer;
Procedure Font;
begin
Char_r:=CreateBitmapMaskFromText('r', Text)//inbetween the ' ' is obviously your Char. but remember i said ANSII? yes this will convert it for you so make sure to name it properly.
//activateclient;
if FindBitmapMaskTolerance(Char_r, x, y, 0, 0, 100, 100, 30, 30) then//this is the function i tested with notepad feel free to do the same....
begin
movemouse(x,y);
end;
end;
begin
LoadFont(SoulSplitOption, True);

end;
end.

Ii what I have so far and I get the error:

[Error] (10:1): Type mismatch at line 9
Compiling failed.

Eduard

2013-01-07 11:26:11


{$I SRL/SRL.Simba}

var
x, y, Char_r: integer;
Text: string; // you defined Text as an integer. Text is a string.

procedure Font;
begin
Char_r := CreateBitmapMaskFromText('r', Text); // 1. always end a declaration with a semicolon. 2. the second parameter (Text) is a string.
if FindBitmapMaskTolerance(Char_r, x, y, 0, 0, 100, 100, 30, 30) then
begin
movemouse(x, y);
end;
end;

begin
LoadFont(SoulSplitOption, True);
end. // always the main loop of a script with a '.' instead of a semicolon


rj

2013-01-07 11:42:35

From: Eduard

{$I SRL/SRL.Simba}

var
x, y, Char_r: integer;
Text: string; // you defined Text as an integer. Text is a string.

procedure Font;
begin
Char_r := CreateBitmapMaskFromText('r', Text); // 1. always end a declaration with a semicolon. 2. the second parameter (Text) is a string.
if FindBitmapMaskTolerance(Char_r, x, y, 0, 0, 100, 100, 30, 30) then
begin
movemouse(x, y);
end;
end;

begin
LoadFont(SoulSplitOption, True);
end. // always the main loop of a script with a '.' instead of a semicolon



So could I add this to my include?

xtrapsp

2013-01-07 11:47:20

From: rjj95
So could I add this to my include?


Test it first ^^

rj

2013-01-07 11:59:17

From: xtrapsp
Test it first ^^


It compiled but i can't make it click the text because its option text cant start script while item is right clicked lol

Ian

2013-01-07 13:06:13

From: rjj95
It compiled but i can't make it click the text because its option text cant start script while item is right clicked lol


Take a screenshot when it is right-clicked and then try to find it on that?

rj

2013-01-07 13:49:36

From: BMWxi
Take a screenshot when it is right-clicked and then try to find it on that?


Server is offline atm -.-