SRL Archive - Discussions and Debates

Runescape 2007 Scripts/SRL07 (Nothing exciting in here, just chit chat)


YoHoJo

2013-02-21 17:23:19

So who where is planning to make an include and scripts for RS07?
Are you fraking yolked and excited?! I AM!

Let's use this thread to discuss, collect, and organize our ideas code etc.

Do any current private servers have the same font, loot, etc as far as you know to what RS07 will be?
Let's try to get as much done as we can before it actually comes out so we can get scripts going ASAP!

I will be organizing all of our ideas and code etc on this OP and make it pretty for us all.

So yeah, talk.

Also let's keep all this 07 Stuff Members+ only! As I assume most of you were already planning to.
This will (like before, I forgot why? I think when we kept SMART member+) bring a lot more fresh blood here to learn to script :)

If there are already threads/info/etc about this please link me so I can compile all the latest information.

To Do:
Find/Get the last/latest SRL that worked for RS07, and then from there continue to tweak it to fit newest coding standards/enchantments.

GET MAPS ported to SPS to work for RS07! (Should be pretty easy?)

Figure out what fonts were used, get all of the text functions working. (Also easy)

Combat/Fighting Script. Will be VERY beneficial to have fast.

The Killer

2013-02-21 17:30:04

I'm prepard to help make it, but I don't know how much use I'll be :P. Don't about keeping it srl+ will have to see how other think.
As for fonts, I very recently used ChooseOption on a private server (rune rebels) and it worked fine.

Wetish

2013-02-21 18:09:37

We are going to need to work hard on random support. I think that will be the place most scripts fail. Unless of course someone can find an old include that includes them.

YoHoJo

2013-02-21 18:11:41

I believe we have access to all old SRL revisions somewhere.
Lots of thinks will/should just need minor tweaks.

DannyRS

2013-02-21 18:22:24

AFAIK most of the stuff in my private server include should work? Idk if the font is identical till it's live tho, I was guna have an 07 include, but I assumed an admin would add one to SRL anyway ;)

SPS maps need to be generated via a hacked runescape client as far as I can see, or custom made from actual minimap grabs, But SPS still works just fine even with the smaller minimap area to look at, getting a worldmap is a problem because theres no high-res image anywhere from back then, then theres also the text overlay problem

Justin

2013-02-21 18:44:25

Really?

Jagex give us what we have been wanting to ages and people are going to bot it?
*yawn*
What a waste of time.

My person opinion.

Ian

2013-02-21 18:49:45

From: Justin
Really?

Jagex give us what we have been wanting to ages and people are going to bot it?
*yawn*
What a waste of time.

My person opinion.


I kinda agree with you on this, but at the same time I really want to try my hand at some oldschool random detection :)
Will the randoms be complicated puzzle ones of the ones that hurt you? I'd like to try some of them.

kingarabian

2013-02-21 18:50:35

I am as well. Heck, it should be much easier now. WHOSE GOING TO MAKE THAT FIRST PEST CONTROLLER BOYS?

Kave

2013-02-21 19:08:54

2007 Fonts from Scar 3.14 Installer, SRL4 Rev 1 - 15th September 2007 (less than 1 month behind upcoming backup, no major updates in that time frame.)

Flight

2013-02-21 19:38:03

Let's try to keep the majority of the scripts in the upper boards, atleast the Members boards.

Wetish

2013-02-21 21:10:35

From: Flight
Let's try to keep the majority of the scripts in the upper boards, atleast the Members boards.

I support this. I like the idea of releasing scripts to the public but I have a feeling that there will be a large amount of leeches coming just to bot in the old school servers. They would most likely come from other botting website that support goldfarming and such. This would break our whole idea of just trying to blend in and not ruining the game.

Richard

2013-02-21 21:19:15

From: Wetish
I support this. I like the idea of releasing scripts to the public but I have a feeling that there will be a large amount of leeches coming just to bot in the old school servers. They would most likely come from other botting website that support goldfarming and such. This would break our whole idea of just trying to blend in and not ruining the game.


This.

Off topic: do you have a reddit account with the same name?

YoHoJo

2013-02-21 21:19:25

From: The Killer
I'm prepard to help make it, but I don't know how much use I'll be :P. Don't about keeping it srl+ will have to see how other think.
As for fonts, I very recently used ChooseOption on a private server (rune rebels) and it worked fine.

For sure anyone who makes anything will either keep it Member+ (if they are a member) or keep it private if they are not (or if they don't wish to share it). No one wants this mass botted or abused so early. I'm sure most/all scripts will be very private/closed off.


From: Wetish
We are going to need to work hard on random support. I think that will be the place most scripts fail. Unless of course someone can find an old include that includes them.


Yeah we have all of the old randoms, but I'm sure they will need tweaking and stuff.
From what I recall though we had all randoms decently stable besides 2 or 3 of them? Like Maze, maybe mime, molly was okay, idk.


From: DannyRS
AFAIK most of the stuff in my private server include should work? Idk if the font is identical till it's live tho, I was guna have an 07 include, but I assumed an admin would add one to SRL anyway ;)

SPS maps need to be generated via a hacked runescape client as far as I can see, or custom made from actual minimap grabs, But SPS still works just fine even with the smaller minimap area to look at, getting a worldmap is a problem because theres no high-res image anywhere from back then, then theres also the text overlay problem


It depends on how close the private servers are to the release they do, but yeah overall using all of our old stuff with minor tweaks should be just fine.
Hacked RS client and stuff wat? How were current SPS maps made?
Can't we just find an RS07 map online w/o symbols and cut it up and use it?
Like these:
https://www.google.com/search?q=runescape+map+2007&aq=f&um=1&ie=UTF-8&hl=en&tbm=isch&source=og&sa=N&tab=wi&authuser=0&ei=1dQmUeTjGbD0iwKBpIDQAQ&biw=1920&bih=926&sei=19QmUfO6IYrMiQLor4CQDg


From: Justin
Really?
Jagex give us what we have been wanting to ages and people are going to bot it?
*yawn*
What a waste of time.
My person opinion.

Yes. Bound to happen. :)
We'll keep it small scale and private etc.
But eventually it'll be just as botted as now (assuming injection/reflection bots port over)

From: BMWxi
I kinda agree with you on this, but at the same time I really want to try my hand at some oldschool random detection :)
Will the randoms be complicated puzzle ones of the ones that hurt you? I'd like to try some of them.

Which ones exactly? We have the old random files and most worked just fine back that, we can tweak and redo them also.

From: kingarabian
I am as well. Heck, it should be much easier now. WHOSE GOING TO MAKE THAT FIRST PEST CONTROLLER BOYS?

:D

From: Kave
2007 Fonts from Scar 3.14 Installer, SRL4 Rev 1 - 15th September 2007 (less than 1 month behind upcoming backup, no major updates in that time frame.)


Thanks for the fonts, perfect.
What exactly is that revision of SRL?
Basically we need the latest SRL right before EoC correct?
Thanks so much for those links.

From: Flight
Let's try to keep the majority of the scripts in the upper boards, atleast the Members boards.

Of course! I'm sure it was going to be like this either way!

From: Wetish
I support this. I like the idea of releasing scripts to the public but I have a feeling that there will be a large amount of leeches coming just to bot in the old school servers. They would most likely come from other botting website that support goldfarming and such. This would break our whole idea of just trying to blend in and not ruining the game.


Everyone is free to release stuff as they wish, but I assume most people will keep them private or release to member+ only.
Plus that will make new people come and WANT TO LEARN to script, so we'll get more member+ people!

kingarabian

2013-02-21 23:34:21

Lets at least beat Powerbot…

Ian

2013-02-21 23:38:42

From: YoHoJo

Which ones exactly? We have the old random files and most worked just fine back that, we can tweak and redo them also.


Well, I remember when I first started Runescape (~2007) there were things that would attack you if you fished/chopped wood for too long.

