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

UBeX - Include Released !

Recommended Posts

As many have noticed that UBeX has now been released. Give us comments on what you think and bugs you come across. We are working on a better Compare two inventory Item slots. But have not finished thew code yet. Demise ;)

 

Anyways. Let me first explain what UBeX is.

 

UbeX is a Top-Tier Addition to the OSI functionality. We Used OSI and Scar Pascal to Bring Users some basic functionality to their scripts. We includemany thing sin our Include such as Paint on Smart with Scar, Debugging, Finding if player is attacking or being attacked. MANY Mouse object find color techniques.

 

Anyways just sreach around and hope you enjoy. Also look for updates for this is still pretty Beta. :)

 

~ RSutton - ShadowRecon ~

Edited by rsutton

Share this post


Link to post
Share on other sites

we need some formatting in there =p

by the way id much rather the findobj to be its own include this needs to be broke down into sections, and i have some additions to it i am working on a magic include that does all the things in the spell book but its a ways out, ive got the tabs down now moving on to spells and such.

Share this post


Link to post
Share on other sites

anyways heres what i have made so far for the magic lib. its far from done but its works great with what is included so far.

{$DEFINE RS2}
{$DEFINE OSI_Color_Anti_Randoms}
{$DEFINE SMART}
{.include OSI\OSI.scar}
{.include OSI\RS2\Extended\Object.Scar}
{===============================================================================
                                UnitedBots.net
                                  Runescape 2
                                Magic Routines
--------------------------------------------------------------------------------
* Function: SetMagicTab(Tab: Integer): Boolean;
   By: ShadowRecon.
* Function: Function: SetMagicTabEx(Deffence, Combat, Tele, Misc, Skill:Boolean; SortTab: Integer):Boolean;
   By: ShadowRecon.
* Function: FixMagic:Boolean;
   By: ShadowRecon.
* Function: FixSpellBook(FixUp: Boolean): Boolean;
   By: ShadowRecon.
* Function: TeleSpell(Tele:Integer):Boolean;
   By: ShadowRecon.
* Function:
   By: ShadowRecon.
===============================================================================}

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
const Bottom Spell Book Tab boundaries.
Contributors: ShadowRecon.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}
Const
 MTab_Deffence = 0;
 MTab_Combat   = 1;
 MTab_Teleport = 2;
 MTab_Misc     = 3;
 MTab_Skill    = 4;
 MTab_SortLvl  = 5;
 MTab_SortCmb  = 6;
 MTab_SortTel  = 7;

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
const TelePort Spell Tab boundaries.
Decription: Set Tab Sort TelePort
Contributors: ShadowRecon.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}
Const
 Tele_Home       = 0;
 Tele_MobArmy    = 7;
 Tele_Varrock    = 16;
 Tele_LumBridge  = 19;
 Tele_Falador    = 22;
 Tele_House      = 24;
 Tele_Camerlot   = 27;
 Tele_Ardougne   = 33;
 Tele_WatchTower = 38;
 Tele_Trollheim  = 45;
 Tele_ApeAToll   = 48;

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
const Skill Spell Tab boundaries.
Decription: Set Tab Sort Skill Sort
Contributors: ShadowRecon.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}
Const
 Skill_Enchant_1 = 5;
 Skill_LowAlch   = 14;
 Skill_Enchant_2 = 17;
 Skill_TeleGrab  = 20;
 Skill_SuperHeat = 26;
 Skill_Enchant_3 = 29;
 Skill_HighAlch  = 35;
 Skill_Enchant_4 = 37;
 Skill_Enchant_5 = 52;
 // More To be added..

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
const Spell Book Colors.
Decription: Set Tab Sort Skill Sort
Contributors: ShadowRecon.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}
Const
 MTab_Selected  = 16711422;
 Inactive_Spell = 4540753;

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Function: SetMagicTab(Tab: Integer): Boolean;
Decription: Sets Magic Tab Selected.
Contributors: ShadowRecon.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

Function SetMagicTab(Tab: Integer; Select: Boolean): Boolean;
Var
 MTab: TBox;
 TPA: TPointArray;
begin
 Case (Tab) of
   MTab_Deffence: MTab := Box(557, 444, 567, 457);
   MTab_Combat  : MTab := Box(588, 444, 598, 457);
   MTab_Teleport: MTab := Box(607, 444, 620, 457);
   MTab_Misc    : MTab := Box(630, 444, 639, 457);
   MTab_Skill   : MTab := Box(650, 444, 663, 457);
   MTab_SortLvl : MTab := Box(679, 444, 688, 457);
   MTab_SortCmb : MTab := Box(698, 444, 711 ,457);
   MTab_SortTel : MTab := Box(716, 444, 729 ,457);
 end;

   if Select then  // If you want to Select
     begin
       if FindColorsTolerance(TPA,MTab_Selected,MTab.x1,MTab.y1-7,MTab.x2,MTab.y1,0) then // Checks to See if its been selected
         begin
           Result := True;
           Exit;
         end;

       MouseBox(MTab.x1,MTab.y1,MTab.x2,MTab.y2,ClickLeft);
       wait(100);

       if FindColorsTolerance(TPA,MTab_Selected,MTab.x1,MTab.y1-5,MTab.x2,MTab.y1,0) then // Checks to See if its been selected
         begin
           Result := True;
           Exit;
         end else
           begin
             result := False;
             exit;
           end;
     end;

   if Select = False then // If you want to De-select
     begin
       if Not(FindColorsTolerance(TPA,MTab_Selected,MTab.x1,MTab.y1-7,MTab.x2,MTab.y1,0)) then // Checks to See if its been selected
         begin
           Result := True;
           Exit;
         end;

       MouseBox(MTab.x1,MTab.y1,MTab.x2,MTab.y2,ClickLeft);
       wait(100);

       if Not(FindColorsTolerance(TPA,MTab_Selected,MTab.x1,MTab.y1-5,MTab.x2,MTab.y1,0)) then // Checks to See if its been selected
         begin
           Result := True;
           Exit;
         end else
           begin
             result := False;
             exit;
           end;
     end;

