SRL Archive - Non-RuneScape Scripts

P06 Functions/Procedures


John

2013-01-20 00:56:18

I'm really bored so here are some functions I've created, I may add more later.
One note, You MUST use P06Setup; if you are going to use these.


This:
{$i SRL\SRL.simba}
Is still required for mouse moving functions.

{*******************************************}
//Made by: John
//Use: Highly altered Setup
//Date: 01/20/13
{*******************************************}
procedure P06Setup;
var
t: Integer;
begin
SetupBoxes; //Sets up box variables in globals.simba
t := GetTimeRunning;
MouseSpeed := 25;
setupGauss;
end;


{*******************************************}
//Made by: John
//Use: True if we are logged in, if not false.
//Date: 01/20/13
{*******************************************}
function P06LoggedIn: Boolean;
begin
Result := (GetColor(484, 482) = 16777215);//uses the white report text.
{if Result then
WriteLn('We are logged in')
else
WriteLn('We are NOT logged in');}
end;


{*******************************************}
//Made by: John
//Use: Opens specified tabs.
//Date: 01/20/13
{*******************************************}
function P06GameTab(Tab: string): Boolean;
var
CoordsX, CoordsY: Integer;
begin
if (not P06LoggedIn) then
Exit;
case Tab of //rough but works.
'inv':
begin
CoordsX:= 650;
CoordsY:= 185;
end;

'equip':
begin
CoordsX:= 685;
CoordsY:= 185;
end;

'prayer':
begin
CoordsX:= 711;
CoordsY:= 185;
end;

'magic':
begin
CoordsX:= 740;
CoordsY:= 185;
end;

'quest':
begin
CoordsX:= 613;
CoordsY:= 185;
end;

'skill':
begin
CoordsX:= 587;
CoordsY:= 185;
end;

'combat':
begin
CoordsX:= 558;
CoordsY:= 185;
end;

'friend':
begin
CoordsX:= 586;
CoordsY:= 483;
end;

'ignore':
begin
CoordsX:= 614;
CoordsY:= 483;
end;

'logout':
begin
CoordsX:= 649;
CoordsY:= 483;
end;

'settings':
begin
CoordsX:= 684;
CoordsY:= 483;
end;

'controls':
begin
CoordsX:= 712;
CoordsY:= 483;
end;

'music':
begin
CoordsX:= 739;
CoordsY:= 483;
end;
end;

Mouse(CoordsX, CoordsY, 10, 10, MOUSE_LEFT);

end;


{*******************************************}
//Made by: John
//Use: Logs out your Character.
//Date: 01/20/13
{*******************************************}
procedure P06Logout;
var
x, y, t: integer;
begin
if (not P06LoggedIn) then
Exit;
if P06GameTab('logout') then
begin
MarkTime(t);
Repeat
Wait(50);
until (FindColorTolerance(x, y, 2106259, 581, 362, 712, 384, 5)) or (TimeFromMark(t) > 2000+random(700))
Mouse(644, 378, 5, 5, MOUSE_LEFT);
end;
end;


{*******************************************}
//Made by: John
//Use: Logs in your Character.
//Date: 01/20/13
{*******************************************}
procedure P06LogIn;
var
x, y, t: integer;
begin
if P06LoggedIn then
Exit;
If (not P06Ready) then
begin
WriteLn('P06 is not loaded, please load it up and then start the script again(Make sure you have targeted the game client');
TerminateScript;
end else
begin
MouseBox(390, 273, 534, 306, MOUSE_LEFT);

MarkTime(t);

Repeat
Wait(50);
until (FindColorTolerance(x, y, 65535, 432, 222, 435, 227, 4)) or (TimeFromMark(t) > 2000+random(700));

TypeSend(Players[CurrentPlayer].Name);
SendKeys(Players[CurrentPlayer].Pass, 70, 70);
MouseBox(230, 302, 371, 338, MOUSE_LEFT);

MarkTime(t);

Repeat
Wait(50);
until (P06LoggedIn) or (TimeFromMark(t) > 2000+random(700));
Wait(2500+random(1000));
end;
end;




You can test them with this.

begin
P06setup;
if P06LoggedIn then
P06GameTab('inv');
end.

Janus

2013-01-20 01:16:16

Oh cool this is good to see. I am new to scripting (so apologies if I make no sense!) but was thinking of doing something similar soon. Do you just paste these into your code if you want to use them? Is there anyway to make an include thing for these? We could have numerous people working on things and collate them altogether?

What other functions do you think should be made? I would love to attempt some.

John

2013-01-20 01:25:02

From: Janus
Oh cool this is good to see. I am new to scripting (so apologies if I make no sense!) but was thinking of doing something similar soon. Do you just paste these into your code if you want to use them? Is there anyway to make an include thing for these? We could have numerous people working on things and collate them altogether?

What other functions do you think should be made? I would love to attempt some.


I just finished Logout and I am starting on Login now.

E: Just added them

drivebygangbang

2013-01-20 04:47:45

From: Janus
include thing

a library?

John

2013-01-20 06:30:35

From: drivebygangbang
a library?


He means something like this: {$i srl/P06.simba}

John

2013-01-21 05:48:05

Sorry to double post, But would anyone like a function made to work with P06?

Justin

2013-01-21 06:46:29

Jawn, Why?? :(

John

2013-01-21 21:53:30

From: Justin
Jawn, Why?? :(


because I'm bored Jawstin.

Pew

2013-01-23 22:30:27

Something to possibly check run percentage? Anti-randoms? Great work so far!

rj

2013-01-23 22:59:17

I'll start in a p06 include when i add mouse movements to my ss include

Echo_

2013-01-23 23:37:35

From: rjj95
I'll start in a p06 include when i add mouse movements to my ss include


What's wrong with the mouse movements already in SRL?

rj

2013-01-24 06:38:41

From: Echo_
What's wrong with the mouse movements already in SRL?


I can't include my ss include and the srl include add the same time.. therfor when i use the soulsplit include the mouse jumps because mmouse is not availible, so i have to add the srl mouse movements

Echo_

2013-01-24 12:21:59

From: rjj95
I can't include my ss include and the srl include add the same time.. therfor when i use the soulsplit include the mouse jumps because mmouse is not availible, so i have to add the srl mouse movements


That's what I was wondering, because you're post made it sound like you were writing your own custom mouse procedure just for use with SS.

Awkwardsaw

2013-01-24 22:03:00

has anyone by chance made a simple uptext checker? just one that counts the colors of either white/blue/yellow. I know someone made one a while ago when the fonts got screwed up, but can't find it.

I'm only asking because I tried making one, and it's not finding the colors