I just think it would be fun to evade those :D

DannyRS

2013-02-22 02:00:54

@YoHoJo

I had the same talk with Coh3n, he made the maps from the ingame openable map, which 07 does not have, an online map must lack text, symbols are needed, and be close to correct size and stuff, it might work as is in some places, but would be inaccurate in most,

By hacked client, I mean that from deobbing the client and private server clients, it looks like the minimap has no file, but is rendered from an array based on position, so you could force it to draw a larger minimap, or maybe if you are really insane at client editing, get it to draw a full map and save as a bitmap or something, by drastically changing it,

I've seached everywhere for a private server that would make this easier or even a map on their sites to use, but no luck so far, online maps are also far to pixelated and ruined by years of being jpeg'd over and over :/

If jagex released a high res map on their site, it might be viable to use that, if we remove text and resize it so it exactly matches the minimap, SPS requires a map really close to what the actual minimap looks like :p, atleast to be 100% reliable and useful.

From: Flight
Let's try to keep the majority of the scripts in the upper boards, atleast the Members boards.


This is obviously what we should do, but theres so few members that would actually use them ^^, thats no fun, I also think having working public scripts for some stuff in the public would bring us more members than people never coming in the first place, Most members got members by being able to script fairly well, meaning they have no need for a script from another member :/, Idk

From: kingarabian
I am as well. Heck, it should be much easier now. WHOSE GOING TO MAKE THAT FIRST PEST CONTROLLER BOYS?


I'll race you :p,


From: Justin
Really?

Jagex give us what we have been wanting to ages and people are going to bot it?
*yawn*
What a waste of time.


It's going to be flooded by Java bots anyway, are you seriously willing to not use Simba just out of pride? If something makes no money, just stats, how much negative effect does it really have?

I agree with you, but everyone else will bot, so me stopping only put's me at a disadvantage :/

Shatterhand

2013-02-22 02:56:55

From: Flight
Let's try to keep the majority of the scripts in the upper boards, atleast the Members boards.

I support. I do think that my P06 ess miner script will work on 07 rs. Should I remove it ASAP?

EDIT: I hope our Member's Scripts section will rise again! :)

n3ss3s

2013-02-22 04:03:20

Monk's chicken killer, Wizzup's ess miner, etc will all probably work beautifully

DannyRS

2013-02-22 11:05:13

From: Shatterhand
I support. I do think that my P06 ess miner script will work on 07 rs. Should I remove it ASAP?

EDIT: I hope our Member's Scripts section will rise again! :)


been checking srl rev 4, font's the same and etc, think P06 will work :/

J J

2013-02-22 11:36:48

Jar is extremely easy to get.
Main class = "Client"


Jar is obfuscated (expected ofcourse).

And no my bot does nothing except loading and replacing the Canvas using xboot so it's nothing impressive.


I'll look into editing SMART soon.

DannyRS

2013-02-22 11:40:26

From: J J
Jar is extremely easy to get.
Main class = "Client"

Jar is obfuscated (expected ofcourse).

And no my bot does nothing except loading and replacing the Canvas using xboot so it's nothing impressive.


I'll look into editing SMART soon.


Awesome GJ :)

MinimapMap doesn't align to north very well! oh dear sps

Olly

2013-02-22 12:07:10

http://i.imgur.com/sC3muUh.png

wasn't that bad :p

Shatterhand

2013-02-22 12:39:26

From: Ollybest
http://i.imgur.com/sC3muUh.png

wasn't that bad :p

How did u do that? :O

Olly

2013-02-22 12:44:20

From: Shatterhand
How did u do that? :O


its hacky as, probs the worst coding ive ever done :P (took 10 seconds :p)

function SMART: integer;
var
I, Count: Integer;
IDs: TIntegerArray;
begin
mousespeed := 20;

