SRL Archive - Unofficial Development

Massive RSPS include project


rj

2013-12-22 19:06:02

Massive RSPS include project



I am working on a big include that will be useful for multiple RSPS servers. I have to make it able to do most of the basic SRL functions for 317, 417, 508, 614, and 728 servers. This include uses some SRL5 functions, and some SRL6. It is further being optimised to utilize lape as much as possible to my knowledge.



Install instructions:

[spoiler=instructions]- Download SRLRSPS from https://github.com/officerBarbrady/srlRSPS
- Open up the .zip and copy the file named 'RSPS' into c:simba/includes
- Set the script interpreter to lape [/spoiler]



Example script

{$I RSPS/srlRSPS.Simba}

var
myServer:_rsps_server;

begin
myServer := myServer.init(720, 'CloudIn');
writeln(myServer.getupText);
end.

function list


[spoiler=functionlist]
function string.startsWith(s:string):boolean;
function string.endsWith(s:string):boolean;
function string.size:integer;
function string.toArray:tstringarray;
function string.rand:string;
function string.toBoolean():boolean;
function string.toIntegerArray():TIntegerArray;
function string.toExtendedArray():TExtendedArray;
function string.toStringArray():TStringArray;
function string.contains(s:string):boolean;
function string.position(str:string):integer;
function string.removeEnd:string;
function GetSystemTime: LongWord; override;
procedure TerminateScript; override;
procedure ColorToleranceSpeed(cts : integer);
function getColorToleranceSpeed:Integer;
procedure SetColorspeed2Modifiers(huemodifier, saturationmodifier: Extended);
function _724_BankScreen: Boolean;
function _317_bankScreen:boolean;
procedure _317_closeBank();
function ss_getchat(line:integer):string;
function ss_getchat:tstringarray;overload;
function _317_getchat(line:integer;colors:tintegerArray):string;
function _rsps_server.getChatText(line:integer):string;
function _rsps_server.getChatText:tstringarray; overload;
function _rsps_server.chatTextExists(text:string):boolean;
function _rsps_server.chatTextExists(text:TStringArray):boolean; overload;
function ss_getNpcText:array of chatOption;
function _rsps_server.clickNpcText(text:string):boolean;
function _rsps_server.clickNpcText(text:tstringarray):boolean; overload;
function getCurrentTab:integer;
function gameTab(tab:integer):boolean;
procedure openTab(tab:integer);
function getFriendName(index:integer):string;
function getFriendNames:TStringArray;
function getWeaponName:string;
function getTotalLevel:string;
function _317_getInterfaceTPA:TPointArray;
function _317_getInterfaceBounds:TBox;
function _317_interfaceOpen:boolean;
function _317_getInterfaceName:string;
function _317_getInterfaceDescription:string;
procedure _317_closeInterface;
function rsps_inventory.boxCenter(bx: TBox): TPoint;
function rsps_inventory.explodeBox(bx: TBox; rows, columns: integer): TBoxArray;
procedure rsps_inventory.setUp(b:tbox);
function rsps_inventory.slotFull(slot:Integer):Boolean;
function rsps_inventory.count:Integer;
function rsps_inventory.full:Boolean;
procedure rsps_inventory.interactItem(slot:Integer; Button:Integer);
function rsps_inventory.searchBitmap(BMPSearch, tol:Integer;click, cont:Boolean):Boolean;
function rsps_inventory.countBitmap(bmpSearch, tol:Integer):Integer;
function rsps_inventory.countDTM(DTMSearch:Integer):Integer;
function rsps_inventory.searchDTM(DTMSearch:Integer;click, cont:Boolean;button:Integer):Boolean;
function rsps_inventory.searchDTM(DTMSearch:Integer;cont:Boolean;button:Integer):Boolean; overload;
function rsps_inventory.searchDTM(DTMSearch:Integer;button:Integer):Boolean; overload;
function rsps_inventory.itemAmount(slot:integer):integer;
function rsps_inventory.totalItemAmount:Int64;
function rsps_inventory.DTMPosition(model:integer):integer;
function rsps_inventory.DTMPosition(model:integer):integer;
function rsps_inventory.getItemName(slot:integer):string;
Procedure rsps_setangleHigh();
function _rsps_server.findObject(Colors, tols:TintegerArray;hue,sat:TExtendedArray;dist, minLength:integer;uptext:tstringarray;Useuptext,rightClick:boolean):boolean;
function _rsps_server.findObject(Color, tol:integer;hue,sat:Extended;dist, minLength:integer;uptext:tstringarray;Useuptext,rightClick:boolean):boolean; overload;
function _rsps_server.findObject(Color, tol:integer;hue,sat:Extended;uptext:tstringarray):boolean; overload;
function ArrInStr(arrS: TStringArray; str: string): Boolean;
function BoxClosestPoint(p : TPoint; b : TBox) : TPoint;
function RandomPointBoxEx(p : TPoint; b : TBox; extraDist : integer) : TPoint;
function getPixelShift(b: TBoxArray; time: integer): TIntegerArray;
function getPixelShift(b: TBox; time: integer): integer; overload;
function getPixelShift(atpa: T2DPointArray; time: integer): TIntegerArray; overload;
function getPixelShift(tpa: TPointArray; t: integer): integer; overload;
function getPixelShiftAverage(b: TBoxArray; waitPerLoop, maxTime: integer): TIntegerArray;
function getPixelShiftAverage(b: TBox; waitPerLoop, maxTime: integer): integer; overload;
function getPixelShiftAverage(atpa: T2DPointArray; waitPerLoop, maxTime: integer): TIntegerArray; overload;
function getPixelShiftAverage(b: TPointArray; waitPerLoop, maxTime: integer): integer; overload;
function minimap.getText(b:tbox;colors:tintegerArray;font:string):integer;
function minimap.getHealth:integer;
function minimap.getPrayer:integer;
function minimap.getRun:integer;
function minimap.getCompassRadians: Extended;
function minimap.GetCompassAngleDegrees: Extended;
function minimap.runOn:boolean;
function minimap.runOff:boolean;
procedure minimap.setRun(turnOn:boolean);
procedure minimap.setRun(turnOn:boolean;energy:integer) overload;
function minimap.getDots(color, tol:integer;hmod, smod:extended):TPointarray; overload;
function minimap.countDots(color, tol:integer;hmod, smod:extended):integer
function GetMiniMapDotsIn(WhatDot: String; x1, y1, x2, y2: Integer): TPointArray;
procedure ss_MMToMS(var X, Y:Integer);
function ss_MMtoMsPoint(p:TPoint):TPoint;
procedure MMouse(x, y, rx, ry: integer);
procedure mmouse(x, y:Integer);overload;
function VariantIsBoolean(const v: Variant): Boolean;
procedure ClickMouse2(button: variant);
procedure Mouse(mousex, mousey, ranx, rany: Integer; button: variant);
procedure Mouse(mousex, mousey: Integer; button: variant);overload;
procedure Mouse(mousex, mousey: Integer; button: fnct_actionOptions);overload;
procedure Mouse(mousex, mousey: Integer)overload;
procedure MouseBoxEx(x1, y1, x2, y2: Integer; Dist,ClickType: Integer);
function isText(Text, theText: TStringArray): Boolean;
function ss_xpBarOpen:boolean;
function ss_getXpBarTPA:TPointArray;
function ss_getXpBarTotalString:string;
function ss_getXPBarTotal:integer;
function getAmountBox(b:TBox):integer;
function getSimpleText(Colors:TIntegerArray;x1, y1, x2, y2:integer;font:string):String;
function DebugTPA(Points: TPointArray; BmpName: string): Boolean;
function DebugATPA(aPoints: T2DPointArray; BmpName: string): Boolean;
function ss_getuptext:string;
function _525_getuptext():string;
function _525_GetChooseOptions(): Array of TOptions;
function _317_GetChooseOptions(): Array of TOptions;
Function _724_GetChooseOptions(): Array of TOptions;
function _rsps_server.ChooseOptionMulti(Texts: TStringArray; TextType: String; Action: fnct_ActionOptions): Boolean;
function _rsps_server.chooseOptionMulti(Txt: TStringArray): Boolean; overload;
function _rsps_server.chooseOption(Txt, TextType: string): Boolean;
function _rsps_server.chooseOption(Txt: String): Boolean; overload;
procedure TypeByte(k: Byte);
procedure TypeSend(Text: string; PressEnter: Boolean);
procedure TypeSend(Text: string);overload;
function LoadTextTPA(Text, Chars: string; var height: integer): TPointArray;
function FindTextTPAEx(Color,Tol,xs,ys,xe,ye : integer;var x,y : integer; Txt, Chars : string; Action :fnct_actionOptions ) : Boolean;
function FindTextTPA(Color, Tol, xs, ys, xe, ye: integer; Txt, Chars: string; Action: fnct_actionOptions): Boolean;
function _rsps_server.WaitOptionMulti(S: TStringArray; TextType: string; Action: fnct_ActionOptions; Time: Integer): Boolean;
function _rsps_server.IsUpTextMulti(Text: TStringArray): Boolean;
function _rsps_server.waitOptionMulti(S: TStringArray; Time: Integer): Boolean; overload;
function _rsps_server.waitOption(S: string; Time: Integer): Boolean; overload;
function _rsps_server.waitUpTextMulti(S: TStringArray; Time: Integer): Boolean;
function _rsps_server.IsUpText(UpText: string): Boolean;
function _rsps_server.waitUptext(S: string; Time: Integer): Boolean;
function WaitFunc(Func: function: Boolean; WaitPerLoop, MaxTime: Integer): Boolean;
procedure markTime(var t:Integer);
function timeFromMark(i:Integer):Integer;
function MsToTime(MS, TheType: Integer): string;
function TimeRunning: string;
function isClientReady(): boolean;
function waitClientReady(): boolean;
procedure _ps_smartInfo.setParams(roott, paramss:string;widthh, heightt:integer;pluginss:tstringarray);


[/spoiler]functions to be added
-Suggestions?

spokas

2014-01-04 08:35:00

Send me your skype in pm i wanna get more info about this. :P

Hoodz

2014-01-04 08:41:34

From: Officer Barbrady

-Possibility loading some servers in SMART if I can ever figure out how to/possible


its pretty easy but some servers (deviousPk, i know for sure) have their client obfuscated. so when i launch smart, the client loads but the script doesnt do anything. it has something to do with the canvas which is blocked

bg5

2014-01-04 09:51:28

From: hoodz
its pretty easy but some servers (deviousPk, i know for sure) have their client obfuscated. so when i launch smart, the client loads but the script doesnt do anything. it has something to do with the canvas which is blocked


Have you tried it with Soulsplit or PKhonor? I tried it and failed - Souldsplit is forcing clientstub to resize and it throws exeption, PKHonor ,after it downloads cache just doesn't work. Although I was using old smart version, I'm not sure about SMART remote.

Hoodz

2014-01-04 10:50:50

From: bg5
Have you tried it with Soulsplit or PKhonor? I tried it and failed - Souldsplit is forcing clientstub to resize and it throws exeption, PKHonor ,after it downloads cache just doesn't work. Although I was using old smart version, I'm not sure about SMART remote.

let me check

edit: they both didnt work for me :(
but i used the srl-osr smartparams. maybe the srl-6 works

rj

2014-01-04 11:03:06

I have never been able to load any servers -.- then again I can't load RS3 on SMART with my current computer

Hoodz

2014-01-04 11:17:25

From: Officer Barbrady
I have never been able to load any servers -.- then again I can't load RS3 on SMART with my current computer

can you load devious pk?

rj

2014-01-04 11:33:06

From: hoodz
can you load devious pk?


nope

spokas

2014-01-04 13:25:59

Can you loud cloud in ?

rj

2014-01-09 17:48:14

Hearts 2 Pk: Selling d boots 5m ea!

GetChatboxText coming soon!

Syntax

2014-01-11 09:11:59

Good luck Officer Barbrady, great member right here :)

rj

2014-02-17 00:02:36

Latest work


-Added GetXPBarTotal for Soulsplit
-Added Interface detection for 317 servers (includes getting interface name & description)

jstemper

2015-05-26 21:29:28

is this still viable? like could I use this if i wanted to? (for soulsplit)

KeepBotting

2015-05-26 21:34:01

From: jstemper
is this still viable? like could I use this if i wanted to? (for soulsplit)


I'd assume most/all of the routines in the include are functional to some degree.