Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

marpis

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

10 Good

About marpis

  • Rank
    Junior Member
  1. Here's a couple more, didn't fit in the original post: {******************************************************************************* Function GetMMLevels(LevelType : String;var ColorSign : String): integer; By: Raymond / Wizzup / Sabzi / NCDS Last Edit: 29 June 2010 Description: Returns the level shown next to the minimap. Colorsign returns the color of the text (Green,Yellow,Orange,Red). Returns -1 if failed. *******************************************************************************} function GetMMLevels(LevelType: string; var ColorSign: string): Integer; var Colors : TIntegerArray; Signs: TStringArray; P: TPointArray; TP: TPoint; I{,cl}: Integer; B: TBox; W,H{, T}: integer; SearchBox : TBox; begin; Result := -1; ColorSign := ''; case LowerCase(Leveltype) of 'health', 'hp', 'hitpoints', 'constitution': TP := Point(715,27); 'prayer', 'pray' : TP := Point(730,66); 'summon', 'summoning' : TP := Point(715,140); 'run','energy' : TP := Point(730,105); else begin; srl_Warn('GetMMLevels', 'Invalid LevelType: ''' + LevelType + '', warn_AllVersions); Exit; end; end; Colors := [65280, 65535, 2070783, 255]; Signs := ['Green', 'Yellow', 'Orange', 'Red']; GetClientDimensions(w,h); //We donnot want to search out of the clients area! SearchBox := IntToBox(TP.X, TP.Y, Min(w-1,TP.X + 30), min(h-1,TP.Y + 15)); for I := 0 to 3 do begin With SearchBox do FindColorsTolerance(P, Colors[i], x1, y1, x2, y2, 30); if Length(P) < 1 then Continue; B := GetTPABounds(P);//GetTextAtEx works better for Simba for Run Result := StrToIntDef(GetNumbers(GetTextAtEx(B.X1 - 1 , B.Y1 - 1, 30, statChars, False, False, 0, 0, Colors[i], 20, False, tr_Digits)), -1); if (Result > 0) then begin ColorSign := Signs[i]; Exit; end; end; end; {=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= function GetMMLevelEx(Skill: Integer; var ColorState: string): Integer; Contributors: Wanted Description: Returns the number from the skill level on the minimap. Date Created: November 3rd, 2011. By Wanted. RS2 Build 674. Last Modification: November 3rd, 2011. By Wanted. RS2 Build 674. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} function GetMMLevelEx(Skill: Integer; var ColorState: string): Integer; var ColorsDec: TIntegerArray; ColorsStr: TStringArray; TPA: TPointArray; I: Integer; B: TBox; begin Result := -1; case Skill of Skill_HP: B := Box(721, 28, 749, 43); Skill_Prayer: B := Box(739, 67, 760, 83); Skill_Run: B := Box(735, 106, 759, 121); Skill_Summoning: B := Box(695, 128, 764, 162); else Exit; end; ColorsDec := [65280, 65535, 2070783, 255]; ColorsStr := ['green', 'yellow', 'orange', 'red']; for I := 0 to 3 do if (FindColors(TPA, ColorsDec[i], B.X1, B.Y1, B.X2, B.Y2)) then Break; if (I > 3) then Exit; B := GetTPABounds(TPA); Result := StrToIntDef(GetNumbers(GetTextAtEx(B.X1 - 1, B.Y1 - 1, 0, StatChars, False, False, 0, 2, ColorsDec[i], 10, False, tr_Digits)), -1); ColorState := ColorsStr[i]; end; {******************************************************************************* function ConvertXpToLvl(Xp: Integer): Integer; By: Brak, Flyboy Description: Returns skill level based on xp level *******************************************************************************} function ConvertXpToLvl(xp: Integer): Integer; var level, exp: Integer; begin for level := 1 to 99 do begin exp := exp + Trunc(level + 300 * Pow(2.0, level / 7.0)); if ((exp / 4) > xp) then begin Result := level; Exit; end; end; Result := 99; end; {=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= function ConvertXPToLevel(xp: Integer): Integer; Contributors: Anonymous Description: Returns skill level based on experience points. Date Created: August 7th, 2011. By Anonymous. RS2 Build 660. Last Modification: August 7th, 2011. By Anonymous. RS2 Build 660. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} function ConvertXPToLevel(xp: Integer): Integer; var level, exp: Integer; begin for level := 1 to 99 do begin exp := exp + Trunc(level + 300 * Pow(2, level / 7)); if ((exp / 4) > xp) then begin Result := level; Exit; end; end; Result := 99; end;
  2. Hi! I see you have hard time finding out who are the people you've taken the functions and procedures originally, so I decided to help you name the many Anonymous people in the include. {******************************************************************************* procedure SetAngle(Highest : Boolean); By: Raymond, edit by NaumanAkhlaQ Description: Sets the mainscreen at highest\lowest angle (Depends on the boolean) *******************************************************************************} procedure SetAngle(Highest : Boolean); begin if (not LoggedIn) then exit; KeyDown((Integer(not Highest) * 2) + 38); Sleep(1000 + Random(300)); KeyUp((Integer(not Highest) * 2) + 38); Wait(500 + Random(100)); end; {=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= procedure SetAngle(Highest: Boolean); Contributors: Naum, Anonymous, Wanted. Description: Tilts the camera angle. Date Created: August 6th, 2011. By Naum. RS2 Build 660. Last Modification: November 4th, 2011. By Wanted. RS2 Build 675. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} procedure SetAngle(Highest: Boolean); begin KeyDown((Integer(not (Highest)) * 2) + 38); WaitRR(1000, 1500); KeyUp((Integer(not Highest) * 2) + 38); WaitRR(400, 600); end; {=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= function MMToMS(MM: TPoint): TPoint; Contributors: Anonymous, Wanted. Description: Returns true if point is on the minimap. Date Created: August 7th, 2011. By Anonymous. RS2 Build 660. Last Modification: November 18th, 2011. By Wanted. RS2 Build 679. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} function MMToMS(MM: TPoint): TPoint; var X, Y: Integer; Dis: TPoint; begin X := (MM.X - 647); Y := (MM.Y - 84); Dis := Point((MMCX - MM.X) * -1, (MMCY - MM.Y) * -1); Result := Point(Round((259.5 + X) + Dis.X * 10), Round((170.0 + Y)+ Dis.Y * 6.5)); if (not (PointInBox(Result, Box(MSX1, MSY1, MSX2, MSY2)))) then Result := Point(0, 0); end; {******************************************************************************* function MMToMS(MM: TPoint): TPoint; By: N1ke! Description: Turns a Minimap point into a close MS point. *******************************************************************************} function MMToMS(MM: TPoint): TPoint; var X, Y: Integer; Dis: TPoint; begin X := ((MM.X - 647)); Y := ((MM.Y - 84)); Dis := Point( (MMCX - MM.X)*-1, (MMCY - MM.Y)*-1); Result := Point(Round((259.5 + X)+ Dis.X*10), Round((170.0 + Y)+ Dis.Y*6.5)); If not IntInBox(Result.X, Result.Y, IntToBox(MSX1, MSY1, MSX2, MSY2)) then Result := Point(-1, -1); end; {=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= function GetCurrentTab: Integer; Contributors: Dynamite, Wanted. Description: Returns current tab. Date Created: August 31st, 2011. By Dynamite & Wanted. RS2 Build 662. Last Modification: August 31st, 2011. By Wanted. RS2 Build 662. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} function GetCurrentTab: Integer; begin for Result := 0 to 15 do if (GetColor(535 + ((Result mod 8) * 30), 169 + ((Result div 8) * 298)) = 3775974) then Exit; end; {******************************************************************************* function GetCurrentTab: Integer; By: ZephyrsFury Description: Returns current tab. *******************************************************************************} function GetCurrentTab: Integer; var tP: TPoint; begin Result := -1; if (not LoggedIn) then exit; for Result := 1 to 16 do begin tP.X := 535 + (Result - 1) mod 8 * 30; tP.Y := 169 + (Result - 1) div 8 * 298; if (GetColor(tP.X, tP.Y) = 3775974) then Break; end; result := result + 20; //SO IT ACTUALLY WORKS WITH THE TABS KTHX end; {******************************************************************************* function ToggleXPBar(Open: Boolean): Boolean; By: Narcle & IceFire908 Description: Opens or closes the XP Bar, true if had to toggle. *******************************************************************************} function ToggleXPBar(Open: Boolean): Boolean; var TPA: TPointArray; P: TPoint; begin Result := IsXPBarOpen <> Open; if (not (Result)) then Exit; TPA := TPAFromBox(IntToBox(521, 51, 546, 75)); FilterPointsPie(TPA, 0, 360, 0, 12, 534, 63); P := TPA[Random(Length(TPA))]; Mouse(P.X, P.Y, 0, 0, True); end; {=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= function ToggleXPBar(Open: Boolean): Boolean; Contributors: Wanted, Anonymous. Description: Opens or closes the XP Bar, true if had to toggle. Date Created: August 7th, 2011. By Wanted. RS2 Build 660. Last Modification: October 28th, 2011. By Wanted. RS2 Build 671. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} function ToggleXPBar(Open: Boolean): Boolean; begin Result := IsXPBarOpen <> Open; if (not (Result)) then Exit; MouseCircle(12, 534, 63, ClickLeft); end; {******************************************************************************* function GetXPBarTotal: LongInt; By: Narcle & IceFire908 Description: Returns the number from your XP Bar. *******************************************************************************} function GetXPBarTotal: LongInt; var Previous: Boolean; TPA: TPointArray; B: TBox; {$IFNDEF Simba} P: TPoint; {$ENDIF} begin Previous := IsXPBarOpen; if (ToggleXPBar(True)) then WaitFunc(@IsXPBarOpen, 10, 1500); FindColorsTolerance(TPA, clWhite, 342, 55, 510, 69, 1); B := GetTPABounds(TPA); B := IntToBox(B.X1 - 2, B.Y1 - 2, B.X2 + 2, B.Y2 + 2); {$IFDEF Simba} Result := StrToIntDef(ExtractFromStr(GetTextAtExWrap(B.X1, B.Y1, B.X2, B.Y2, 0, 5, 4, clWhite, 0, 'XPChars'), Numbers), 0); {$ELSE} IsTextInAreaEx(B.X1, B.Y1, B.X2, B.Y2, P.X, P.Y, 'XP', 0, XPChars, False, False, 0, 1, clWhite); Result := StrToIntDef(GetNumbers(GetTextAtEx(P.X, P.Y, 1, XPChars, False, False, 0, 2, clWhite, 60, False, tr_AllChars)), 0); {$ENDIF} if (not (Previous)) then Wait(RandomRange(500, 1500)); ToggleXPBar(Previous); end; {=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= function GetXPBarTotal: LongInt; Contributors: Wanted, Anonymous. Description: Returns the number from your XP Bar. Date Created: August 7th, 2011. By Wanted. RS2 Build 660. Last Modification: October 28th, 2011. By Wanted. RS2 Build 671. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} function GetXPBarTotal: LongInt; var Previous: Boolean; TPA: TPointArray; B: TBox; P: TPoint; begin Previous := IsXPBarOpen; if (ToggleXPBar(True)) then WaitFunc(@IsXPBarOpen, True, 10, 15, 1500, 1750); FindColorsTolerance(TPA, clWhite, 342, 55, 510, 69, 1); B := GetTPABounds(TPA); B := IntToBox(B.X1 - 2, B.Y1 - 2, B.X2 + 2, B.Y2 + 2); IsTextInAreaEx(B.X1, B.Y1, B.X2, B.Y2, P.X, P.Y, 'XP', 0, XPChars, False, False, 0, 1, clWhite); Result := StrToIntDef(GetNumbers(GetTextAtEx(P.X, P.Y, 1, XPChars, False, False, 0, 2, clWhite, 60, False, tr_AllChars)), 0); if (not (Previous)) then Wait(RandomRange(500, 1500)); ToggleXPBar(Previous); end; {******************************************************************************* function ResetXPTotal: Boolean; By: Narcle & IceFire908 Description: Resets the XP Bar. *******************************************************************************} function ResetXPTotal: Boolean; var TPA: TPointArray; P: TPoint; begin TPA := TPAFromBox(IntToBox(521, 51, 546, 75)); FilterPointsPie(TPA, 0, 360, 0, 12, 534, 63); P := TPA[Random(Length(TPA))]; Mouse(P.X, P.Y, 0, 0, False); Result := WaitOptionMulti(['Res', 'ese', 'set'], 1000); end; {=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= function ResetXPBar: Boolean; Contributors: Wanted, Anonymous. Description: Resets the XP Bar. Date Created: August 7th, 2011. By Wanted. RS2 Build 660. Last Modification: October 28th, 2011. By Wanted. RS2 Build 671. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} function ResetXPBar: Boolean; begin MouseCircle(12, 534, 63, ClickRight); Result := ChooseOptionMulti(['Res', 'ese', 'set']); end; And for the Globals.scar you can just credit SRL You're welcome! I hope you next time at least try to look around SRL.
×
×
  • Create New...