SRL Function List

From SRL Wiki

Jump to: navigation, search

Contents

A

AutoColor.Scar

function FindColorRecordEx(var rx, ry: Integer; ColorRecord: TAutoColorInfo; x1, y1, x2, y2: Integer; RGBXYZCheck: Boolean): Integer;
By: Sumilion
Description: Gets a color from the minimap using a TAutoColorInfo record, with extra options.
 
{-----------------------------------------------------------------------------------}
 
function FindColorRecord(var rx, ry: Integer; ColorRecord: TAutoColorInfo): Integer;
By: Sumilion
Description: Gets a color from the minimap using a TAutoColorInfo record
 
{-----------------------------------------------------------------------------------}
 
function FindWaterColor: Integer;
By: Tarajunky fixed by BobboHobbo
Description: Autodetects Water Color on Minimap
 
{-----------------------------------------------------------------------------------}
 
function FindRoadColor: Integer;
By: Tarajunky
Description: Autodetects Normal Road Color on Minimap
 
{-----------------------------------------------------------------------------------}
 
function FindVarrockRoadColor: Integer;
By: Tarajunky
Description: Autodetects Varrock Road Color on Minimap
 
{-----------------------------------------------------------------------------------}
 
function FindFallyRoadColor: Integer;
By: Tarajunky
Description: Autodetects Falador Road Color on Minimap
 
{-----------------------------------------------------------------------------------}
 
function FindLumbyRoadColor: Integer;
By: ZephyrsFury
Description: Autodetects Lumbridge Road Colour on the minimap.
 
{-----------------------------------------------------------------------------------}
 
function FindRockColor: Integer;
By: Tarajunky, fixed by Shuttleu
Description: Autodetecs Rock (Gray) Color on Minimap
 
{-----------------------------------------------------------------------------------}
 
function FindStoneColor: Integer;
By: Tarajunky
Description: Autodetecs Stone (Mine Rock) Color on Minimap
 
{-----------------------------------------------------------------------------------}
 
function FindDirtRoadColor: Integer;
By: ZephyrsFury
Description: Autodetects Dirt Road Color on Minimap (Lummy-Draynor Road Colour).
 
{-----------------------------------------------------------------------------------}
 
function FindBridgeColor: Integer;
By: Tarajunky
Description: Autodetects "Striped" Bridge Color on Minimap
 
{-----------------------------------------------------------------------------------}
 
function FindLadderColor: Integer;
By: Tarajunky
Description: Autodetects Ladder Color on Minimap
 
{-----------------------------------------------------------------------------------}
 
function FindSandColor: Integer;
By: Tarajunky
Description: Autodetects Sand Color on Minimap
 
{-----------------------------------------------------------------------------------}
 
function AutoColorThis(Bitmap, MaxTol, X1, Y1, X2, Y2: Integer): Integer;
By: Sumilion
Description: Returns exact color of a bmp with tol found on the screen.
 
{-----------------------------------------------------------------------------------}


Amount.Scar

function TradeScreen: Integer;
By: ZephyrsFury and EvilChicken!
Description: Returns 1 or 2 for the respective tradescreens, 0 if neither is open.
 
{-----------------------------------------------------------------------------------}
 
function ShopScreen: Boolean;
By: ZephyrsFury
Description: Returns true if a shop interface is opened.
 
{-----------------------------------------------------------------------------------}
 
function FindItemEx(var x, y: Integer; IdentType: string; Ident: Integer; Area: TBox; Tol: TIntegerArray): Boolean;
By: Nava2
Description: Finds an item in Area specified by TBox in Area. Valid IdentTypes are:
             bmp, mask, color, dtm. The Tol variable is:
             Tol[0] : Color Tolerance;
             Tol[1] : Contour Tolerance or minimum Colors to Find to be True.
 
{-----------------------------------------------------------------------------------}
 
function FindItem(var x, y: Integer; IdentType: string; Ident, x1, y1, x2, y2: Integer; Tol: TIntegerArray): Boolean;
By: Nava2
Description: Finds an item in Area specified by x1, y1, x2, y2 in the Area.
             Valid IdentTypes are any of the SRL_Item types. The Tol variable is:
             Tol[0] : Color Tolerance;
             Tol[1] : Contour Tolerance or minimum Colors to Find to be True.
 
{-----------------------------------------------------------------------------------}
 
function GetAmount(ItemX, ItemY: Integer): Integer;
By: ZephyrsFury
Description: Returns the amount of an item at coordinates (ItemX, ItemY).
  Returns approximate values for 'K' and 'M'.
 
{-----------------------------------------------------------------------------------}
 
function CheckArea(area: String): Boolean;
By: masquerader streamlined by EvilChicken!
Description: Checks if the given interface is opened.
 
{-----------------------------------------------------------------------------------}
 
