Page 8 of 9 FirstFirst ... 6789 LastLast
Results 176 to 200 of 220

Thread: OpenGL plugins

  1. #176
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by Obscurity View Post
    Brandon, I'm at work so can't send any examples ATM, but his map issue may relate to mine.

    Whe tracing the coordinates returned by GLX map coords (I don't remember the exact name - again, work), it's off by up to 200px sometimes, if I recall correctly. It's still a perfect rectangle around the map, but the actual map image is in much farther then the actual point given.

    I'll give examples and screenshots when I get home, mate. Cheers.


    Are you talking about:



    Because if so, then you are missing the point of the function entirely..

    Simba Code:
    {$DEFINE SMART}
    {$DEFINE SmartWrappers}
    {$I GLX/Setup.Simba}

    var
      Smart: TSmart;
      TL, BL, BR, TR: FloatPoint;
      R: TBox;
    begin
      ClearDebug();
      SetupGLX(Smart, 800, 600);

      GL_GetMapCoords(TL, BL, BR, TR);
      R := ToRect(TL, BL, BR, TR);

      Smart.Graphics().DrawRotatedBoxes([R]);
    end.

    That function is supposed to return the bounds of the map and it does exactly that (regardless of rotation). Nothing more.. nothing less.. You can try saving the map to the disk and see that it has an alpha layer surrounding it.. So it's not actually wrong. It's just the bounds it returns ALSO includes the transparent pixels surrounding the map..


    Hence:

    Simba Code:
    {*
      Returns the current loaded map as a bitmap.

      Developer Notes:
        Returned Bitmap Size:  512x512
    *}

    Function GL_MapToImageEx: Integer;


    {*
      Returns the current loaded map as a bitmap with the outline stripped.

      Developer Notes:
        Original Size:        512x512
        Returned Bitmap Size: 408x408
    *}

    Function GL_MapToImage: Integer;


    Is that what you meant?



    As for GL_GetLocalPos.. It isn't wrong..



    Simba Code:
    {$DEFINE SMART}
    {$DEFINE SmartWrappers}
    {$I GLX/Setup.Simba}

    Function ToRect(TL, BL, BR, TR: FloatPoint): TBox;
    begin
      Result.X1 := round(TL.X);
      Result.Y1 := round(TL.Y);
      Result.X2 := round(BR.X);
      Result.Y2 := round(BR.Y);
    end;


    Function LocalPosToMM(Pos: TPoint): TPoint;
    var
      Me: TPoint;
      DX, DY: Integer;
    Begin
      Me := GL_GetLocalPos;
      DX := Pos.X - Me.X;
      DY := Pos.Y - Me.Y;

      Me := MiddleBox(GL_MMBounds);
      Result.X := Me.X + DX;
      Result.Y := Me.Y + DY;
    End;


    var
      Smart: TSmart;
      P: TPoint;
      TL, BL, BR, TR: FloatPoint;
    begin
      //ClearDebug();
      SetupGLX(Smart, 800, 600);

      GL_GetMapCoords(TL, BL, BR, TR);
      P := GL_GetLocalPos;
      P := LocalPosToMM(P);

      Mouse(P);
    end.


    Remember that the local pos in OpenGL is NOT the same as in Reflection. The LocalPos in OpenGL is the coordinate RELATIVE to the map! (specifically the top left). Assume the map is perfectly north:

    MMPos = TopLeftOfMap + P.


    Assume the map is perfectly South (upside down):

    MMPos = TopLeft - P.

    Why minus? Because the top left of the map is literally drawn at the bottom right of the minimap. The player stands at the center of the map.

    LocalPos works by returning a negative coord when facing south. If the top left is drawn at the bottom right, the player stands at a negative position relative to the bottom right (top left of the map). It uses CrossProduct to determine the player's position WITHIN the current chunk of the map. NOT the global world map!


    The above LocalPos will return a point on the minimap relative to the TopLeft of the map (wherever that is drawn).. Just because the map is upside down (when facing perfectly south), does not mean that it's top left is now the bottom right because that's wrong! The top left is simply "drawn" at a different position (bottom right) but it is STILL the top left (it's the way OpenGL works). Very confusing!


    A simpler way of saying it is this: If you want to draw an image upside down, why flip all the pixels? You can simply specify a negative coordinate around the horizontal axis to flip it OR you can swap the Y values.. This will flip the image upside down by simply drawing the top where the bottom is supposed to be and the bottom where the top is supposed to be.. However, the image itself is still upright. It is just "drawn" upside down so the top of the image itself is still the top! Only its coordinates changed.

    The original way (Kasi's way) of calculating local pos was to "un-rotate" the map coords around the center of the minimap (such that the top is horizontal and the map faces north) and then calculate position relative to the top left.. but there's no need for that (Bart's way).. Kasi's is probably better for calculating MMPos from a point.



    Anyway..

    When you log in, the map you are standing in, is the TRUE CHUNK of the global map.. You are placed at the center of this map. However, when you walk to a new map chunk, you are positioned at one of its edges (you are east, walking west when you hit a new map, you will be placed far east on a combined chunk of the map).. This makes LocalPos entirely useless unless you combine it with SPS.. thus making it the "perfect" SPS there can possibly be. Hence.. the need for GlobalPos arose but I never figured out how to get it..



    I hope I have covered all the bases and crossed the T's, dotted the I's..

    I understand there's very little documentation on the internals but I did explain all this once upon a time I think?
    Last edited by Brandon; 01-23-2015 at 04:41 PM.
    I am Ggzz..
    Hackintosher

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

    Default

    Ah, I didn't realize it had the alpha layer around it. That was the only thing throwing me for a loop. :-P. Cheers for the explaination!




    Skype: obscuritySRL@outlook.com

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

    Default

    I hadn't noticed it earlier, but I'm now having a similar issue as riwu - glGetTextures() is returning an item at the bottom left hand corner of the inventory. When this happens, it's always an item that in the inventory. For me, ATM, it's Lunar Lumber, which will then change to a Lunar Fence Post if it's converted.

    Not a big deal if you just use the texture dimensions to make sure it's the real item, and not the tiny thing in the corner.




    Skype: obscuritySRL@outlook.com

  4. #179
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Quote Originally Posted by Obscurity View Post
    I hadn't noticed it earlier, but I'm now having a similar issue as riwu - glGetTextures() is returning an item at the bottom left hand corner of the inventory. When this happens, it's always an item that in the inventory. For me, ATM, it's Lunar Lumber, which will then change to a Lunar Fence Post if it's converted.

    Not a big deal if you just use the texture dimensions to make sure it's the real item, and not the tiny thing in the corner.
    Yeah it's easy to work around it once u discover the bug, but before u do it'd likely cause abnormal behaviors in ur script...
    Do share if u find any other bugs then all of us can take precautions against them

  5. #180
    Join Date
    Feb 2012
    Location
    Portugal
    Posts
    91
    Mentioned
    3 Post(s)
    Quoted
    41 Post(s)

    Default

    I have a few questions I hope you dont mind answering to them.

    1) Are GL_LoginPlayer and GL_LoginToLobby working?
    2) Is there any bug with GL_InvBounds? It doesnt seem to get me any bounds at all.
    3) Is there anyway to force SMART to load runescape in OpenGL mode? because using this plugin, I dont know why, it makes runescape load as safe mode and I have to set it up to OpenGL manually.
    4) Is the include still updated? I mean if there is still someone working on it so in every update or break, things still work fine? Or was it kinda left out the scene?

    I guess that is all! I hope you dont have a hard time answering to them! Thank you very much! I really want people to support OpenGL development since Im loving it so far.

    Thank you all,
    PatriqDesigns

  6. #181
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by PatriqDesigns View Post
    I have a few questions I hope you dont mind answering to them.

    1) Are GL_LoginPlayer and GL_LoginToLobby working?
    2) Is there any bug with GL_InvBounds? It doesnt seem to get me any bounds at all.
    3) Is there anyway to force SMART to load runescape in OpenGL mode? because using this plugin, I dont know why, it makes runescape load as safe mode and I have to set it up to OpenGL manually.
    4) Is the include still updated? I mean if there is still someone working on it so in every update or break, things still work fine? Or was it kinda left out the scene?

    I guess that is all! I hope you dont have a hard time answering to them! Thank you very much! I really want people to support OpenGL development since Im loving it so far.

    Thank you all,
    PatriqDesigns
    As far as I know, @Obscurity is working on his obscurityLibrary for OGL functions. It still uses Brandon's plugins but there is talk about updating the plugin.

    There are many of us *cough* who need a full-on noob tutorial in order to figure out how to set up OGL. I think Obscurity is also working on putting something like that too. I managed to convince myself I had everything set up right and then all debug attempts ended with nothing showing up. So if you're like me and need a good ol fashioned tutorial, I suggest ruthlessly mentioning Obscurity and @Clarity out of sheer desperation every chance you get.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

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

    Default

    Quote Originally Posted by 3Garrett3 View Post
    As far as I know, @Obscurity is working on his obscurityLibrary for OGL functions. It still uses Brandon's plugins but there is talk about updating the plugin.

    There are many of us *cough* who need a full-on noob tutorial in order to figure out how to set up OGL. I think Obscurity is also working on putting something like that too. I managed to convince myself I had everything set up right and then all debug attempts ended with nothing showing up. So if you're like me and need a good ol fashioned tutorial, I suggest ruthlessly mentioning Obscurity and @Clarity out of sheer desperation every chance you get.


    works too well
    Attached Images Attached Images
    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.

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

    Default

    1.) No, I wasn't able to get them to work either. Mind you, I last tried a few months ago. If you'd like, I could include something like those into the next release of obscurityLibraryUpload. I'm very grateful for the work that Brandon's been putting into this and would like to lessen his load as much as possible.

    2.) If you're looking for inventory functions, again, obscurityLibraryUpload has obsInventoryCount(), obsInventoryFindItem(), obsInventoryIsFull() and such.

    3.) That's usually based on your graphics card. It does that on my shitty old laptop and/or when I try to load several on my desktop.

    4.) What Garrett said. :P.



    The library's got a big update coming. Had planned for it to be release this weekend, but unexpectedly had the baby brother over for the weekend. Can expect it soon.




    Skype: obscuritySRL@outlook.com

  9. #184
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by grats View Post


    works too well
    Like taking candy from a baby.

    Quote Originally Posted by Obscurity View Post
    The library's got a big update coming. Had planned for it to be release this weekend, but unexpectedly had the baby brother over for the weekend. Can expect it soon.
    Once this update happens will there be a "Nub Guide to OGL" on the horizon? Or should I just continue nagging Clarity when he's away on Skype?

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

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

    Default

    Nagging Clarity. I know he was hoping I'd add to it - so I've been taking a couple minutes here and there to write some stuff up. DW, we won't let you down. :P.




    Skype: obscuritySRL@outlook.com

  11. #186
    Join Date
    Oct 2014
    Location
    With ezreal~
    Posts
    295
    Mentioned
    45 Post(s)
    Quoted
    255 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    As far as I know, @Obscurity is working on his obscurityLibrary for OGL functions. It still uses Brandon's plugins but there is talk about updating the plugin.

    There are many of us *cough* who need a full-on noob tutorial in order to figure out how to set up OGL. I think Obscurity is also working on putting something like that too. I managed to convince myself I had everything set up right and then all debug attempts ended with nothing showing up. So if you're like me and need a good ol fashioned tutorial, I suggest ruthlessly mentioning Obscurity and @Clarity out of sheer desperation every chance you get.
    I figured if I sent them enough dick pics they'd finish it faster... but if you say so.

    The other day there was something obscuring my vision... no wait. There was an @Obscurity in my vision that prevented me from properly viewing the delightful collection of pron that was laying in front of me. I quickly tried to use the tissues that were in my hand to help clear... To help give my vision the @Clarity that it needed.



    It's not gay if it's efficient.

  12. #187
    Join Date
    Feb 2012
    Location
    Portugal
    Posts
    91
    Mentioned
    3 Post(s)
    Quoted
    41 Post(s)

    Default

    I made a script already using this include with ease. I used obscurity include too!
    I just wanted to know how updated this include is.
    I would love to bet more in OpenGL, because is so much better, and has so many possibilities!

    Another thing! Is there any way we could use SRL and GLX? That would be so good! Getting both worlds together!

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

    Default

    Quote Originally Posted by PatriqDesigns View Post
    I made a script already using this include with ease. I used obscurity include too!
    I just wanted to know how updated this include is.
    I would love to bet more in OpenGL, because is so much better, and has so many possibilities!

    Another thing! Is there any way we could use SRL and GLX? That would be so good! Getting both worlds together!
    Yes. I do so in my DG script like this:

    Simba Code:
    program ClarityDG;
    {$DEFINE SRLCOMPATIBILITY}
    {$DEFINE SMART}
    {$I SRL-6/SRL.simba}
    {$I DG-GLX/Setup.simba}
    {$I DG-GLX/Clarity/ClarityGLX.simba}
    {$I DG-GLX/Obscurity/ObscurityGLX.simba}

    The order that you include files is important!

    The includes will default to SRL-6 for SMART image drawing, mouse movement, and some other functions. If you are scripting in OGL you will likely be unable to use many of the interface functions for SRL-6, but then again you wouldn't need to at all.

    @Others, posting the tutorial tonight after Obscurity looks it over and adds his own things. It covers SRL-6 + OGL combination usage more in depth.

  14. #189
    Join Date
    Oct 2014
    Location
    With ezreal~
    Posts
    295
    Mentioned
    45 Post(s)
    Quoted
    255 Post(s)

    Default

    Quote Originally Posted by Clarity View Post
    @Others, posting the tutorial tonight after Obscurity looks it over and adds his own things. It covers SRL-6 + OGL combination usage more in depth.
    I... I love you.




    It's not gay if it's efficient.

  15. #190
    Join Date
    Feb 2012
    Location
    Portugal
    Posts
    91
    Mentioned
    3 Post(s)
    Quoted
    41 Post(s)

    Default

    QK6vJnI.png
    G2lb39i.jpg

    Am I doing something wrong?

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

    Default

    Quote Originally Posted by PatriqDesigns View Post
    QK6vJnI.png
    G2lb39i.jpg

    Am I doing something wrong?
    They are duplicate declarations from the SRL-6 include. Replace them with something like GL_SKILL_ATTACK, GL_SKILL_ etc.

    Should compile then.

  17. #192
    Join Date
    Feb 2012
    Location
    Portugal
    Posts
    91
    Mentioned
    3 Post(s)
    Quoted
    41 Post(s)

    Default

    It keeps sending me to duplicate declarations... :c Wont you be able to provide me your modified GLX include? Thanks once again!

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

    Default

    Quote Originally Posted by PatriqDesigns View Post
    It keeps sending me to duplicate declarations... :c Wont you be able to provide me your modified GLX include? Thanks once again!
    This .ZIP will be outdated pretty soon (library update occurring at tutorial release) but here you go: TutorialGLXPack.zip

    We are also phasing out all these includes for some new, easier to implement stuff. So stay tuned.

  19. #194
    Join Date
    Feb 2012
    Location
    Portugal
    Posts
    91
    Mentioned
    3 Post(s)
    Quoted
    41 Post(s)

    Default

    ibK4T38.jpg
    Whhyyyy???? :c

  20. #195
    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 PatriqDesigns View Post
    ibK4T38.jpg
    Whhyyyy???? :c
    Don't worry man, the real fun starts when you've got everything set up and you run your script for 60 minutes

  21. #196
    Join Date
    Feb 2012
    Location
    Portugal
    Posts
    91
    Mentioned
    3 Post(s)
    Quoted
    41 Post(s)

    Default

    The real fun starts when I will be able to merge color and OpenGL together, and stop depend on color and have a much more precise scripts that will let users run it for days executing pretty complex tasks, like Dung, or like Minigames.

    @Clarity , can you add me on skype for further talk and assist? Or should I just wait for the tutorial that will cover how to use both SRL-6 and GLX together?

  22. #197
    Join Date
    Feb 2012
    Location
    Portugal
    Posts
    91
    Mentioned
    3 Post(s)
    Quoted
    41 Post(s)

    Default

    Still without any luck when it comes to make SRL-6 and GLX compatible :c
    I could really use some help.

  23. #198
    Join Date
    Jan 2012
    Location
    East Coast
    Posts
    733
    Mentioned
    81 Post(s)
    Quoted
    364 Post(s)

    Default

    Quote Originally Posted by PatriqDesigns View Post
    Still without any luck when it comes to make SRL-6 and GLX compatible :c
    I could really use some help.

    Give it a bit, @Clarity and @Obscurity are working on a fix. It has to do with duplications within the includes, so you'd have to look through all of them and see what they are to comment them out. There's no quick fix if you don't know what you're looking for though.

  24. #199
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Why bother with using SRL6 though? Most methods in SRL6 only works for fixed screen + oldsch layout, whereas you can run in resizable with dynamic interface layouts using ogl interception.

  25. #200
    Join Date
    Jan 2012
    Location
    East Coast
    Posts
    733
    Mentioned
    81 Post(s)
    Quoted
    364 Post(s)

    Default

    Quote Originally Posted by riwu View Post
    Why bother with using SRL6 though? Most methods in SRL6 only works for fixed screen + oldsch layout, whereas you can run in resizable with dynamic interface layouts using ogl interception.
    Lots of mouse functions and such are much better in SRL-6.

Page 8 of 9 FirstFirst ... 6789 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
  •