Jump to content
Wanted

OSI Updates 10/28/2014 - Lots of stuff and oldies restored

Recommended Posts

https://github.com/OSI1/OfficialSCARInclude/commit/4c148aa8658f9cf072d02a34746c265393f57f24

 

New Stats Tab functions and restores

New Chat functions and restores

New Map running functions and restores

New Equipment functions and restores

New Equip,Bank,Chat, and area Globals.scar indexes and restores

PressLogin to use enterkey and other login updates and restores

GetItemAmount update and restore

MouseCurrentSpot -> MouseCurrentPos

TBAFromGrid adjusted. Removed unneeded 'rows' and replaced with (number of) Boxes

TSAContainsMulti Restored

FindColorsExP/FindColorsTolP restored

ConstrainBox update restored

DistanceP restored

Object.scar restored

Extended/Object restored

CopyTEA Remove restored

November/Octo"v"er -> October Correction

 

 

As you can see there are a lot of new functions and restores.

 

Apparently when I transferred the OSI repo back in November 2013 I either accidentally removed a lot of stuff or butchered it out on purpose. I had to dig through the old SVN log (since the github one has a gap in history for some reason) and find these. I went through and re added most of everything and updated it plus added some new stuff.

 

I haven't gotten around to restoring/updating Bank/Combat/Options but that will be next!

 

For now:

 

Chat.scar

 

New stuff, updates, and restores!

 

2a8q7lx.png

 

 * function GetChatTabBounds(ChatTab: Integer): TBox;
    By: Wanted
* function GetCurrentChat: Integer;
    By: Wanted
* function GetChatStatus(Chat: Integer): Integer;
    By: Wanted
* function SetChatStatuses(Chats, States: TIntArray): TBoolArray;
    By: Wanted
* function SetupAutoChat(S: string): Boolean;
    By: Wanted
* function ToggleAutoChat(Resume: Boolean): Boolean;
    By: Wanted
* function SetupPublicChatFilter(S: string): Boolean;
    By: Wanted
* function ClickContinueEx(Click, UntilGone: Boolean): Boolean;
    By: Wanted
* function ClickContinue: Boolean;
    By: Wanted
* function FixChat: Boolean;
    By: Wanted
* function GetChatLineBounds(Line: Integer): TBox;
    By: Wanted
* function GetChatTextEx(Line, TextColor: Integer): string;
    By: Wanted
* function LeveledUpEx(Click, UntilGone: Boolean): Boolean;
    By: Wanted
* function LeveledUp: Boolean;
    By: Wanted

 

Tab1-Stats.scar

 

111mqs6.png // Stat bounds

 

 * function GetSkillBounds(Skill: Integer): TBox;
    By: Wanted
* function GetSkillLevelEx(Skill: Integer; BottomNumber, CheckST: Boolean): Integer;
    By: Wanted
* function GetSkillLevel(Skill: Integer; CheckST: Boolean): Integer;
    By: Wanted
* function HoverSkill(Skill: Integer; CheckST: Boolean): Boolean;
    By: Wanted
* function GetSkillInfo(Skill: Integer; CurrentCheck, NextCheck, RemainderCheck, CheckST: Boolean): TIntegerArray;
    By: Wanted
* function GetXP(Skill: Integer; CheckST: Boolean): Integer;
    By: Wanted
* function GetAllLevels(CheckST: Boolean): Boolean;
    By: Wanted

 

Map.scar

 

Running routines!

 

+{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+function IsRunning: Boolean;
+Contributors: Wanted
+Description: Returns true if running.
+Date Created: September 5th, 2011. By Wanted. RS2 Build 663.
+Last Modified: October 27th, 2014. By Wanted. RS07 Build ???.
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}
+
+function IsRunning: Boolean;
+begin
+  Result := SimilarColors(6806252, GetColor(581, 141), 10);
+end;
+
+{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+function ToggleRunEx(Run: Boolean; MinEnergy: Integer): Boolean;
+Contributors: Wanted
+Description: Sets run to desired state. True if state was changed.
+Date Created: October 27th, 2014. By Wanted. RS07 Build ???.
+Last Modified: October 27th, 2014. By Wanted. RS07 Build ???.
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}
+
+function ToggleRunEx(Run: Boolean; MinEnergy: Integer): Boolean;
+begin
+  Result := False;
+  if (GetMMLevel(Skill_Run) < MinEnergy) then
+    Exit;
+  Result := ((IsRunning) xor (Run));
+  if (Result) then
+    if (Random(2) = 1) then
+      MouseCircle(9, 581, 139, ClickLeft)
+    else
+      MouseBox(547, 135, 573, 148, ClickLeft);
+  WaitFunc(@IsRunning, False, 50, 150, 1500, 2500);
+end;
+
+{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+function ToggleRun(Run: Boolean): Boolean;
+Contributors: Wanted
+Description: Sets run to desired state. True if state was changed.
+Date Created: October 27th, 2014. By Wanted. RS07 Build ???.
+Last Modified: October 27th, 2014. By Wanted. RS07 Build ???.
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}
+
+function ToggleRun(Run: Boolean): Boolean;
+begin
+  Result := ToggleRunEx(Run, 1);

 

Equip Tab.scar

 

244s0v7.png // Equip Slots

 

 * function GetEquipmentBounds(Slot: Integer): TBox;
    By: Wanted
* function IsSlotEquipped(Slot: Integer; CheckET: Boolean): Boolean;
    By: Home & Wanted.
* function MouseEquipedItem(Slot: Integer; TypeC: ClickActions; CheckET: Boolean): Boolean;
    By: Wanted & Home.

 

Globals.scar

 

Bunch of new indexes/changes

 

      By: Wanted
 * const Game Tab Indexes
     By: Wanted & Dynamite.
+ * const Equip Tab Indexes
+     By: Wanted
+ * const Chat Tab Indexes
+     By: Wanted
 * const RS07 direction/angle Indexes
     By: Wanted
+ * const Withdraw function indexes
+     By: Wanted  
+*  const Area_ indexes
+     By: Wanted
 * const Useful in game colors
     By: Wanted
 * type TRS07Player = record
@@ -493,7 +501,7 @@ Last Modified: October 7th, 2014. By Wanted. RS07 Build ???.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

const
-  Skill_Count         = 23;
+  Skill_Count         = 25;
  Skill_Attack        = 0;
  Skill_Hitpoints     = 1;
  Skill_Mining        = 2;
@@ -518,6 +526,8 @@ const
  Skill_Farming       = 20;
  Skill_Construction  = 21;
  Skill_Hunter        = 22;
+  Skill_Total         = 23;
+  Skill_Combat        = 24; 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
const Game Tab Indexes
@@ -566,6 +576,31 @@ Last Modified: March 6th, 2013. By Wanted. RS07 Build ???.
  Tab_Equip_Ring        = 10;

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+const Chat function indexes
+Contributors: Wanted
+Description: Index handles for various chat routines.
+Date Created: October 28th, 2011. By Wanted. RS2 Build 671.
+Last Modified: October 28th, 2014. By Wanted. RS07 Build ???.
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}
+
+const
+  Chat_State_Count      = 6;
+  Chat_On               = 0;
+  Chat_Friends          = 1;
+  Chat_Filter           = 1;
+  Chat_Off              = 2;
+  Chat_Hide             = 3;
+  Chat_Autochat         = 4;
+  Chat_SwitchTab        = 5;
+  Tab_Chat_Count        = 6;
+  Tab_Chat_All          = 0;
+  Tab_Chat_Game         = 1;
+  Tab_Chat_Public       = 2;
+  Tab_Chat_Private      = 3;
+  Tab_Chat_Clan         = 4;
+  Tab_Chat_Trade        = 5;  
+  
+{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
const RS07 direction/angle Indexes
Contributors: Wanted
Description: Index handles for SetCompassAngle and all runescape directions.
@@ -584,6 +619,36 @@ const
  Dir_NorthWest         = 315;

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+const Withdraw function indexes
+Contributors: Wanted
+Description: Index handles for withdrawing routines.
+Date Created: December 11th, 2011. By Wanted. RS2 Build 688.
+Last Modified: March 20th, 2013. By Wanted. RS07 Build ???.
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}
+
+const
+  Withdraw_1 = 1;
+  Withdraw_5 = 5;
+  Withdraw_10 = 10;
+  Withdraw_All = -1337;
+
+{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+const Area_ indexes
+Contributors: Wanted
+Description: Index handles for the different screen ares within RS that contain items.
+Date Created: November 6th, 2011. By Wanted. RS2 Build 675.
+Last Modified: February 8th, 2012. By Wanted. RS2 Build 700.
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}
+
+const
+  Area_Inv              = 0;
+  Area_Bank             = 1;
+  Area_Deposit          = 2;
+  Area_Trade_You        = 3;
+  Area_Trade_Them       = 4;
+  Area_Shop             = 5;  

 

