rj
12-23-2013, 12:06 AM
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:
- Download SRLRSPS from https://github.com/officerBarbrady/srlRSPS
- Open up the .zip and copy the file named 'RSPS' into c:simba/includes
http://i.imgur.com/ig9lOXR.png
- Set the script interpreter to lape
Example script
{$I RSPS/srlRSPS.Simba}
var
myServer:_rsps_server;
begin
myServer := myServer.init(720, 'CloudIn');
writeln(myServer.getupText);
end.
function list
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):st ring;
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):boo lean; overload;
function ss_getNpcText:array of chatOption;
function _rsps_server.clickNpcText(text:string):boolean;
function _rsps_server.clickNpcText(text:tstringarray):boole an; 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:Bo olean;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,ri ghtClick:boolean):boolean;
function _rsps_server.findObject(Color, tol:integer;hue,sat:Extended;dist, minLength:integer;uptext:tstringarray;Useuptext,ri ghtClick: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:s tring):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);
functions to be added
-Suggestions?
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:
- Download SRLRSPS from https://github.com/officerBarbrady/srlRSPS
- Open up the .zip and copy the file named 'RSPS' into c:simba/includes
http://i.imgur.com/ig9lOXR.png
- Set the script interpreter to lape
Example script
{$I RSPS/srlRSPS.Simba}
var
myServer:_rsps_server;
begin
myServer := myServer.init(720, 'CloudIn');
writeln(myServer.getupText);
end.
function list
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):st ring;
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):boo lean; overload;
function ss_getNpcText:array of chatOption;
function _rsps_server.clickNpcText(text:string):boolean;
function _rsps_server.clickNpcText(text:tstringarray):boole an; 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:Bo olean;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,ri ghtClick:boolean):boolean;
function _rsps_server.findObject(Color, tol:integer;hue,sat:Extended;dist, minLength:integer;uptext:tstringarray;Useuptext,ri ghtClick: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:s tring):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);
functions to be added
-Suggestions?