Ids := SmartGetClientIDs;
Count := Length(IDs);
If (Count > 0) then
For I:= 0 To (Count - 1) Do
begin
If SmartPairClient(IDs[I]) then
begin
Result := IDs[I];
SetEIOSTarget('libsmartremote', ToStr(Result));
Writeln('Paired with SMART[' + ToStr(Result) + ']');
Exit;
end;
end;
SmartSpawnClient(ReplaceWrap(PluginPath, '\', '/', [rfReplaceAll]), 'http://oldschool57.runescape.com/', 'j1', 764, 501, '', '', '');
end;

DannyRS

2013-02-22 13:05:31

Modding P06 private server include for 07, just in case :p
Everything working except login(doing now) and tabinvtab(gametab),and auto-updater obviously, compass and all



Const
P07_AutoUpdateInclude = False;
P07_VersionNumber = '1.0';

Var
P07_PName,P07_PPass,P07_PlayerName,P07_PlayerPass: String;
P07_ClientHeight,P07_ClientWidth: Integer;
P07_Outline_Black,P07_outline_white,P07_outline_yellow: Integer;
P07_MSX1,P07_MSX2,P07_MSY1,P07_MSY2: Integer;
P07_MIX1,P07_MIX2,P07_MIY1,P07_MIY2: Integer;
P07_MMX1,P07_MMX2,P07_MMY1,P07_MMY2: Integer;
P07_CompassX1,P07_CompassX2,P07_CompassY1,P07_CompassY2: Integer;
P07_MSCX,P07_MSCY,P07_MICX,P07_MICY,P07_MMCX,P07_MMCY: Integer;
P07_CompassDTM,P07_FlagDTM: Integer;
P07_MouseSpeed: Integer;

//Credits to Harry and Shuttleu
//Edited by DannyRS and Shatterhand
procedure P07_AutoUpdateMe;
var
NewFile : Integer;
OnlineVersion, NewScript, NewFileName : String;
begin
begin
Writeln('Checking P07Include VersionNumber');
OnlineVersion := GetPage('https://projectrs06-srl-include.googlecode.com/svn/trunk/P06IncludeVersionNumber.txt');
Writeln('Local : ' + P07_VersionNumber + ' / Latest : ' + OnlineVersion);
if (Trim(OnlineVersion) > P07_VersionNumber) then
begin
Writeln('New P06Include Version Available! Updating...');
NewScript := GetPage('https://projectrs06-srl-include.googlecode.com/svn/trunk/P06Include.simba');
NewFileName := AppPath + 'Includes\P06Include\P06Include.simba';
NewFile := RewriteFile(NewFileName, true);
try
WriteFileString(NewFile, NewScript);
except
begin
Writeln('Fatal error writing to ' + NewFileName + '!');
TerminateScript;
end;
end;
CloseFile(NewFile);
Writeln('New P06Include Version Downloaded Please Restart Your Script!');
TerminateScript;
end else
writeln('You Have The Latest Version of P06Include');
end;
end;

Procedure P07_MouseBox(X1, Y1, X2, Y2: Integer; ClickType: Integer);
Begin
MMouse(RandomRange(X1,X2),RandomRange(Y1,Y2),0,0);
ClickMouse2(ClickType);
Wait(RandomRange(37,50));
End;

Procedure P07_TypeFast(Text: String);
Var
I: Integer;
Begin
For I:=1 To Length(Text) Do
SendKeys(Text[I],RandomRange(60,120),RandomRange(60,120));
Wait(RandomRange(110,250));
End;

Procedure P07_UseKey(KeyToUse: Word);
Begin
KeyDown(KeyToUse);
Wait(RandomRange(59,91));
KeyUp(KeyToUse);
Wait(RandomRange(40,150));
End;

Function P07_LoggedIn: Boolean;
Begin
//White text on Report Abuse Button
Result := (GetColor(427, 489) = 16777215);
End;

(*
GetUpText
~~~~~~~~~

.. code-block:: pascal

function GetUpText : string;

Returns the text in the upperleft corner of Project06 (often referred to as UpText).

.. note::

by DannyRS

Example:

.. code-block:: pascal

*)
Function P07_GetUpText: String;
Var
WhiteT,BlueT,YellowT,OrangeT,FoundText: String;
Begin
WhiteT:=GetTextAtExWrap(8, 8, 80, 21, 0, 5, 1, 14541281, 55, 'P07UpChars');
BlueT:=GetTextAtExWrap(35, 8, 150, 21, 0, 5, 1, 13423640, 65, 'P07UpChars');
YellowT:=GetTextAtExWrap(35, 8, 150, 21, 0, 5, 1, 1235160, 40, 'P07UpChars');
OrangeT:=GetTextAtExWrap(35, 8, 150, 21, 0, 5, 1, 4687583, 53, 'P07UpChars');
FoundText:=WhiteT + ' ' + BlueT + YellowT + OrangeT;
FoundText:= ReplaceWrap(FoundText, '.', '',[rfReplaceAll]);
FoundText:= ReplaceWrap(FoundText, '/', '',[rfReplaceAll]);
FoundText:= ReplaceWrap(FoundText, '\', '',[rfReplaceAll]);
FoundText:= ReplaceWrap(FoundText, ',', '',[rfReplaceAll]);
FoundText:= ReplaceWrap(FoundText, '*', '',[rfReplaceAll]);
FoundText:= ReplaceWrap(FoundText, '^', '',[rfReplaceAll]);
FoundText:= ReplaceWrap(FoundText, '"', '',[rfReplaceAll]);
Result:=FoundText;
End;

(*
IsUpTextMultiCustom
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

function IsUpTextMultiCustom(Text: TStringArray): Boolean;

Checks for the occurance of any of the strings in the array.

.. note::

by Starblaster100 & Nielsie95 & Freddy1990

Example:

.. code-block:: pascal

IsUpTextMultiCustom(['Att', 'ttac', 'ack', 'monst', 'ster'])

*)
Function P07_IsUpTextMultiCustom(Text: TStringArray): Boolean;
Var
TheText: String;
i, n: Integer;
Begin
TheText := P07_GetUpText;
n := High(Text);
For i := 0 to n do
If (Pos(Text[i], TheText) > 0) then
Begin
Result := True;
Exit;
End;
End;

Function P07_ContainsText(CheckText: String; Text: TStringArray): Boolean;
Var
TheText: String;
i, n: Integer;
Begin
TheText := CheckText;
n := High(Text);
For i := 0 to n do
If (Pos(Text[i], TheText) > 0) then
Begin
Result := True;
Exit;
End;
End;

Procedure P07_LoginPlayer;
Var
X,Y,Attempts: Integer;
Begin
Repeat Begin
If (GetTextAtExWrap(270, 213, 407, 225, 0, 5, 1, P07_outline_yellow, 20, 'P07UpChars') = 'Enter your username') Then
Begin
WriteLn('Enter your username & password');
If Not (FindColor(x, y, P07_outline_white, 363, 250, 540, 264)) Then
Begin
If (P07_PlayerName = '') Then
Begin
WriteLn('Player Name Not Entered, Or Use P07_DeclarePlayer Before SetupP06Include');
TerminateScript;
End;
P07_MouseBox(365, 253, 480, 258, mouse_left);
P07_TypeFast(P07_PName);
End;
If Not (FindColor(x, y, P07_outline_white, 363, 266, 540, 275)) Then
Begin
If (P07_PlayerPass = '') Then
Begin
WriteLn('Player Password Not Entered, Or Use P07_DeclarePlayer Before SetupP06Include');
TerminateScript;
End;
P07_MouseBox(365, 268, 480, 275, mouse_left);
P07_TypeFast(P07_PPass);
End;
Wait(RandomRange(100, 200));
P07_MouseBox(230, 303, 372, 338, mouse_left);
Wait(RandomRange(300, 500));
End;
If (GetTextAtExWrap(300, 240, 373, 255, 0, 5, 1, P07_outline_yellow, 20, 'P07UpChars') = 'Welcome to') Then
Begin
WriteLn('Welcome to Project RS06');
P07_MouseBox(392, 273, 531, 309, mouse_left);
Wait(RandomRange(100, 200));
End;
If (GetTextAtExWrap(281, 213, 395, 225, 0, 5, 1, P07_outline_yellow, 20, 'P07UpChars') = 'Invalid username') Then
Begin
WriteLn('Invalid username or password');
If (FindColor(x, y, P07_outline_white, 363, 250, 540, 264)) Then
Begin
P07_MouseBox(550, 253, 553, 258, mouse_left);
Repeat P07_UseKey(8);
Until Not (FindColor(x, y, P07_outline_white, 363, 250, 540, 264))
End;
If (FindColor(x, y, P07_outline_white, 363, 266, 540, 275)) Then
Begin
P07_MouseBox(550, 268, 553, 275, mouse_left);
Repeat P07_UseKey(8);
Until Not (FindColor(x, y, P07_outline_white, 363, 266, 540, 275))
End;
Attempts:=Attempts+1;
P07_MouseBox(392, 302, 531, 338, mouse_left);
Wait(RandomRange(100, 200));
Continue;
End;
If (GetTextAtExWrap(307, 213, 398, 227, 0, 5, 1, P07_outline_yellow, 20, 'P07UpChars') = 'Connecting to') Then
Begin
WriteLn('Connecting to server...');
Wait(RandomRange(300, 500));
End;
If (GetTextAtExWrap(293, 213, 403, 230, 0, 5, 1, P07_outline_yellow, 20, 'P07UpChars') = 'Error connecting') Then
Begin
WriteLn('Error connecting to server');
Attempts:=Attempts+1;
P07_MouseBox(392, 302, 531, 338, mouse_left);
Wait(RandomRange(3300, 5500));
Continue;
End;
If (GetTextAtExWrap(270, 205, 356, 217, 0, 5, 1, P07_outline_yellow, 20, 'P07UpChars') = 'Your account') Then
Begin
WriteLn('Your account is already logged in.');
Attempts:=Attempts+1;
P07_MouseBox(392, 302, 531, 338, mouse_left);
Wait(RandomRange(7300, 15500));
Continue;
End;
If (GetColor(130, 90) = 0) And (GetColor(450, 300) = 0) Then
Begin
Repeat Begin
WriteLn('MainScreen Still Black...Waiting');
Wait(RandomRange(200, 500));
End; Until Not (GetColor(130, 90) = 0) Or Not (GetColor(450, 300) = 0)
Continue;
End;
End; Until (P07_LoggedIn) Or (Attempts > 5)
If (P07_LoggedIn) Then
Attempts:=0;
If (Attempts > 5) Then
Begin
WriteLn('Too Many Failed Login Attempts');
TerminateScript;
End;
Wait(RandomRange(1300, 2100));
End;

(*
P07_ItemExists
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Function P07_ItemExists(SlotToCheck: Integer): Boolean;

Checks if there is an Item in Inventory slot and returns true or false.

.. note::

by DannyRS

Example:

.. code-block:: pascal

If P07_ItemExists(0) Then DoSomething();

*)
Function P07_ItemExists(SlotToCheck: Integer): Boolean;
Var
xsx,ysy,x,y,R,C:Integer;
Begin
xsx:=565;
ysy:=215;
C:=(Round(SlotToCheck/4));
R:=(SlotToCheck -(C*4));
If FindColor(x, y, P07_outline_black, xsx+(R*42), ysy+(C*36), xsx+(R*42)+30, ysy+(C*36)+24) Then
Begin
Result:=True;
End;
End;

(*
P07_InvFull
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Function P07_InvFull: Boolean;

Checks if the player's inventory is full and returns true or false.

.. note::

by DannyRS

Example:

.. code-block:: pascal

If P07_InvFull Then DoSomething();

*)
Function P07_InvFull: Boolean;
Var
xsx,ysy,x,y,R,C:Integer;
FoundAnItem: Boolean;
Begin
FoundAnItem:=True;
xsx:=565;
ysy:=215;
For R:=0 To 3 Do
Begin
For C:=0 To 6 Do
Begin
If Not FindColor(x, y, P07_outline_black, xsx+(R*42), ysy+(C*36), xsx+(R*42)+30, ysy+(C*36)+24) Then
Begin
FoundAnItem:=False;
End;
End;
End;
Result:=FoundAnItem;
End;

(*
P07_InvEmpty
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Function P07_InvEmpty: Boolean;

Checks if the player's inventory is empty and returns true or false.

.. note::

by DannyRS

Example:

.. code-block:: pascal

If P07_InvEmpty Then DoSomething();

*)
Function P07_InvEmpty: Boolean;
Var
xsx,ysy,x,y,R,C:Integer;
FoundAnItem: Boolean;
Begin
FoundAnItem:=True;
xsx:=565;
ysy:=215;
For R:=0 To 3 Do
Begin
For C:=0 To 6 Do
Begin
If FindColor(x, y, P07_outline_black, xsx+(R*42), ysy+(C*36), xsx+(R*42)+30, ysy+(C*36)+24) Then
Begin
FoundAnItem:=False;
End;
End;
End;
Result:=FoundAnItem;
End;

(*
P07_InvCount
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

function P07_InvCount : Integer;

Chooses an option on the right click game Choose Option pannel.

.. note::

by Shatterhand

Example:

.. code-block:: pascal

Integer:=P07_InvCount;

*)
function P07_InvCount : Integer;
var
i : Integer;
begin
Result := 0;
for i:=0 to 27 do
if P07_ItemExists(i) then
Inc(Result);
end;

(*
P07_ChooseOptionMulti
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Function P07_ChooseOptionMulti(Text: TStringArray): Boolean;

Chooses an option on the right click game Choose Option pannel.

.. note::

by DannyRS

Example:

.. code-block:: pascal

P07_ChooseOptionMulti(['quickly']); - Bank

*)
Function P07_ChooseOptionMulti(Text: TStringArray): Boolean;
Var
WhiteBoxT,BlueBoxT,YellowBoxT,OrangeBoxT,FoundText: String;
OptionTB:TBox;
OptionBoxTPA1: TPointArray;
NumberOfOptions,C,X,Y: Integer;
Begin
FindColors(OptionBoxTPA1, 4674653, P07_MSX1, P07_MSY1, P07_ClientWidth-1, P07_ClientHeight-1);
OptionTB:=getTPABounds(OptionBoxTPA1);
If (Length(OptionBoxTPA1) < 10) Then
Begin
Result:=False;
Exit;
End;
NumberOfOptions:=((OptionTB.Y2-2) - (OptionTB.Y1+21)) / 14;
For C:=0 To (NumberOfOptions-1) Do
Begin
If (OptionTB.Y1+21+(C*15)) > OptionTB.Y1+21+((C+1)*14) Then
Begin
Result:=False;
Exit;
End;
WhiteBoxT:=GetTextAtExWrap(OptionTB.X1+2, OptionTB.Y1+21+(C*15), OptionTB.X2-2, OptionTB.Y1+21+((C+1)*14), 0, 5, 1, 16777215, 5, 'P07UpChars');
BlueBoxT:=GetTextAtExWrap(OptionTB.X1+2, OptionTB.Y1+21+(C*15), OptionTB.X2-2, OptionTB.Y1+21+((C+1)*14), 0, 5, 1, 16776960, 5, 'P07UpChars');
YellowBoxT:=GetTextAtExWrap(OptionTB.X1+2, OptionTB.Y1+21+(C*15), OptionTB.X2-2, OptionTB.Y1+21+((C+1)*14), 0, 5, 1, 65535, 5, 'P07UpChars');
OrangeBoxT:=GetTextAtExWrap(OptionTB.X1+2, OptionTB.Y1+21+(C*15), OptionTB.X2-2, OptionTB.Y1+21+((C+1)*14), 0, 5, 1, 4231423, 5, 'P07UpChars');
FoundText:=WhiteBoxT+' '+BlueBoxT+YellowBoxT+OrangeBoxT;
If (P07_ContainsText(FoundText,Text)) Then
Begin
MMouse(RandomRange(OptionTB.X1+2,OptionTB.X2-2),RandomRange(OptionTB.Y1+21+(C*14),OptionTB.Y1+21+((C+1)*14)),0,0);
ClickMouse2(mouse_left);
Result:=True;
Exit;
End;
End;
GetMousePos(X,Y);
If Y > 21 Then
MMouse(RandomRange(OptionTB.X1+2,OptionTB.X2-2),RandomRange(Y-10,Y-20),0,0)
Else
MMouse(RandomRange(5,535),RandomRange(350,490),0,0);
Result:=False;
End;

(*
P07_InventoryTab
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Function P07_InventoryTab(TabNumber:Integer;): Boolean;

Switches/Checks Current InventoryTab 0-12.

.. note::

by DannyRS

Example:

.. code-block:: pascal

P07_TabInventoryTab(3); - Inventory

*)
Procedure P07_TabInventoryTab(TabNumber:Integer);
Var
X,Y:Integer;
Begin
Case TabNumber Of
0:Begin
If (Not FindColorTolerance(X,Y,2237027,557,176,560,180,32)) Then
P07_MouseBox(550,182,566,190, mouse_left);
End;
1:Begin
If (Not FindColorTolerance(X,Y,2237027,590,171,595,184,32)) Then
P07_MouseBox(576,173,592,197, mouse_left);
End;
2:Begin
If (Not FindColorTolerance(X,Y,2237027,615,171,622,174,32)) Then
P07_MouseBox(604,174,621,200, mouse_left);
End;
3:Begin
If (Not FindColorTolerance(X,Y,2237027,629,173,633,181,32)) Then
P07_MouseBox(630,173,661,195, mouse_left);
End;
4:Begin
If (Not FindColorTolerance(X,Y,2237027,677,170,690,177,32)) Then
P07_MouseBox(674,173,690,198, mouse_left);
End;
5:Begin
If (Not FindColorTolerance(X,Y,2237027,702,172,705,180,32)) Then
P07_MouseBox(702,174,718,200, mouse_left);
End;
6:Begin
If (Not FindColorTolerance(X,Y,2237027,730,173,732,180,32)) Then
P07_MouseBox(731,174,739,197, mouse_left);
End;
7:Begin
If (Not FindColorTolerance(X,Y,2237027,586,495,594,498,32)) Then
P07_MouseBox(575,469,593,497, mouse_left);
End;
8:Begin
If (Not FindColorTolerance(X,Y,2237027,613,495,622,498,32)) Then
P07_MouseBox(606,469,622,497, mouse_left);
End;
9:Begin
If (Not FindColorTolerance(X,Y,2237027,629,495,632,498,32)) Then
P07_MouseBox(632,472,662,495, mouse_left);
End;
10:Begin
If (Not FindColorTolerance(X,Y,2237027,673,474,680,480,32)) Then
P07_MouseBox(674,470,694,495, mouse_left);
End;
11:Begin
If (Not FindColorTolerance(X,Y,2237027,701,481,705,487,32)) Then
P07_MouseBox(701,469,718,495, mouse_left);
End;
12:Begin
If (Not FindColorTolerance(X,Y,2237027,728,478,733,494,32)) Then
P07_MouseBox(729,470,738,493, mouse_left);
End;
End;
End;

(*
P07_DropInventorySlot
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Procedure P07_DropInventorySlot;

Checks if there is an Item in Inventory slot and returns true or false.

.. note::

by DannyRS

Example:

.. code-block:: pascal

If P07_InFull Then P07_DropInventorySlot(0);

*)
Procedure P07_DropInventorySlot(SlotToDrop: Integer);
Var
xsx,ysy,R,C:Integer;
Begin
xsx:=565;
ysy:=215;
C:=(Round(SlotToDrop/4));
R:=(SlotToDrop -(C*4));
If P07_ItemExists(SlotToDrop) Then
Begin
P07_MouseBox(xsx+(R*42), ysy+(C*36), xsx+(R*42)+30, ysy+(C*36)+24, mouse_right);
P07_ChooseOptionMulti(['Drop']);
End;
End;

(*
P07_DropAll
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Procedure P07_DropAll;

Checks if there is an Item in Inventory slot and returns true or false.

.. note::

by DannyRS

Example:

.. code-block:: pascal

If P07_InFull Then P07_DropAll;

*)
Procedure P07_DropAll;
Var
I:Integer;
Begin
P07_TabInventoryTab(3);
For I:=0 To 27 Do
P07_DropInventorySlot(I);
End;

(*
P07_DropAllSkip
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Procedure P07_DropAllSkip(SkipSlots:Array of Integer);

Drops everything in inventory. Ignores slots specified by SkipSlots array.

.. note::

by Nava2, modified by DannyRS

Example:

.. code-block:: pascal

If P07_InFull Then P07_DropAllSkip([0]);

*)
Procedure P07_DropAllExcept(SkipSlots: TIntegerArray);
Var
Inv,I,L:Integer;
Begin
P07_TabInventoryTab(3);
L:=High(SkipSlots);
For I := 0 To L Do
{ Set the bit associated with the DontDrop Array }
Inv := Inv Or (1 Shl SkipSlots[I]);
For I := 0 To 27 Do
{ Check the bit at i, and if its high, then we dont drop. }
If (((Inv Shr I) And 1) = 0) Then
P07_DropInventorySlot(I);
End;

(*
P07_BankScreen
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Function P07_BankScreen: Boolean;

Checks if the Bank Panel is up and returns true or false.

.. note::

by DannyRS

Example:

.. code-block:: pascal

If P07_BankScreen Then DoSomething();

*)
Function P07_BankScreen: Boolean;
Begin
Result:=(GetTextAtExWrap(184, 35, 243, 47, 0, 5, 1, 2070783, 10, 'P07UpChars')='The Bank');
End;

(*
P07_DepositInventorySlot
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Procedure P07_DepositInventorySlot(SlotToDrop: Integer; DepositAll:Boolean);

Deposits item from inventory slot.

.. note::

by DannyRS

Example:

.. code-block:: pascal

If P07_BankScreen Then P07_Deposit(0, 27, True);

*)
Procedure P07_DepositInventorySlot(SlotToDrop: Integer; DepositAll:Boolean);
Var
xsx,ysy,R,C:Integer;
Begin
xsx:=565;
ysy:=215;
C:=(Round(SlotToDrop/4));
R:=(SlotToDrop -(C*4));
If P07_ItemExists(SlotToDrop) Then
Begin
If (DepositAll) Then
Begin
P07_MouseBox(xsx+(R*42), ysy+(C*36), xsx+(R*42)+30, ysy+(C*36)+24,mouse_right);
P07_ChooseOptionMulti(['Store All','All']);
Wait(RandomRange(300,500));
End Else
P07_MouseBox(xsx+(R*42), ysy+(C*36), xsx+(R*42)+30, ysy+(C*36)+24,mouse_left);
End;
End;

(*
P07_Deposit
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Procedure P07_Deposit(SlotFrom, SlotTo: Integer; DepositAll:Boolean);

Deposits items from inventory from slots int-int if bank is open.

.. note::

by DannyRS

Example:

.. code-block:: pascal

If P07_BankScreen Then P07_Deposit(0, 27, False);
If P07_BankScreen And P07_InvFull Then P07_Deposit(0, 27, True);

*)
Procedure P07_Deposit(SlotFrom, SlotTo: Integer; DepositAll: Boolean);
Var
I:Integer;
Begin
If (Not P07_BankScreen) Then
Exit;
For I:=SlotFrom To SlotTo Do
Begin
P07_DepositInventorySlot(I,DepositAll);
End;
End;

(*
P07_MakeCameraAngleHigh
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Procedure P07_MakeCameraAngleHigh;

Make's The Game's Camera Angle Highest.

.. note::

by DannyRS

Example:

.. code-block:: pascal

P07_MakeCameraAngleHigh;

*)
Procedure P07_MakeCameraAngleHigh;
Begin
If (Not P07_LoggedIn) Then
Exit;
KeyDown(38);
Wait(RandomRange(1800,2000));
KeyUp(38);
End;

(*
P07_MakeCameraAngleLow
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Procedure P07_MakeCameraAngleLow;

Make's The Game's Camera Angle Lowest.

.. note::

by DannyRS

Example:

.. code-block:: pascal

P07_MakeCameraAngleLow;

*)
Procedure P07_MakeCameraAngleLow;
Begin
If (Not P07_LoggedIn) Then
Exit;
KeyDown(40);
Wait(RandomRange(1800,2000));
KeyUp(40);
End;

(*
P07_GetCompassAngle
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Function P07_GetCompassAngle: Integer;

Gets Compass Angle 0-360

.. note::

by DannyRS

Example:

.. code-block:: pascal

P07_GetCompassAngle

*)
Function P07_GetCompassAngle: Integer;
Var
X,Y: Integer;
AtAngle,AngleResult: Extended;
Begin
If FindDTMRotated(P07_CompassDTM,X,Y,P07_CompassX1,P07_CompassY1,P07_CompassX2,P07_CompassY2, 0, (2*Pi), Pi/180, AtAngle) Then
Begin
AngleResult:=Degrees(AtAngle);
End
Else
AngleResult:=0;
Result:=Round(AngleResult);
End;

(*
P07_MakeCompassDegree
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Procedure P07_MakeCompassDegree(MakeAngle: Integer);

Makes Compass Angle 5-355

.. note::

by DannyRS

Example:

.. code-block:: pascal

P07_MakeCompassDegree(5); Or P07_MakeCompassDegree(355); //North
P07_MakeCompassDegree(180); //South

*)
Procedure P07_MakeCompassDegree(MakeAngle: Integer);
Var
WaitsDone,CurAngle,CurAngleR,CurAngleL,LeftDist,RightDist,StepsL,StepsR: Integer;
KeyToHold: Word;
Begin
//LOL At How Bad This Math Is, Meh Works - Danny
WaitsDone:=0;
KeyToHold:=37;
If (Not P07_LoggedIn) Then
Exit;
CurAngle:=P07_GetCompassAngle;
CurAngleR:=CurAngle+5;
If (CurAngleR>360) Then
CurAngleR:=CurAngleR-360;
CurAngleL:=CurAngle-5;
If (CurAngleL<0) Then
CurAngleL:=(360-(CurAngleL*-1));
If (MakeAngle < 5) Then
MakeAngle:=5;
If (MakeAngle > 355) Then
MakeAngle:=355;
If (MakeAngle < CurAngleR) And (MakeAngle > CurAngleL) Then
Exit;
StepsL:=0;
LeftDist:=CurAngle;
Repeat Begin
LeftDist:=LeftDist-1;
If (LeftDist<0) Then
LeftDist:=360;
StepsL:=StepsL+1;
End; Until (LeftDist=MakeAngle)
StepsR:=0;
RightDist:=CurAngle;
Repeat Begin
RightDist:=RightDist+1;
If (RightDist>360) Then
RightDist:=0;
StepsR:=StepsR+1;
End; Until (RightDist=MakeAngle)
If StepsL > StepsR Then
KeyToHold:=39;
KeyDown(KeyToHold);
Repeat Begin
WaitsDone:=WaitsDone+1;
CurAngle:=P07_GetCompassAngle;
CurAngleR:=CurAngle+10;
If (CurAngleR>360) Then
CurAngleR:=CurAngleR-360;
CurAngleL:=CurAngle-10;
If (CurAngleL<0) Then
CurAngleL:=(360-(CurAngleL*-1));
Wait(10);
End; Until ((MakeAngle < CurAngleR) And (MakeAngle > CurAngleL)) Or (WaitsDone>700)
wait(RandomRange(10,90));
KeyUp(KeyToHold);
End;

(*
P07_MakeCompassNorth
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Procedure P07_MakeCompassNorth;

Make's Compass North.

.. note::

by DannyRS

Example:

.. code-block:: pascal

P07_MakeCompassNorth;

*)
Procedure P07_MakeCompassNorth;
Var
CurAngle: Integer;
Begin
If (Not P07_LoggedIn) Then
Exit;
CurAngle:=P07_GetCompassAngle;
If CurAngle > 180 Then
P07_MakeCompassDegree(355)
Else
P07_MakeCompassDegree(5);
End;

(*
P07_MakeCompassEast
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Procedure P07_MakeCompassEast;

Make's Compass East.

.. note::

by DannyRS

Example:

.. code-block:: pascal

P07_MakeCompassEast;

*)
Procedure P07_MakeCompassEast;
Begin
If (Not P07_LoggedIn) Then
Exit;
P07_MakeCompassDegree(270);
End;

(*
P07_MakeCompassWest
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Procedure P07_MakeCompassWest;

Make's Compass West.

.. note::

by DannyRS

Example:

.. code-block:: pascal

P07_MakeCompassWest;

*)
Procedure P07_MakeCompassWest;
Begin
If (Not P07_LoggedIn) Then
Exit;
P07_MakeCompassDegree(90);
End;

(*
P07_MakeCompassSouth
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Procedure P07_MakeCompassSouth;

Make's Compass South.

.. note::

by DannyRS

Example:

.. code-block:: pascal

P07_MakeCompassSouth;

*)
Procedure P07_MakeCompassSouth;
Begin
If (Not P07_LoggedIn) Then
Exit;
P07_MakeCompassDegree(180);
End;

(*
P07_FindMMFlag
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

Function P07_FindMMFlag: Boolean;

Waits till the red flag on the minimap is gone

.. note::

by DannyRS

Example:

.. code-block:: pascal

P07_FindMMFlag

*)
Function P07_FindMMFlag: Boolean;
Var
X,Y,WaitsDone: Integer;
Begin
Result:=False;
Repeat Begin
If (Not FindDTM(P07_FlagDTM,X,Y,P07_MMX1,P07_MMY1,P07_MMX2,P07_MMY2)) Then
Begin
Result:=True;
Exit;
End;
Wait(RandomRange(50,100));
WaitsDone:=WaitsDone+1;
End; Until (Result) Or (WaitsDone > 800)
End;

(*
P07_FindObj
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

function P07_FindObj(color, tol, count : integer; uptext : TStringArray; action : integer): Boolean;

Basic object finder. Doesn't support multicolors, will change it eventually

.. note::

by Awkwardsaw

Example:

.. code-block:: pascal

if not P07_FindObj(1267066, 10, 15, ['pen', 'lose', 'oor'], 3) then

*)
function P07_FindObj(color, tol, count : integer; uptext : TStringArray; action : integer): Boolean;
var
X, Y, A, M, curCTS: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;

begin
Result := False;
if not P07_LoggedIn then exit;
curCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
if not FindColorsSpiralTolerance(P07_MSCX, P07_MSCY, TPA, Color, P07_MSX1, P07_MSY1, P07_MSX2, P07_MSY2, tol) then
begin
ColorToleranceSpeed(curCTS);
writeln('Cannot find object');
exit;
end;
ColorToleranceSpeed(curCTS);
ATPA := TPAtoATPAEx(TPA, 10, 10);
M := High(ATPA);
for A := 0 to M do
begin
if Length(ATPA[A]) < count then
continue;
if MiddleTPAEx(ATPA[A], X, Y) then
begin
MMouse(X, Y, 1, 1);
Wait(250 + Random(150));
if P07_IsUpTextMultiCustom(uptext) then
begin
if action = 3 then
begin
result := true;
ColorToleranceSpeed(curCTS);
exit;
end;
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, action);
Result := True;
ColorToleranceSpeed(curCTS);
Exit;
end;
end;
end;
ColorToleranceSpeed(curCTS);
end;

(*
P07_FindDoor
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

function P07_FindDoor(Open : boolean) : boolean;

Trys to find a door. If open is true, it will click it if the door is closed. Returns true if finds color and uptext

.. note::

by Awkwardsaw

Example:

.. code-block:: pascal

if not P07_FindDoor(true) then

*)
function P07_FindDoor(Open : boolean) : boolean;
begin
result := false;
if not P07_FindObj(1267066, 10, 15, ['pen', 'lose', 'oor'], 3) then
exit;
if P07_IsUpTextMultiCustom(['pen Door']) and Open then
ClickMouse2(mouse_Left);
result := true;
end;

(*
P07_MMToMSPoint
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

procedure P07_MMToMSPoint(var X, Y : Integer);

Converts a Minimap point to a MainScreen Point

.. note::

by Shatterhand

Example:

.. code-block:: pascal

P07_MMToMSPoint(X,Y);

*)
procedure P07_MMToMSPoint(var X, Y : Integer);
var
x1, y1 : Integer;
begin
x1 := X;
y1 := X;

X := Round((X-P07_MMCX)*255/40) + P07_MSCX;
Y := Round((Y-P07_MMCY)*176/28) + P07_MSCY;

if X < MSX1 then X := MSX1;
if Y < MSY1 then Y := MSY1;
if X > MSX2 then X := MSX2;
if Y > MSY2 then Y := MSY2;
end;

Procedure P07_SetGlobals;
Begin
If P07_AutoUpdateInclude Then
P07_AutoUpdateMe;

GetClientDimensions(P07_ClientWidth,P07_ClientHeight);

P07_MSX1:=4;
P07_MSX2:=515;
P07_MSY1:=4;
P07_MSY2:=337;
P07_MIX1:=552;
P07_MIX2:=731;
P07_MIY1:=207;
P07_MIY2:=464;
P07_MMX1:=570;
P07_MMX2:=714;
P07_MMY1:=9;
P07_MMY2:=159;
P07_CompassX1:=544;
P07_CompassX2:=577;
P07_CompassY1:=3;
P07_CompassY2:=36;

P07_MSCX:=(((P07_MSX2-P07_MSX1)/2)+P07_MSX1);
P07_MSCY:=(((P07_MSY2-P07_MSY1)/2)+P07_MSY1);
P07_MICX:=(((P07_MIY2-P07_MIY1)/2)+P07_MIY1);
P07_MICY:=(((P07_MIY2-P07_MIY1)/2)+P07_MIY1);
P07_MMCX:=648;
P07_MMCY:=83;

P07_outline_black:=65536;
P07_outline_white:=16777215;
P07_outline_yellow:=65535;

If P07_MouseSpeed > 0 Then
MouseSpeed:=P07_MouseSpeed
Else
MouseSpeed:=15;

P07_PName:=P07_PlayerName;
P07_PPass:=P07_PlayerPass;

P07_CompassDTM:= DTMFromString('mbQAAAHicY2VgYDBkgmBVILYHYiMgFgaKCwCxKBCLALEiEG91cALj+Tx8cGwEFEfHjFgwGAAAss4HDQ==');
P07_FlagDTM := DTMFromString('mWAAAAHicY2FgYNjCxMCwDog3MkHYXgwQ7A7ELkD8Hw2jA0Y0DAIA2fcH8w==');
End;

Procedure P07_FreeGlobals;
Begin
//FreeBitmap();
//FreeDTM();
FreeDTM(P07_CompassDTM);
FreeDTM(P07_FlagDTM);
End;

Procedure SetupP07Include;
Begin
P07_SetGlobals;
AddOnTerminate('P07_FreeGlobals');
End;

kingarabian

2013-02-22 13:40:04

Would SMART work well? Wasn't SMART pretty young at this stage of RS?

Olly

2013-02-22 13:47:42

I just edited the current smart to load oldschool scape :p its a very hacky fix + the smart canvas is screwed but it works.

kingarabian

2013-02-22 13:55:28

Previous SCAR versions work just fine on the main RS website.

Back to VM's do we go?

DannyRS

2013-02-22 13:56:23

From: Ollybest
I just edited the current smart to load oldschool scape :p its a very hacky fix + the smart canvas is screwed but it works.


can you zip for us ? :p <3

Olly

2013-02-22 14:04:18

From: DannyRS
can you zip for us ? :p <3


function SMART: integer;
var
I, Count: Integer;
IDs: TIntegerArray;
begin
mousespeed := 20;

Ids := SmartGetClientIDs;
Count := Length(IDs);
If (Count > 0) then
For I:= 0 To (Count - 1) Do
begin
If SmartPairClient(IDs[I]) then
begin
Result := IDs[I];
SetEIOSTarget('libsmartremote', ToStr(Result));
Writeln('Paired with SMART[' + ToStr(Result) + ']');
Exit;
end;
end;
SmartSpawnClient(ReplaceWrap(PluginPath, '\', '/', [rfReplaceAll]), 'http://oldschool57.runescape.com/', 'j1', 764, 501, '', '', '');
end;


Just call that in your script lol :p

DannyRS

2013-02-22 14:12:03

From: Ollybest
function SMART: integer;
var
I, Count: Integer;
IDs: TIntegerArray;
begin
mousespeed := 20;

Ids := SmartGetClientIDs;
Count := Length(IDs);
If (Count > 0) then
For I:= 0 To (Count - 1) Do
begin
If SmartPairClient(IDs[I]) then
begin
Result := IDs[I];
SetEIOSTarget('libsmartremote', ToStr(Result));
Writeln('Paired with SMART[' + ToStr(Result) + ']');
Exit;
end;
end;
SmartSpawnClient(ReplaceWrap(PluginPath, '\', '/', [rfReplaceAll]), 'http://oldschool57.runescape.com/', 'j1', 764, 501, '', '', '');
end;


Just call that in your script lol :p


oh! thought you had to edit smart

n3ss3s

2013-02-22 17:21:10

Has anyone gone through the effort of making all the necessary edits to have SRL 4 work with Simba yet?

kingarabian

2013-02-22 17:43:32

N3ss3s, your better off with SCAR right now…

DannyRS

2013-02-22 18:08:44

heres loginplayer if you want: designed for my include tho, text positions if nothing else :)

Procedure P07_LoginPlayer;
Var
X,Y,Attempts: Integer;
Begin
Repeat Begin
If (GetTextAtExWrap(250, 215, 387, 231, 0, 5, 1, P07_outline_yellow, 20, 'P07UpChars') = 'Enter your username') Then
Begin
WriteLn('Enter your username & password');
If Not (FindColor(x, y, P07_outline_white, 312, 255, 512, 266)) Then
Begin
If (P07_PlayerName = '') Then
Begin
WriteLn('Player Name Not Entered, Or Set P07_PlayerName and P07_PlayerPass Before SetupP07Include');
TerminateScript;
End;
P07_MouseBox(519, 255, 545, 264, mouse_left);
P07_TypeFast(P07_PName);
End;
If Not (FindColor(x, y, P07_outline_white, 345, 271, 525, 278)) Then
Begin
If (P07_PlayerPass = '') Then
Begin
WriteLn('Player Password Not Entered, Or Use P07_DeclarePlayer Before SetupP07Include');
TerminateScript;
End;
P07_MouseBox(519, 270, 545, 279, mouse_left);
P07_TypeFast(P07_PPass);
End;
Wait(RandomRange(100, 200));
P07_MouseBox(235, 304, 369, 337, mouse_left);
Wait(RandomRange(300, 500));
End;
If (GetTextAtExWrap(300, 240, 381, 255, 0, 5, 1, P07_outline_yellow, 20, 'P07UpChars') = 'Welcome to') Then
Begin
WriteLn('Welcome to Project RS06');
P07_MouseBox(395, 275, 530, 307, mouse_left);
Wait(RandomRange(100, 200));
End;
If (GetTextAtExWrap(260, 215, 373, 227, 0, 5, 1, P07_outline_yellow, 20, 'P07UpChars') = 'Invalid username') Then
Begin
WriteLn('Invalid username or password');
If (FindColor(x, y, P07_outline_white, 312, 255, 512, 266)) Then
Begin
P07_MouseBox(519, 255, 545, 264, mouse_left);
Repeat P07_UseKey(8);
Until Not (FindColor(x, y, P07_outline_white, 312, 255, 512, 266))
End;
If (FindColor(x, y, P07_outline_white, 345, 271, 525, 278)) Then
Begin
P07_MouseBox(519, 270, 545, 279, mouse_left);
Repeat P07_UseKey(8);
Until Not (FindColor(x, y, P07_outline_white, 345, 271, 525, 278))
End;
Attempts:=Attempts+1;
P07_MouseBox(395, 305, 530, 336, mouse_left);
Wait(RandomRange(100, 200));
Continue;
End;
If (GetTextAtExWrap(306, 215, 446, 230, 0, 5, 1, P07_outline_yellow, 20, 'P07UpChars') = 'Connecting to') Then
Begin
WriteLn('Connecting to server...');
Wait(RandomRange(300, 500));
End;
If (GetTextAtExWrap(293, 215, 403, 231, 0, 5, 1, P07_outline_yellow, 20, 'P07UpChars') = 'Error connecting') Then
Begin
WriteLn('Error connecting to server');
Attempts:=Attempts+1;
P07_MouseBox(395, 305, 530, 336, mouse_left);
Wait(RandomRange(3300, 5500));
Continue;
End;
If (GetTextAtExWrap(250, 205, 356, 217, 0, 5, 1, P07_outline_yellow, 20, 'P07UpChars') = 'Your account') Then
Begin
WriteLn('Your account is already logged in.');
Attempts:=Attempts+1;
P07_MouseBox(395, 305, 530, 336, mouse_left);
Wait(RandomRange(7300, 15500));
Continue;
End;
If (GetTextAtExWrap(452, 330, 484, 343, 0, 5, 1, P07_outline_white, 20, 'P07UpChars') = 'PLAY') Then
Begin
WriteLn('Click To Play');
Attempts:=Attempts+1;
P07_MouseBox(275, 269, 495, 377, mouse_left);
Wait(RandomRange(3300, 5500));
Continue;
End;
End; Until (P07_LoggedIn) Or (Attempts > 5)
If (P07_LoggedIn) Then
Attempts:=0;
If (Attempts > 5) Then
Begin
WriteLn('Too Many Failed Login Attempts');
TerminateScript;
End;
Wait(RandomRange(1300, 2100));
End;

YoHoJo

2013-02-22 18:09:27

Good question.
First we need to find the latest working SRL foe these servers.
Then we need to decide weather to port it to simba or just use it with scar.
Making a git for this would be nice….
Thoughts?

DannyRS

2013-02-22 18:13:51

From: YoHoJo
Good question.
First we need to find the latest working SRL foe these servers.
Then we need to decide weather to port it to simba or just use it with scar.
Making a git for this would be nice….
Thoughts?


I think stick with Simba :/ or convert to Simba

Gucci

2013-02-22 18:16:46

From: DannyRS
I think stick with Simba :/ or convert to Simba


Agreed. Hopefully someone can find a useful revision of SRL

Olly

2013-02-22 18:33:45

gametabs for whoever cares, took like 1 min so don't expect anything to fancy :p

const
COMBAT_TAB = 0;
STATS_TAB = 1;
QUEST_TAB = 2;
INV_TAB = 3;
EQIUP_TAB = 4;
PRAYER_TA = 5;
MAGIC_TAB = 6;
CLANCHAT_TAB = 7;
FRIENDS_TAB = 8;
IGNORE_TAB = 9;
LOGOUT_TAB = 10;
SETTINGS_TAB = 11;
EMOTE_TAB = 12;
MUSIC_TAB = 13;

function _getGameTabBoxes: TBoxArray;
begin
result := Grid(7, 2, 23, 25, 33, 298, point(542, 185));
end;

function _getCurrentTab: integer;
var
x, y, i: integer;
tba: tboxarray;
begin
result := - 1;
tba := _getGameTabBoxes;

for i := 0 to high(tba) do
if FindColorTolerance(x, y, 1778536, tba[i].x1, tba[i].y1, tba[i].x2, tba[i].y2, 15) then
begin
result := i;
exit;
end;
end;

function _selectTab(tab: integer): boolean;
var
t: integer;
tba: tboxarray;
begin
result := true;
t := getSystemTime + 750 + random(150);
tba := _getGameTabBoxes;

if (_getCurrentTab = tab) then
exit;

repeat
mouseTBox(tba[tab], mouse_left);
wait(60 + random(90));
if (_getCurrentTab = tab) then
exit;
until getSystemTime > t;

result := false;
end;

Press Play

2013-02-22 18:55:06

From: n3ss3s
Has anyone gone through the effort of making all the necessary edits to have SRL 4 work with Simba yet?
If we put it up on git, then we can all work on it together?

From: YoHoJo
Good question.
First we need to find the latest working SRL foe these servers.
Then we need to decide weather to port it to simba or just use it with scar.
Making a git for this would be nice….
Thoughts?
I thought we were just going to use the one posted by @Kave; http://villavu.com/forum/showthread.php?t=34856%22 I think it's the closest we can find - then we can just edit it to our needs? +1 support for git though! :)

YoHoJo

2013-02-22 19:09:12

Yeah those were my thoughts.
Take Kave's link if it's the closest we can get the best let's work with it.
Start the tweaking and post progress here for now I guess..
Idk anything about git just know it'd be hardly

YoHoJo

2013-02-22 19:53:24

If we don't convert and just use scar…. I got SCSS working…
http://i.imgur.com/jTafDyE.png
[ATTACH=CONFIG]19292[/ATTACH]

I totally forgot how to make scar scripts work with it and stuff though….

n3ss3s

2013-02-22 20:01:19

From: kingarabian
N3ss3s, your better off with SCAR right now…


Chrome says "WATCH THE FUCK OUT SON IZ SKETCHY" for all the old scar downloads on freddy's site

Olly

2013-02-22 20:06:08

quad post yohojo.. oh lord!

Kave

2013-02-22 20:09:05

From: n3ss3s
Chrome says "WATCH THE FUCK OUT SON IZ SKETCHY" for all the old scar downloads on freddy's site


Cause he put PPI shit in his installers.

E: Note that I didn't see them in the versions I downloaded recently to find fonts, see here.

YoHoJo

2013-02-22 20:41:23

We need Text.Simba to work, I've gotten a lot of other stuff converted/compiling, but this one is a bit much for me :/

SRL4:
http://villavu.com/forum/showthread.php?t=34856%22

TomTuff

2013-02-22 21:15:06

SRL used to be on SVN (as opposed to GIT like now)… does anyone know if the SVN is still kept? WT-Fakawi basically doesn't delete things, so the records may be on here still…

kingarabian

2013-02-23 05:25:11

I have gotten access to SRL4 for early 2008… Lot's of Errors on SCAR-Divi 3.15..

grats

2013-02-23 09:02:36

wow, it's unreal how long ago this was.. I just went on a quest to find some includes for you guys but my oldest is only end of 2009 on some VM that I haven't booted for years :P

I'm pretty sure I have wizzups essence miner somewhere, if I find it I'll post

Slixor

2013-02-23 11:17:26

I am looking forward to this.

DannyRS

2013-02-23 11:36:10

Placeholder Basics: http://villavu.com/forum/showthread.php?t=96863 :) <3

n3ss3s

2013-02-23 14:47:23

From: kingarabian
I have gotten access to SRL4 for early 2008… Lot's of Errors on SCAR-Divi 3.15..


Make sure you move plugins btw

J J

2013-02-23 18:58:47

I will be working on a SRL Member basic essence miner tomorrow using the include mentioned above:)

Ashaman88

2013-02-23 19:12:17

Well I wrote a basic woodcutter + fm…but the randoms are such a pain. I'll probably hold off anymore scripting until we get the randoms situated + all my stuff will be srl membs only

DannyRS

2013-02-23 19:14:43

From: Ashaman88
Well I wrote a basic woodcutter + fm…but the randoms are such a pain. I'll probably hold off anymore scripting until we get the randoms situated + all my stuff will be srl membs only


I forgot I left one of my scripts running overnight, accidentally made it to rank 1 on highscores LOL

randoms are indeed annoying, need a git or something to start adding to an anti-random !

Benny

2013-02-23 19:20:08

Looks beaut guys!
@DannyRS Wow! Why don't you keep running it and maintain rank?

DannyRS

2013-02-23 19:24:06

From: Benny
Looks beaut guys!
@DannyRS Wow! Why don't you keep running it and maintain rank?


Because I'm trying to blend in and not get banned obviously :p

I didn't realise people legitting were so slow, was my mistake lol

Yanhua

2013-02-23 19:34:38

I am prepared to start scripting again!

Not sure if any of you remember me, but I released a very popular, Auto Tabs Pro script back in the day :) 2 years ago?

I'm back to SRL to help with 2007 scripts!

Benny

2013-02-23 19:39:28

From: DannyRS
Because I'm trying to blend in and not get banned obviously :p

I didn't realise people legitting were so slow, was my mistake lol

Ah well, obviously don't get banned but maintain the lead!

J J

2013-02-23 19:43:33

I will be working on randoms.. but nearly all are NPC's so you cant lend accs to solve them.

DannyRS

2013-02-23 19:47:11

From: J J
I will be working on randoms.. but nearly all are NPC's so you cant lend accs to solve them.


Every time I get one I'm taking detailed screenshots of everything and saving them ;)

I seem to be getting barely any tho, lucky me lol

Ashaman88

2013-02-23 22:24:47

Well from other threads most of them should already be solved with older srl versions - might as well use those

Gu3st...

2013-02-25 15:40:51

So what's up with all this "Don't release it to public forum" stuff? I hope that's only temporarily or for testing only, I don't like the idea of withdrawing important updates or additions from everybody (like what happened in the past with SMART and KYAB.. never liked that)

Anyone fill me in with the logic behind this?

YoHoJo

2013-02-25 16:04:01

No/Very few bots are out right now so people believe that (for now at least) only those with the knowledge and responsibility should be able to bot and have scripts.
Also as in any new RPG the prices and demand for gold are sky high.

Anyone is free to release whatever they want to whoever they want, but most are keeping their stuff private and member+ to stop from abuse/inflation/competition in game.

Le Jingle

2013-02-25 17:47:17

So,

I've been working on gathering some data for detecting Random Event NPC's. Currently have 5 Objects fitting the persons that pop-up and talk to you. Thinking I'll break from adding object data and find the old (last) random event framework before it was removed (when random events were removed from regular RS) and model some includes fitting the oldschool RS style.

Definitely looking to work with anyone who wants to work with me; tacking down the random events / applying old knowledge/code to the currently old school 07 RS servers.

PM/IRC/talk to me,
Lj

Hobbit

2013-02-27 15:32:30

I think we should open this to the public as well. Once we do get the official 07 include going it will be public.

punkd

2013-02-27 20:18:51

been using SRL4 rev 3, quite alot of updating to do ;P