end;

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Function: SetMagicTabEx(Deffence, Combat, Tele, Misc, Skill:Boolean; SortTab: Integer):Boolean;
Decription: Sets All Magic Tabs to Sected
Contributors: ShadowRecon.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

Function SetMagicTabEx(Deffence, Combat, Tele, Misc, Skill:Boolean; SortTab: Integer):Boolean;
begin
 SetMagicTab(MTab_Deffence,Deffence); waitRR(50,100);
 SetMagicTab(MTab_Combat, Combat); waitRR(50,100);
 SetMagicTab(MTab_Teleport, Tele); waitRR(50,100);
 SetMagicTab(MTab_misc, Misc); waitRR(50,100);
 SetMagicTab(MTab_Skill, Skill); waitRR(50,100);
 if SetMagicTab(SortTab,True) then waitRR(50,100);
   result := True;
end;

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Function: FixMagic:Boolean;
Decription: Sets Spell Book To default.
Contributors: ShadowRecon.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

Function FixMagic:Boolean;
begin
 if SetMagicTabEx(False,True,True,True,True,5) then
   result := True;
end;

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Function: FixSpellBook(FixUp: Boolean): Boolean;
Decription: Either makes spell book up or down.
Contributors: ShadowRecon, Wanted.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

function FixSpellBook(FixUp: Boolean): Boolean;
var
 TPA: TPointArray;
 B1, B2, B3: TBox;
begin
 Result := False;
 if (FixUp) then
   if (GetColor(726, 222) = 1250841) then
     Exit;
 if (not (FixUp)) then
   if (GetColor(728, 417) = 592137) then
     Exit;
 Result := True;
 if (not (FindColors(TPA, 1250841, 723, 223, 735, 418))) then
   Exit;
 B1 := TPABounds(TPA);
 if (not (FindColors(TPA, 592137, 723, 223, 735, 418))) then
   Exit;
 B2 := TPABounds(TPA);
 B3 := Box(723, B1.Y1, 735, B2.Y2);
 if (FixUp) then
   DragMouseBox(B3.X1, B3.Y1, B3.X2, B3.Y2, 721, 207, 735, 220, True)
 else
   DragMouseBox(B3.X1, B3.Y1, B3.X2, B3.Y2, 721, 418, 734, 433, True)
end;

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Function: TeleSpell(Tele:Integer):Boolean;
Decription: Selects Teleport.
Contributors: ShadowRecon.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

Function CastTele(Tele:Integer):Boolean;
Var
 S_S:TBox;
 TPA: TPointArray;
 X,Y:Integer;
begin
 if Not(GetCurrentTab = 7) then
   SetGameTab(7);

 WaitRR(100,150);
 SetMagicTabEx(False,True,True,True,True,MTab_SortLvl);
 WaitRR(100,250);
 FixSpellBook(True);
 WaitRR(200,350);

 case (Tele) of
   Tele_Home      : S_S := Box(567, 222, 582 ,237);
   Tele_MobArmy   : S_S := Box(592, 246, 607, 263);
   Tele_Varrock   : S_S := Box(661, 269, 680, 286);
   Tele_LumBridge : S_S := Box(590, 294, 607, 309);
   Tele_Falador   : S_S := Box(680, 312, 663, 294);
   Tele_House     : S_S := Box(567, 319, 582, 333);
   Tele_Camerlot  : S_S := Box(638, 317, 655, 335);
   Tele_Ardougne  : S_S := Box(638, 343, 654, 357);
   Tele_WatchTower: S_S := Box(613, 364, 631, 382);
   Tele_Trollheim : S_S := Box(639, 389, 655, 407);
   Tele_ApeAToll  : S_S := Box(566, 415, 582, 429);
 end;

if FindColorsTolerance(TPA,Inactive_Spell,S_S.x1+5,S_S.y1+5,S_S.x2-5,S_S.y2-5,15) then //
  begin
    result := False;
    exit;
  end;

MouseBox(S_S.x1,S_S.y1,S_S.x2,S_S.y2,ClickLeft);
wait(3000);
result := True;
end;

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Function: CastSpell(Spell: Integer):Boolean;
Decription: Cast Spell Fom Spell Book
Contributors: ShadowRecon.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}
Function CastSpell(Spell: Integer):Boolean;
Var
 S_S: TBox;
 TPA: TPointArray;