function ItemCoordinates(Area, ItemType: string; Item, Tol: TIntegerArray): TPointArray;
By: masquerader modified by ZephyrsFury
Description: Returns a TPA with the positions of all occurances of Item.
Parameters:
  Area - 'inv', 'shop', 'bank', 'trade', 'your trade'.
  ItemType - DTM, Color, BitmapMask, Bitmap
  Item - name/value of your dtm/bmp/color/bmpmask.
  Tol - 'dtm' - [] (dtm's can't have tolerance).
        'bmp' - [BMPTol].
        'color' - [COLOUR Tol, Minimum Colour Count].
        'bmpmask' - [BMPTol, ContourTol].
 
{-----------------------------------------------------------------------------------}
 
function CountItemsIn(Area, ItemType: string; Item: Integer; Tol: TIntegerArray): Integer;
By: masquerader modified by ZephyrsFury
Description: Counts the number of items found within the Area. (Does not count stacks)
Parameters:
  Area - 'inv', 'shop', 'bank', 'trade', 'your trade'.
  ItemType - SRL_DTM, SRL_Bitmap, SRL_BitmapMask, SRL_Color
  Item - name/value of your dtm/bmp/color/bmpmask.
  Tol - 'dtm' - [] (dtm's can't have tolerance).
        'bmp' - [BMPTol].
        'color' - [COLOUR Tol, Min Colour Count].
        'bmpmask' - [BMPTol, ContourTol].
 
{-----------------------------------------------------------------------------------}
 
function CountItemsArea(area: String): Integer;
By: masquerader
Description: Counts items in a specified area. (Doesnt count stacks)
 
{-----------------------------------------------------------------------------------}
 
function ItemAmount(Area, ItemType: string; Item: Integer; Tol: TIntegerArray): Integer;
By: masquerader modified by ZephyrsFury
Description: Counts the number of items found with a color in a certain area. (Counts stacks)
Parameters:
  Area - 'inv', 'shop', 'bank', 'trade', 'your trade'.
  ItemType - 'dtm', 'bmp', 'color', 'bmpmask'.
  Item - name/value of your dtm/bmp/color/bmpmask.
  Tol - 'dtm' - [] (dtm's can't have tolerance).
        'bmp' - [BMPTol].
        'color' - [COLOUR Tol, Min Colour Count].
        'bmpmask' - [BMPTol, ContourTol].
 
{-----------------------------------------------------------------------------------}
 
function FindCoins(var X, Y: Integer; Area: string): Boolean;
By: ZephyrsFury
Description: Finds coins in Area and stores the coords in x and y.
 
{-----------------------------------------------------------------------------------}
 
function CoinAmount(Area: String): Integer;
By: ZephyrsFury
Description: Returns the amount of coins in a specified interface.
 
{-----------------------------------------------------------------------------------}
 
function LoadCoinBmp: Integer;
By: masquerader
Description: Returns a bitmap to use for coins.
 
{-----------------------------------------------------------------------------------}
 
function RuneAmount(area, runetype: String): Integer;
By: masquerader and modified by Ron and ZephyrsFury
Description: Returns the amount of a certain rune in the specified area.
 
{-----------------------------------------------------------------------------------}

Antiban.scar

procedure RandomRClick;
By: phantombmx/EvilChicken!, idea by NaumanAkhlaQ
Description: Performs random right click to stay active.
 
{-----------------------------------------------------------------------------------}
 
procedure HoverSkill(Skill: String; Click: Boolean);
By: Dankness/Cheesehunk/Ron/Raymond/ZephyrsFury
Description: Hovers mouse over selected skill to "check exp"
Click = True will Click Skill and Click = False will 'Hover'.
Won`t "check" skills where your level is 1.
 
{-----------------------------------------------------------------------------------}
 
procedure PickUpMouse;
By: dark_sniper
Description: Acts just like you picked your mouse off the pad...
then sets it back down.
 
{-----------------------------------------------------------------------------------}
 
procedure SayCurrentLevels(which: String);
By: RealRune
Description: Very useful for autoresponders.
 
{-----------------------------------------------------------------------------------}
 
procedure RandomMovement;
By: Krazy_Meerkat
Description: Presses random arrow keys and moves the mouse. Able to press 2 keys simultaneously.
 
{-----------------------------------------------------------------------------------}
 
procedure BoredHuman;
By: WT-Fakawi, small edit by Hy71194
Description: Performs 5-15 times:
    * Rotates the cam,
    * Moves the mouse around MainScreen,
    * If it finds IsUpText('option'), it will Chooseoption('Examine');
 
{-----------------------------------------------------------------------------------}
 
procedure ExamineInv;
By: R1ch
Description: Chooses a random item in the inventory to examine.
 
{-----------------------------------------------------------------------------------}
 
procedure RandomAngle(HowToEnd : Variant);
By: R1ch
Description: Randomly changes the angle of the compass. Finishes depending on
             HowToEnd:
                      1, 'up', True = Highest angle
                      2, 'down', False = Lowest angle
             Put '' to leave it as it is.
 
{-----------------------------------------------------------------------------------}
 
function LevelUp : Boolean;
By: R1ch
Description: Checks if you've leveled up - click Continue and returns True.
 
{-----------------------------------------------------------------------------------}

ArrayLoader.scar

function strToTPtArrayEx(tPtStr, Separater : String) : TPointArray;
By: moparisthebest and modified by Ron
Description: Loads a String into a TPointArray. (Example String: '50,10 80,53 350,765 8560,1897 2348,346')
 
{-----------------------------------------------------------------------------------}
 
function strToTPtArray(tPtStr : String) : TPointArray;
By: moparisthebest and modified by Ron
Description: Refer to strToTPtArrayEx.
 
{-----------------------------------------------------------------------------------}
 
function tPtArrayToStrEx(newTPoint: TPointArray; Separater : String) : String;
By: moparisthebest and modified by Ron
Description: Loads a TPointArray into a String. (Example String: '50,10 80,53 350,765 8560,1897 2348,346')
 
{-----------------------------------------------------------------------------------}
 
function tPtArrayToStr(newTPoint : TPointArray) : String;
By: moparisthebest and modified by Ron
Description: Refer to tPtArrayToStrEx.
 
function strToIntArrayEx(intArray, Separater : String) : Array of Integer;
By: moparisthebest and modified by Ron
Description: Loads a String into an array of integer. (Example String: '567 389 3234 98342 7998767')
 
{-----------------------------------------------------------------------------------}
 
function strToIntArray(intArray : String) : Array of Integer;
By: moparisthebest and modified by Ron
Description: Refer to strToIntArrayEx.
 
{-----------------------------------------------------------------------------------}
 
function intArrayToStrEx(intArray : Array of Integer; Separater : String) : String;
By: moparisthebest and modified by Ron
Description: Loads an array of integer into a String. (Example String: '567 389 3234 98342 7998767')
 
{-----------------------------------------------------------------------------------}
 
function intArrayToStr(intArray : Array of Integer) : String;
By: moparisthebest and modified by Ron
Description: Refer to intArrayToStrEx.
 
{-----------------------------------------------------------------------------------}
 
function strToFloatArrayEx(floatArray, Separater : String) : Array of Extended;
By: moparisthebest and modified by Ron
Description: Loads a String into an array of float. (Example String: '567.356 389.6756 3234.9865 98342.2314 7998767.324')
 
{-----------------------------------------------------------------------------------}
 
function strToFloatArray(floatArray : String) : Array of Extended;
By: moparisthebest and modified by Ron
Description: Refer to strToFloatArrayEx.
 
{-----------------------------------------------------------------------------------}
 
function floatArrayToStrEx(floatArray : Array of Extended; Separater : String) : String;
By: moparisthebest and modified by Ron
Description: Loads an array of float into a String. (Example String: '567.356 389.6756 3234.9865 98342.2314 7998767.324')
 
{-----------------------------------------------------------------------------------}
 
function floatArrayToStr(floatArray : Array of Extended) : String;
By: moparisthebest and modified by Ron
Description: Refer to floatArrayToStrEx.
 
{-----------------------------------------------------------------------------------}
 
function strToStrArrayEx(strArray, Separater : String) : Array of String;
By: moparisthebest and modified by Ron
Description: Loads a String into an array of String. (Example String: 'Hello how are you today my friend? :D')
 
{-----------------------------------------------------------------------------------}
 
function strToStrArray(strArray : String) : Array of String;
By: moparisthebest and modified by Ron
Description: Refer to strToStrArrayEx.
 
{-----------------------------------------------------------------------------------}
 
function strArrayToStrEx(strArray : Array of String; Separater : String) : String;
By: moparisthebest and modified by Ron
Description: Loads an array of String into a String. (Example String: 'Hello how are you today my friend? :D')
 
{-----------------------------------------------------------------------------------}
 
function strArrayToStr(strArray : Array of String) : String;
By: moparisthebest and modified by Ron
Description: Refer to strArrayToStrEx.
 
{-----------------------------------------------------------------------------------}
 
function strToBoolArrayEx(boolArray, Separater : String) : Array of Boolean;
By: moparisthebest and modified by Ron
Description: Loads a String into an array of boolean. (Example String: 'true false false false true true false true false')
 
{-----------------------------------------------------------------------------------}
 
function strToBoolArray(boolArray : String) : Array of Boolean;
By: moparisthebest and modified by Ron
Description: Refer to strToBoolArrayEx.
 
{-----------------------------------------------------------------------------------}
 
function boolArrayToStrEx(boolArray : Array of Boolean; Separater : String): String;
By: moparisthebest and modified by Ron
Description: Loads an array of boolean into a String. (Example String: 'true false false false true true false true false')
 
{-----------------------------------------------------------------------------------}
 
function boolArrayToStr(boolArray : Array of Boolean) : String;
By: moparisthebest and modified by Ron
Description: Refer to boolArrayToStrEx.
 
{-----------------------------------------------------------------------------------}
Personal tools