Mouse.scar

 

MouseCurrentSpot changed to MouseCurrentPos for better stan

 

Color.scar

 

Restored 2 functions

 

and changed CountColor(Tol)P both to CountColor(Tol)B

 

 {=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
function FindColorsExP(var TPA: TPointArray; Colors: TIntArray; B: TBox): Boolean;
Contributors:  Wanted
Description: Wrapper for FindColorsEx with points and boxes.
Date Created: March 19th, 2013. By Wanted
Last Modified: March 19th, 2013. By Wanted
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
function FindColorsTolP(var P: TPoint; Colors: TIntArray; B: TBox; Tol: LongInt): Boolean;
Contributors:  Wanted
Description: Wrapper for FindColorsTol with points and boxes.
Date Created: March 22nd, 2013. By Wanted
Last Modified: March 22nd, 2013. By Wanted
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}     

 

Box.scar/TBA.scar

 

ConstrainBox improvment.

Removed useless 'rows' input from BoxFromGrid

Replaced useless rows input in TBAFromGrid to number of Boxes

 

Point.scar

 

DistanceP restored

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
function DistanceP(P1, P2: TPoint): Extended;
Contributors: Wanted, Janilabo.
Description: Wrapper for Distance with points.
Date Created: October 28th, 2011. By Wanted
Last Modified: February 26th, 2013. By Wanted
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

TEA.scar

 

Removed CopyTEA as it's now in SCAR

 

TSA.scar

 

Restored 1 function

 

 {=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
function TSAContainsMulti(SubStrs: TStringArray; TSA: TStringArray): TBooleanArray;
Contributors: Wanted
Description: Results true if any strings are inside each string of TSA.
Date Created: March 20th, 2013. By Wanted
Last Modified: March 20th, 2013. By Wanted
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

Login.scar

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-function PressLogin(CheckLS: Boolean): Boolean;
+function PressLogin(UseEnterKey, CheckLS: Boolean): Boolean;
Contributors: Wanted
Description: Returns true if made it to MessageScreen.
Date Created: March 10th, 2013. By Wanted. RS07 Build ???.
-Last Modified: November 26th, 2014. By Wanted. RS07 Build ???.
+Last Modified: October 27th, 2014. By Wanted. RS07 Build ???.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

-function PressLogin(CheckLS: Boolean): Boolean;
+function PressLogin(UseEnterKey, CheckLS: Boolean): Boolean;
var
  T, TT, C: LongInt;   
begin
@@ -230,7 +230,10 @@ begin
      if (not (PressExistingUser(True))) then
        Exit;
  C := CountColor(clYellow, 247, 214, 519, 231);
-  MouseBox(234, 304, 370, 340, ClickLeft);
+  if (UseEnterKey) then
+    TypeSend('')
+  else
+    MouseBox(234, 304, 370, 340, ClickLeft);
  SetTimer(T, 2000, 3000);
  repeat
    if (CountColor(clYellow, 247, 214, 519, 231) <> C) then
@@ -239,8 +242,8 @@ begin
  until (CheckTimer(T));
  SetTimer(T, 50000, 70000);
  repeat  
-    SetTimer(TT, 35000, 40000); 
-    if (not (TIAContains([0, 799, 407, 301], CountColor(clYellow, 247, 214, 519, 231)))) then
+    SetTimer(TT, 35000, 40000);
+    if (not (TIAContains([0, 799, 407, 301, 302, 199], CountColor(clYellow, 247, 214, 519, 231)))) then
      if (not (MessageScreen)) then
        if (not (FindLoginMessageText('Your profile will be transferred'))) then
          Exit

 

OCR.scar

 

Restored GetItemAmount will be adding more areas soon

 

Object/Extended.scar

 

Restored some Object routines

 

 

 

------

 

 

More updates to come soon. Specifically Combat tab, Option Tab, and Banking

 

Still looking into porting the newest SMART

 

 

Cheers

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...