begin
 if Not(GetCurrentTab = 7) then
   SetGameTab(7);

 WaitRR(100,150);
 SetMagicTabEx(False,True,True,True,True,MTab_SortLvl);
 WaitRR(100,250);
 FixSpellBook(True);
 WaitRR(200,350);

 Case Spell of
   Skill_Enchant_1 : S_S := Box(687,222,702,339);
   Skill_LowAlch   : S_S := Box(615,269,630,286);
   Skill_Enchant_2 : S_S := Box(687,269,702,286);
   Skill_TeleGrab  : S_S := Box(612,292,630,310);
   Skill_SuperHeat : S_S := Box(612,317,629,332);
   Skill_Enchant_3 : S_S := Box(685,317,700,332);
   Skill_HighAlch  : S_S := Box(685,340,705,358);
   Skill_Enchant_4 : S_S := Box(590,365,615,380);
   Skill_Enchant_5 : S_S := Box(663,415,672,428);
 end;

if FindColorsTolerance(TPA,Inactive_Spell,S_S.x1+5,S_S.y1+5,S_S.x2-5,S_S.y2-5,15) then //
  begin
    result := False;
    exit;
  end;
end;




begin
SetupOSI;
CastTele(Tele_Varrock);
end. 

Edited by rsutton

Share this post


Link to post
Share on other sites

Wow, Thats alittle above and beyond dont you think? and i tried calling you on skype btw.. before posting anything on here..

Edited by shadowrecon

Share this post


Link to post
Share on other sites

Ok guys, use the PM system if you want to squabble. And @rsutton, shadow is right, formatting is very important, not just for other people to read your code, but you'll make less mistakes while coding when your code is layout in a clean readable way.

Share this post


Link to post
Share on other sites

Can you help me?

When I run UBeX.scar

 

Type Line File Message

Compile error 245 Unknown indentifer 'MakeCompass'

 

help me oks

Share this post


Link to post
Share on other sites

Hey there bud. Well since UBeX uses OSI and MakeCompass is an osi function. Make sure that you have OSI included into your script. UBeX is not a SINGLE stand alone script. it is an include file.

 

So in your script that you are trying to run with UBeX make sure you declare OSI as

$I OSI\Osi.scar

then in your script declare UBeX

$I UBeX\UBeX.scar

 

If this does not make sense to you, could you post a screen shot onto what you are refering to buddy.

Share this post


Link to post
Share on other sites
Hey there bud. Well since UBeX uses OSI and MakeCompass is an osi function. Make sure that you have OSI included into your script. UBeX is not a SINGLE stand alone script. it is an include file.

 

So in your script that you are trying to run with UBeX make sure you declare OSI as

$I OSI\Osi.scar

then in your script declare UBeX

$I UBeX\UBeX.scar

 

If this does not make sense to you, could you post a screen shot onto what you are refering to buddy.

 

Actually, he doesn't have to do that at all...

He just has to include UBeX.scar, you on the other hand forgot to place the following before "{$IO OSI\OSI.scar}" in UBeX.scar:

 

  {$DEFINE RS2}
 {$DEFINE OSI_COLOR_ANTI_RANDOMS}
 {$DEFINE SMART}

 

UBeX uses all of those features in OSI, so it has be included in the UBeX include rather than in the script, and before you include OSI.

Share this post


Link to post
Share on other sites

well there is a half and half. half of ther scripts run on runescape like OSi does, such as openbanking, using inventory controls and such. The other half has such items like findcolors and such. so its a half and half kinda thing.

Share this post


Link to post
Share on other sites

From the File menu select Includes Manager. Click on UBeX to highlight it, and click Install. Ta Da! I'm sure this has been answered a dozen times already elsewhere.

 

Edit: Make sure the OSI include is installed too. UBeX builds on top of OSI.

Edited by Bixby Sayz

Share this post


Link to post
Share on other sites

Are you folks still maintaining this?

 

I received a PM asking for help with a script. When I dug into it I realized the problem is UBeX has not been updated to comply with the changes to OSI. (http://forums.scar-divi.com/showthread.php?1212)

 

I've made changes to Amber's Fighter (http://forums.scar-divi.com/showthread.php?983-AmberGSFighter) as well as to the UBeX includes to get it working for myself, but I do not want to be in the position of posting changes to other people's work.

Share this post


Link to post
Share on other sites

I'll talk to Freddy about moving the repo to a different location, it would probably be best if you set one up at google code or something.

Share this post


Link to post
Share on other sites
I have no access to the SVN, RSutton went awall. So there is no way to update. =/

 

If you want I can clone the repository and give you access to it... I've now removed the include from the system until rsutton returns or development is resumed by someone else.

Share this post


Link to post
Share on other sites
If you want I can clone the repository and give you access to it... I've now removed the include from the system until rsutton returns or development is resumed by someone else.

That would work. I have a copy of the all the files, except the xml document

Share this post


Link to post
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...