Page 3 of 10 FirstFirst 12345 ... LastLast
Results 51 to 75 of 229

Thread: ogLib

  1. #51
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    This isn't an update post, honest!
    mouse.rightClickOption(blah, blah, menuWait: Integer)
    TString.contains('')
    ogl.getChars().toInteger()
    ogl.getChars().toInteger()
    ogl.getChars().contains()
    glCharArray.parseAlpha()
    glCharArray.parseAlphaNumeric()
    glCharArray.parseInt()
    glCharArray.toString()

    Etc.

    https://github.com/ObscuritySRL/ogLib

    I've been meaning to add uptext but literally keep forgetting. It's highly recommended to not use hover text with OGL as it can screw with certain methods like combat target information. But, as it seems to be highly requested, I'll account for that and write mouse.getHoverText().




    Skype: obscuritySRL@outlook.com

  2. #52
    Join Date
    Dec 2011
    Posts
    445
    Mentioned
    26 Post(s)
    Quoted
    256 Post(s)

    Default

    Quote Originally Posted by Obscurity View Post
    This isn't an update post, honest!
    mouse.rightClickOption(blah, blah, menuWait: Integer)
    TString.contains('')
    ogl.getChars().toInteger()
    ogl.getChars().toInteger()
    ogl.getChars().contains()
    glCharArray.parseAlpha()
    glCharArray.parseAlphaNumeric()
    glCharArray.parseInt()
    glCharArray.toString()

    Etc.

    https://github.com/ObscuritySRL/ogLib

    I've been meaning to add uptext but literally keep forgetting. It's highly recommended to not use hover text with OGL as it can screw with certain methods like combat target information. But, as it seems to be highly requested, I'll account for that and write mouse.getHoverText().
    Awww yisssss.

  3. #53
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    From what I hear, pretty much all of our functions are going to need updating. Bad time to be working double shifts, but will try after work tonight I guess?

    If people's could start trying different functions (actionBar, combat, and such primarily), and start a list of what no longer works would be helpful. :P. Should just be updating IDs/colourIDs/dimensions.




    Skype: obscuritySRL@outlook.com

  4. #54
    Join Date
    Jan 2012
    Location
    Long Island, NY
    Posts
    413
    Mentioned
    5 Post(s)
    Quoted
    95 Post(s)

    Default

    *Edit*

    Never mind, the files copied weird

  5. #55
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    :: Automated Message ::
    Added mouse.getTooltip() and other model methods.


    ObscuritySRL updated on Wednesday, May 06, 2015

    163 additions, 50 deletions.

    Added a temporary fix to access violations. ogl.setup() now has a third,
    optional, parameter. If set to false, it will not call glxMapHooks().
    Keep in mind that this must be called once per SMART. This is only
    temporary until GLX itself is updated.

    Added glModelArray.getModels() methods. These now account for TID - a
    model's triangle count.

    Calling mouse.getTooltip() will now return what is labelled at
    "Mouseover text" in the RuneScape graphics options.

    Small dialogue changes.
    A total of 4 files were affected:





  6. #56
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Stickified

  7. #57
    Join Date
    Dec 2011
    Posts
    2,147
    Mentioned
    221 Post(s)
    Quoted
    1068 Post(s)

  8. #58
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    Cheers, Zyt3x!

    Pushed a fairly important update to ogLib as well today - would recommend everyone update. See below:
    https://github.com/ObscuritySRL/ogLi...14c6c4e7710623




    Skype: obscuritySRL@outlook.com

  9. #59
    Join Date
    Mar 2014
    Posts
    205
    Mentioned
    4 Post(s)
    Quoted
    116 Post(s)

    Default

    Not sure if this is the right place to post for technical help, but when running a script (Edit: I should specify that I mean when running a script using ogLib; scripts that do not use ogLib compile and work flawlessly), it compiles properly - however, it attempts to load something (Java, I assume), and crashes out with this message:

    http://puu.sh/hGpFy/dd4a8fc0ef.png

    I'm running JDK 8u45; I have Java, but it doesn't seem to be the type it wants. Is there a way to specify this?
    Last edited by adc; 05-08-2015 at 11:26 PM.

  10. #60
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    Quote Originally Posted by adc View Post
    Not sure if this is the right place to post for technical help, but when running a script, it compiles properly - however, it attempts to load something (Java, I assume), and crashes out with this message:

    http://puu.sh/hGpFy/dd4a8fc0ef.png

    I'm running JDK 8u45; I have Java, but it doesn't seem to be the type it wants. Is there a way to specify this?
    You're right, the "unofficial development" section isn't the right place to ask for help with smart/java/simba.
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  11. #61
    Join Date
    Mar 2014
    Posts
    205
    Mentioned
    4 Post(s)
    Quoted
    116 Post(s)

    Default

    Quote Originally Posted by grats View Post
    You're right, the "unofficial development" section isn't the right place to ask for help with smart/java/simba.
    For a script running ogLib, when every other script works properly and my Java installation is fine? Perhaps I could have been more clear and informative, but there's no reason to be snarky about it friend.

  12. #62
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by adc View Post
    For a script running ogLib, when every other script works properly and my Java installation is fine? Perhaps I could have been more clear and informative, but there's no reason to be snarky about it friend.
    Because ogLib is hard coded to use Java 7 for some reason. IIRC there is code in the include to search for your Java path but it isn't used.

  13. #63
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    I thought @Clarity made it search for the correct Java path a few weeks ago? Around the time he changed smart.simba?

    Maybe I overwrote it - will fix it. Sorry.




    Skype: obscuritySRL@outlook.com

  14. #64
    Join Date
    Dec 2011
    Posts
    445
    Mentioned
    26 Post(s)
    Quoted
    256 Post(s)

    Default

    Got some more requests, hopefully these are fairly simple.

    isBehindInterface or isVisable
    Will return true/false if it cannot see whatever model/texture/char is on the screen. For example, http://i.gyazo.com/8340d61a69902417e00d41561c3423ee.png (ogl.getChars) gets the World 28 characters, even though you can't actually see them on the screen. If you try to mouse over it and click it, it won't work because it's behind something.

    mouse.scroll(direction)
    Will simply scroll up or down

    Port over the, very useful, types from SRL-6 (srl-6\lib\utilities\types). I've been using them on my own, and I just can't work without them.

    Could really use these for the hopWorld interface I've been working on:





    I kind wana make a little include file for quick hopping, try to contribute a bit. But i'm not sure if i'm up for it, or experienced enough.

  15. #65
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    Yes yes yes!

    I was going to add mouse.scroll(), but it slipped my mind lately. Cheers for the reminder!

    I'm very happy to see what you've come up with! That's very cool and exciting to see that others are also making awesome progress with OGL!

    As I told Justin - I'll accept all contributions that people are willing to provide. It isn't easy writing all of this. :P. With my schedule lately, I need it. Though, I hope you wouldn't get upset or offended if I updated/tweaked/rewrote it once I had time?

    I've literally only ever used color/SRL once. It was Clarity's shitadel root chopper. I immediately stopped it and never used Simba for anything until Clarity showed me GLX. That said, I'll take a look at the types and such as you suggested.

    I don't mean that as a diss to SRL - just the fact that I had to have a specific layout, titlebars, locked interface, etc. Irked me. :P.



    Add me to Skype, mate!

  16. #66
    Join Date
    Dec 2011
    Posts
    445
    Mentioned
    26 Post(s)
    Quoted
    256 Post(s)

    Default

    Quote Originally Posted by Obscurity View Post
    Yes yes yes!

    I was going to add mouse.scroll(), but it slipped my mind lately. Cheers for the reminder!

    I'm very happy to see what you've come up with! That's very cool and exciting to see that others are also making awesome progress with OGL!

    As I told Justin - I'll accept all contributions that people are willing to provide. It isn't easy writing all of this. :P. With my schedule lately, I need it. Though, I hope you wouldn't get upset or offended if I updated/tweaked/rewrote it once I had time?

    I've literally only ever used color/SRL once. It was Clarity's shitadel root chopper. I immediately stopped it and never used Simba for anything until Clarity showed me GLX. That said, I'll take a look at the types and such as you suggested.

    I don't mean that as a diss to SRL - just the fact that I had to have a specific layout, titlebars, locked interface, etc. Irked me. :P.



    Add me to Skype, mate!
    I'm totally fine with you editing it or fixing it up, i'm not a experienced developer and i'm sure it might end up being a bit sloppy. I've been trying to get some sort of Goldfarm going and I have a method that needed quick hopping, so I decided to give it a shot and that's the result.

    Here's the functions I wrote up so far, and yes I kinda took from your programming in the include >.<


    Simba Code:
    function quickHopGetInter(debug: boolean=false): tBox;
    Var
      i: Integer;
      funcBox: tBox;
      funcPoint: tPoint;
      funcTPA: TPointArray;
      funcTXA: glTextureArray;
    begin
      funcTXA := ogl.getTextures([48960, 53040]);
      for i:=0 to high(funcTXA) do
        begin
          funcPoint := Point(funcTXA[i].X, funcTXA[i].Y);
          funcTPA.addIndex(funcPoint, 0);
          //if(debug) then
            //smart.__Graphics.DrawText('X '+toStr([i]), smallChars, funcPoint, clLime);
        end;
      if(debug) then
        smart.__Graphics.DrawBox(funcTPA.getBounds);
      if(funcTPA.getBounds.X1>0) then
        result := funcTPA.getBounds;
    end;

    Simba Code:
    function quickHopGetWorlds(debug: boolean=false): TIntegerArray;
    Var
      i, funcFoundWorld: Integer;
      funcBox, funcWorldBox: tBox;
      funcPoint: tPoint;
      funcTPA: TPointArray;
      funcTXA: glTextureArray;
      funcFoundWorlds: TIntegerArray;
    begin
      funcTXA := ogl.getTextures(13504, quickHopGetInter);
      for i:=0 to high(funcTXA) do
        begin
          funcPoint := Point(funcTXA[i].X, funcTXA[i].Y);
          funcTPA.addIndex(funcPoint, 0);
          funcBox := funcTXA[i].bounds;
          funcWorldBox := intToBox(funcBox.X1, funcBox.Y1, funcBox.X2+60, funcBox.Y2);
          if(debug) then
            smart.__Graphics.DrawBox(funcWorldBox);
          funcFoundWorld := ogl.getChars(funcWorldBox).toInteger;
          if(debug) then
            smart.__graphics.DrawText('World: '+toStr(funcFoundWorld), 'smallChars', point(funcWorldBox.X2 ,funcWorldBox.Y2), clWhite);
          funcFoundWorlds.addIndex(funcFoundWorld, 0);
        end;
      result := funcFoundWorlds;
    end;

    The types utilities can be easily ported, I only had to comment out one line that used SRL-6's Debug in tBox, but others I just removed several functions. When I was doing the functions that's what I relied on the most, since it makes it so much easier to manipulate arrays/tboxs/tpoints/ATPA's/ETC...

    I need to go through, clean it up a bit and remove the debug issues where it'll terminate the script, i'd also like to have several different functions for getting the Players on the world, the location/minigame of the world, and the ping. I've of course got more work to do.

    But yeah, I'm loving the power OGL has. I don't think i'd ever be able to do such a thing with SRL/Pure Color.

  17. #67
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    It would be easy for me to do a isVisible() for elements of the same type - two textures for example. This is because if something appears later in the array and its bounds cover the centerpoint of what you're checking, then yes it's behind something.

    Those two textures you're searching for, are those the stars?

  18. #68
    Join Date
    Dec 2011
    Posts
    445
    Mentioned
    26 Post(s)
    Quoted
    256 Post(s)

    Default

    This is what I have so far, once isVisible and mouse.scroll gets pushed to the GitHub, i'll start adding the filters and what not to actually start quick hopping. Also thinking about adding global variables for each and every ogl.getTextures/ogl.get(whatever) so it can easily be updated in the future, but I have a feeling most of my code will end up getting revamped in some way. Just leme know what you want me to do from here.

    Of course this isn't final, I know I need to add some failsafes to clickYes, I've kinda just smashed it together since I've been awake for 15-ish hours now and I need some sleep. Will do some cleanup tomorrow, maybe.


    Simba Code:
    (*
    quickHopGetInter
    ~~~~~~~~~~~~~~~

    .. code-block:: pascal

        function quickHopGetInter(debug: boolean=false): tBox;

    Grabs the quick hop interface and it's dimensions in a tBox.
    Core of the quick hop functions

    .. note::

        - by Twinki
        - Last updated: 5/9/2015 by Twinki

    Example:

    .. code-block:: pascal

           smart.__Graphics.DrawBox(quickHopGetInter, false, clRed);

    *)

    function quickHopGetInter(debug: boolean=false): tBox;
    Var
      i: Integer;
      funcPoint: tPoint;
      funcTPA: TPointArray;
      funcTXA: glTextureArray;
    begin
      funcTXA := ogl.getTextures([48960, 53040]);
      for i:=0 to high(funcTXA) do
        begin
          funcPoint := Point(funcTXA[i].X, funcTXA[i].Y);
          funcTPA.addIndex(funcPoint, 0);
        end;

      if(funcTPA.getBounds.X1>0) then
        begin
          if(debug) then
            smart.__Graphics.DrawBox(funcTPA.getBounds);
          result := funcTPA.getBounds;
        end;
    end;

    (*
    quickHopGetWorlds
    ~~~~~~~~~~~~~~~

    .. code-block:: pascal

        function quickHopGetWorlds(debug: boolean=false): TIntegerArray;

    Finds and returns each world number in the  quick Hop Interface.

    .. note::

        - by Twinki
        - Last updated: 5/9/2015 by Twinki

    Example:

    .. code-block:: pascal

           WriteLn(quickHopGetWorlds(true));
            Will return found worlds

    *)

    function quickHopGetWorlds(debug: boolean=false): TIntegerArray;
    Var
      i, funcFoundWorld: Integer;
      funcBox, funcWorldBox: tBox;
      funcPoint: tPoint;
      funcTPA: TPointArray;
      funcTXA: glTextureArray;
      funcFoundWorlds: TIntegerArray;
    begin
      funcTXA := ogl.getTextures(13504, quickHopGetInter(debug));
      for i:=0 to high(funcTXA) do
        begin
          funcPoint := Point(funcTXA[i].X, funcTXA[i].Y);
          funcTPA.addIndex(funcPoint, 0);
          funcBox := funcTXA[i].bounds;
          funcWorldBox := intToBox(funcBox.X1, funcBox.Y1, funcBox.X2+60, funcBox.Y2);
          funcFoundWorld := ogl.getChars(funcWorldBox).toInteger;
          if(debug) and (funcWorldBox.X1>0) then
            begin
              smart.__Graphics.DrawBox(funcWorldBox);
              smart.__graphics.DrawText('World: '+toStr(funcFoundWorld), 'smallChars', point(funcWorldBox.X2 ,funcWorldBox.Y2), clWhite);
            end;
          funcFoundWorlds.addIndex(funcFoundWorld, 0);
        end;

      result := funcFoundWorlds;
      funcFoundWorlds.isInArray(1);
    end;

    (*
    quickHopCanHop
    ~~~~~~~~~~~~~~~

    .. code-block:: pascal

        function quickHopCanHop(world: Integer=0): boolean;

    Returns true/false if the world specificed is on screen

    .. note::

        - by Twinki
        - Last updated: 5/9/2015 by Twinki

    Example:

    .. code-block:: pascal

           if(quickHopCanHop(100)) then
            WriteLn('We can hop');

    *)

    function quickHopCanHop(world: Integer=0): boolean;
    begin
      result := quickHopGetWorlds().isInArray(world);
    end;

    (*
    quickHopGetConfirmBox
    ~~~~~~~~~~~~~~~

    .. code-block:: pascal

        function quickHopGetConfirmBox(debug: boolean=false): tbox;

    Grabs the quick hop confirmation box

    .. note::

        - by Twinki
        - Last updated: 5/9/2015 by Twinki

    Example:

    .. code-block:: pascal

           smart.__Graphics.DrawBox(quickHopGetConfirmBox, false, clRed);;

    *)

    function quickHopGetConfirmBox(debug: boolean=false): tbox;
    Var
      i: Integer;
      funcBox: tBox;
      funcPoint: tPoint;
      funcTPA: TPointArray;
      funcTXA: glTextureArray;
    begin
      funcBox := intToBox(quickHopGetInter(debug).X1, quickHopGetInter().Y1, quickHopGetInter().X2, quickHopGetInter().Y2-40);
      funcTXA := ogl.getTextures(14280, funcBox);

      for i:=0 to high(funcTXA) do
        begin
          funcPoint := Point(funcTXA[i].X, funcTXA[i].Y);
          funcTPA.addIndex(funcPoint, 0);
          if(debug) then
            smart.__Graphics.DrawText('X '+toStr([i]), smallChars, funcPoint, clLime);
        end;

      if(funcTPA.getBounds.X1>0) then
        begin
          if(debug) then
            smart.__Graphics.DrawBox(funcTPA.getBounds);
          result := funcTPA.getBounds;
        end;
    end;

    (*
    quickHopClickYes
    ~~~~~~~~~~~~~~~

    .. code-block:: pascal

        function quickHopClickYes(): boolean;

    Clicks the Yes button on the quick hop confirmation box

    .. note::

        - by Twinki
        - Last updated: 5/9/2015 by Twinki

    Example:

    .. code-block:: pascal

           quickHopClickYes();

    *)

    function quickHopClickYes(): boolean;
    Var
      yesButton: glTextureArray;
      clickPoint: TPoint;
    begin
      if(ogl.getChars(quickHopGetConfirmBox).contains('Areyousureyouwant')) then
        begin
          yesButton := ogl.getTextures([89246, 89248, 91275], [10775317, 10775316], [quickHopGetConfirmBox]);
          if not(yesButton.isEmpty) then
            begin
              clickPoint := clientCenter.closest(yesButton)[0].randomizePointEllipse(5);
              mouse.click(clickPoint);
            end;
        end;
    end;

  19. #69
    Join Date
    May 2012
    Posts
    499
    Mentioned
    23 Post(s)
    Quoted
    228 Post(s)

    Default

    I'm unsure if this is included, but a waittypefunc would be rather usefull?
    On iPhone atm, but something like this would remove the need of some timers.
    Simba Code:
    If lootmodel array is not empty
       Repeat
           Click closest models
       Until waittypefunc lootmodelarray is empty (1000, 5000)
    So it checks if its empty every second for up to 5 seconds then repeats.

  20. #70
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    Couldn't you just do:
    Simba Code:
    while length(modelArray:=ogl.getModels(cardinalArray)) do
      mouse.click(modelArray.closestTo(ogl.getClientMidPoint())[0]);




    Skype: obscuritySRL@outlook.com

  21. #71
    Join Date
    May 2012
    Posts
    499
    Mentioned
    23 Post(s)
    Quoted
    228 Post(s)

    Default

    Quote Originally Posted by Obscurity View Post
    Couldn't you just do:
    Simba Code:
    while length(modelArray:=ogl.getModels(cardinalArray)) do
      mouse.click(modelArray.closestTo(ogl.getClientMidPoint())[0]);
    Yes, but wont you need a countdown timer for that? So it doesn't spamclick the model?

  22. #72
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    That would have to be something done in the script itself, not ogLib:

    Simba Code:
    while length(loot:=ogl.getModels(IDs)) do
      if canLoot.isFinished() then
      begin
        mouse.click(loot.closestTo(ogl.getClientMidPoint())[0].randomizePointEllipse(20));
        canLoot.setTime(random(250,750));
      end;




    Skype: obscuritySRL@outlook.com

  23. #73
    Join Date
    May 2012
    Posts
    499
    Mentioned
    23 Post(s)
    Quoted
    228 Post(s)

    Default

    Quote Originally Posted by Obscurity View Post
    That would have to be something done in the script itself, not ogLib:

    Simba Code:
    while length(loot:=ogl.getModels(IDs)) do
      if canLoot.isFinished() then
      begin
        mouse.click(loot.closestTo(ogl.getClientMidPoint())[0].randomizePointEllipse(20));
        canLoot.setTime(random(250,750));
      end;
    Yes, I know. But the waittypefunc is a Srl function AFAIK, and I was suggesting it as another method besides the setTime option.

  24. #74
    Join Date
    Mar 2013
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    !subscribe

  25. #75
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    The !subscribe was for PM. :-P. Script monitors PM, I have to manually add from posts. Added!

Page 3 of 10 FirstFirst 12345 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •