Page 3 of 9 FirstFirst 12345 ... LastLast
Results 51 to 75 of 220

Thread: OpenGL plugins

  1. #51
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    @Brandon
    Edit: ignore all that

    Paired with SMART[4328]
    Exception in Script: Runtime error: "Access violation" at line 10, column 11
    The following bitmaps were not freed: [0]

    ^That one?
    Simba Code:
    {$DEFINE SMART8}
    {$include GLX/GLXCore.Simba}
    {$include GLX/Misc/Smart.Simba}


    var
      T: TSmart;
    begin
      T.Create(1350, 650, '', ['OpenGL32.dll']);
      glxdebug(2,0,0,0,T.Width,T.Height);
      T.GetGraphics().Clear;
    end.
    Last edited by NKN; 08-08-2013 at 05:10 AM.

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

    Default

    Quote Originally Posted by NKN View Post
    @Brandon
    Edit: ignore all that
    You can't expect to ask the plugin to draw without first telling it what to draw or do anything without first telling it which Smart/Browser/Applet to hook.

    Simba Code:
    {$include GLX/GLXCore.Simba}
    {$include GLX/Misc/Smart.Simba}


    var
      T: TSmart;
    begin
      T.Create(1350, 650, '', ['OpenGL32.dll']);
      glXMapHooks(T.ID);  //You must tell it which Smart to hook for now.
      glDebug(GL_MODE_TEXTURES, 0, 0, 0, T.Width, T.Height); //Use the functions in the include. It's easier. Though you were right anyway.
      T.GetGraphics().Clear;
      TerminateScript; //For lape since it doesn't have AddOnTerminate yet.
    end.
    Last edited by Brandon; 08-08-2013 at 05:26 AM.
    I am Ggzz..
    Hackintosher

  3. #53
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default

    I feel stupid for asking these kind of questions, but the whole reflection/OpenGL etc side of Botting is new to me.

    I went into the options for OPENGL In RS and it says I can't

    Last edited by xtrapsp; 08-15-2013 at 10:35 AM.

  4. #54
    Join Date
    Jul 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    I'm sorry in advanced for my noobie question but I am new to simba.
    I dropped the GLX and gl hook in includes, and the plugins into plugins, thats it right? Nothing else?
    Also, after I've done this, how can I make a script compatible with rs3? Will it need work or can I just go ahead and run?
    Again, I'm very sorry for my noobiness but I'm new.

  5. #55
    Join Date
    Nov 2011
    Posts
    1,268
    Mentioned
    17 Post(s)
    Quoted
    217 Post(s)

    Default

    Quote Originally Posted by JhzBlanco View Post
    I'm sorry in advanced for my noobie question but I am new to simba.
    I dropped the GLX and gl hook in includes, and the plugins into plugins, thats it right? Nothing else?
    Also, after I've done this, how can I make a script compatible with rs3? Will it need work or can I just go ahead and run?
    Again, I'm very sorry for my noobiness but I'm new.
    You need to rewrite it entirely. The OGL functions work differently from SRL functions and even have different names. If you have a script, it is most likely RS2+Pascal Script. OGL is Lape based so right there, you have some compatibility issues.

    Replicating the functions is not hard if you know what you are doing. I rewrote a 2.5k line script in a couple days to work with OGL/RS3. You just need to learn some scripting.

    Quote Originally Posted by xtrapsp View Post
    I feel stupid for asking these kind of questions, but the whole reflection/OpenGL etc side of Botting is new to me.

    I went into the options for OPENGL In RS and it says I can't

    Find Preference.dat and Preference2.dat and delete them from your Disk. You might have multiple copies so search for the files. Also make sure you have only 32-bit Java 7 installed. JRE version, if you have the JDK, you need to add JRE to your path, google can help with that. If you do that, you should be able to switch into OGL mode.
    Last edited by Justin; 08-18-2013 at 05:55 AM.
    GLH Tutorial ~ OpenGL Scripting
    http://villavu.com/forum/showthread.php?p=1292150

    GLH Scripts ~ Abyssal Scripts
    http://villavu.com/forum/showthread.php?p=1293187
    Current Projects:
    A) DemiseSlayer Pro (Released/100%).
    B) Demise Power Miner(Released/100%).
    C) Demise Pyramid Plunder(Planning Stage/0%).

  6. #56
    Join Date
    Jul 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    I don't know how to script :/
    are there any scripts atm? meanwhile I do hours of research to learn how to code? :/

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

    Default

    Anyone unable to get into OpenGL/DirectX modes and don't know how to modify the path or having problems doing it then simply read:

    http://villavu.com/forum/showthread....87#post1262087

    Otherwise just compile the dev Smart yourself if you wish or modify the path properly. Scripting for OpenGL is the same as any other methods of scripting. So once you can script with colour, you can script with OpenGL. There is no specific tutorials because they're unnecessary.. The functions are named the same as their colour counterparts..

    The include for the new smart is already done..

    Smart.Simba (Line 46): https://github.com/Brandon-T/SRL-GLX...sc/Smart.simba

    If you still use the old/current Smart then: https://github.com/Brandon-T/SRL-GLX...mart8API.simba

    Either way.. I shouldn't really hear many problems about loading or anything once Smart is released itself because the include already works with it and I've been using it from the very first day. If your Smart cannot get into OpenGL mode normally (WITHOUT the plugin) then you won't get into OpenGL mode WITH the plugin..
    Last edited by Brandon; 08-18-2013 at 12:48 AM.
    I am Ggzz..
    Hackintosher

  8. #58
    Join Date
    Jul 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Brandon, are you aware of any scripts that are working for rs3 with this?
    It would really help(:
    I intend on learning how to script but I would like to bot while I learn :P

  9. #59
    Join Date
    Nov 2011
    Posts
    1,268
    Mentioned
    17 Post(s)
    Quoted
    217 Post(s)

    Default

    Somewhere in this thread, he has posted a fishing script, why don't you give it a try?
    GLH Tutorial ~ OpenGL Scripting
    http://villavu.com/forum/showthread.php?p=1292150

    GLH Scripts ~ Abyssal Scripts
    http://villavu.com/forum/showthread.php?p=1293187
    Current Projects:
    A) DemiseSlayer Pro (Released/100%).
    B) Demise Power Miner(Released/100%).
    C) Demise Pyramid Plunder(Planning Stage/0%).

  10. #60
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,691
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by Dgby714 View Post
    The latest API is still 2, for some reason that WriteLn is incorrect, it should say API < 2 not <=. https://github.com/MerlijnWajer/Simb...read.pas#L1589
    Has this been fixed yet?



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  11. #61
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    Has this been fixed yet?
    No >..>, One sec...

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  12. #62
    Join Date
    Jul 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Exception in Script: Plugin(GLX32) has not been found
    I got that while trying to run Brandon's barb fishing script, any help please?

  13. #63
    Join Date
    Jun 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    are the model coordinates supposed to be on screen coordinates or in world? either way they seem to be off for me as they jump around depending on where the camera is and how far zoomed in you are

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

    Default

    Quote Originally Posted by Amaranth79 View Post
    are the model coordinates supposed to be on screen coordinates or in world? either way they seem to be off for me as they jump around depending on where the camera is and how far zoomed in you are

    This does not explain anything to me. I don't know what you mean by "jump around". Coordinates are projected from world coordinates to your screen. It does not project based on your camera or your RS setup. It projects based on the matrices passed to the GFX.

    I'm fairly certain it is projected right as it just uses gluUnProject (isn't done manually). I'm botting divination using the include so it can't be off :S Only models that fly are a bit off because their height is on a different tile.

    Unless you mean something else. In that case, care to elaborate more?
    Last edited by Brandon; 09-08-2013 at 10:56 PM.
    I am Ggzz..
    Hackintosher

  15. #65
    Join Date
    Jun 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    well i'm trying to identity the bank booth models (or npc, or some way of depositing), so i tried iterating through glGetModels(), and drawing the ID over the model.
    //T is my TSmart instance
    glModels := glGetModels();
    numModels := high(glModels);
    for i:=0 to numModels do
    begin
    t.getgraphics().DrawClippedText(inttostr(glModels[i].id), 'FriendChars', Point(glModels[i].x, glModels[i].y));
    end;
    but for whatever reason, the labels dont seem to match up with any object.
    image1.pngimage2.png

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

    Default

    Quote Originally Posted by Amaranth79 View Post
    well i'm trying to identity the bank booth models (or npc, or some way of depositing), so i tried iterating through glGetModels(), and drawing the ID over the model.


    There is a function for that.

    Simba Code:
    glDebug(GL_MODE_MODELS, 0, 0, 0, T.Width, T.Height); //where T is your TSmart instance.

    If it is still off, then you must have done 3D-world editing. Try another preset and let me know if it fixes it.
    Last edited by Brandon; 09-09-2013 at 12:30 AM.
    I am Ggzz..
    Hackintosher

  17. #67
    Join Date
    Jun 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    gldebug is supposed to label all the models? (or textures etc depending on the first parameter?)
    also does running a 64bit OS make any difference?

    edit: gldebug(...) only works after calling glxViewPort()

    further edit: fixed my problem, the coordinates are right if the 3d game window takes up the full view port (ie glxViewport returns an 800x600 window, so it works in classic layout where the 3D component is 800x600.
    Last edited by Amaranth79; 09-09-2013 at 12:58 AM.

  18. #68
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    @Brandon Does the LocationPoint to MM take the compass angle into account?

    Also a lot of the github links are broken

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

    Default

    Quote Originally Posted by Amaranth79 View Post
    gldebug is supposed to label all the models? (or textures etc depending on the first parameter?)
    also does running a 64bit OS make any difference?

    edit: gldebug(...) only works after calling glxViewPort()

    further edit: fixed my problem, the coordinates are right if the 3d game window takes up the full view port (ie glxViewport returns an 800x600 window, so it works in classic layout where the 3D component is 800x600.
    Your plugins must be old. You shouldn't have to do anything with the viewport to get rendering to work. And yeah I'm aware that it messes up in that 800x600 Viewport. However, since everything is auto-detected any way, it shouldn't have a problem working in any other layout other than Oldschool. I could fix it but it's just as easy to re-arrange another layout.

    I will fix it eventually but I got other things I'm working on. Not to mention I gotta finish the include.


    Quote Originally Posted by Officer Barbrady View Post
    @Brandon Does the LocationPoint to MM take the compass angle into account?

    Also a lot of the github links are broken

    No it does not. If you're talking about the walking thing on the OP (LocalPosToMM)? I had partial walking working but Iunno where I put it. It was SPS-like where I ran around all of runescape saving the maps. Either way, that would be the only thing needed to get walking working.. Maps.. But again, to answer your question, it doesn't take angle into account because the algorithm gives your position regardless of whether the map is rotated or not. Only thing you need to do is convert that to a point on the MM and that will definitely need to take angle into account.

    I updated the OP.. I was aware the links were broken because I removed them all and I changed everything on my Github..
    Last edited by Brandon; 09-09-2013 at 01:49 AM.
    I am Ggzz..
    Hackintosher

  20. #70
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    too long
    Thanks, I looked at the reflection TileToMM and I think this should work (assuming every 4 pixels on the minimap = 1 tile.. this may have to be ajusted, also is MMCX and MMCY is the direct center of the minimap AKA were the player square is located right?)


    99.99% Benlands. (I named the function therfor get .001% credit tee hee)
    Simba Code:
    function GLX_TileToMM(Tile:TPoint):TPoint;
    var
      Location:TPoint;
      angle, tileX, tileY:Extended;
    begin
      angle := GL_CompassRad;
      Location := GetLocalPos;
      tileX := ((Tile.x - Location.x) * 4);
      tileY := ((Location.y - Tile.y) * 4);
      result.x := round(tileX *cos(angle) + tileY*sin(angle)) + MMCX;
      result.y := round(tileY*cos(angle) - tileX*sin(angle)) + MMCY;
    end;

    then ofc walking would be easy
    Simba Code:
    function walkTile(Point:TPoint):boolean
    var
      pnt:TPoint;
    begin
      pnt := GLX_TileToMM(Point);
      Mouse(pnt.x, pnt.y, 2, 2);
      wait(random(200) + 250);
      result := FlagPresent;
      while (FlagPresent) do
        wait(random(50) + 25);
    end;

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

    Default

    Quote Originally Posted by Officer Barbrady View Post
    Thanks, I looked at the reflection TileToMM and I think this should work (assuming every 4 pixels on the minimap = 1 tile.. this may have to be ajusted, also is MMCX and MMCY is the direct center of the minimap AKA were the player square is located right?)


    99.99% Benlands. (I named the function therfor get .001% credit tee hee)
    Simba Code:
    function GLX_TileToMM(Tile:TPoint):TPoint;
    var
      Location:TPoint;
      angle, tileX, tileY:Extended;
    begin
      angle := GL_CompassRad;
      Location := GetLocalPos;
      tileX := ((Tile.x - Location.x) * 4);
      tileY := ((Location.y - Tile.y) * 4);
      result.x := round(tileX *cos(angle) + tileY*sin(angle)) + MMCX;
      result.y := round(tileY*cos(angle) - tileX*sin(angle)) + MMCY;
    end;

    then ofc walking would be easy
    Simba Code:
    function walkTile(Point:TPoint):boolean
    var
      pnt:TPoint;
    begin
      pnt := GLX_TileToMM(Point);
      Mouse(pnt.x, pnt.y, 2, 2);
      wait(random(200) + 250);
      result := FlagPresent;
      while (FlagPresent) do
        wait(random(50) + 25);
    end;


    Uhh that will never work. Well I tested it and the point is not even close the to MM.. It's far off. Isn't that algorithm for OSRS?

    My math skills isn't all that great anymore but I managed to come up with:

    Simba Code:
    Function MSToMM(P: TPoint): TPoint;
    var
      MMBounds: TBox;
      X1, Y1, X2, Y2: Integer;
      TL, BL, BR, TR: FloatPoint;
      W, H, DX, DY, RatioX, RatioY, Angle: Extended;
    begin
      MMBounds := GL_MMBounds;
      GLXViewPort(X1, Y1, X2, Y2); //Should really use player location but this works well enough.
      W := X2 - X1; H := Y2 - Y1;
      RatioX := W / MMBounds.Width;
      RatioY := H / MMBounds.Height;

      DX := (P.X - (W / 2));
      DY := (P.Y - (H / 2));
      DX := DX / RatioX;
      DY := DY / RatioY;

      P.X := MMBounds.MidPoint.X;
      P.Y := MMBounds.MidPoint.Y;

      GL_GetMapCoords(TL, BL, BR, TR);
      Angle := FixRad(ArcTan2(TR.Y - TL.Y, TR.X - TL.X));
      Result.X := Round(P.X + DX);
      Result.Y := Round(P.Y + DY);
      Result := RotatePoint(Result, Angle, P.X, P.Y);
      //Result.X := Result.X + (MMBounds.Width div 256); //Needed if the minimap is HUGE.
      //Result.Y := Result.Y - (MMBounds.Height div 64); //Needed if the minimap is HUGE.
    end;

    which works pretty well.
    Last edited by Brandon; 09-09-2013 at 04:54 AM.
    I am Ggzz..
    Hackintosher

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

    Default

    @Brandon
    Is it possible to add a Bounds field to the glModel record (like glTexture)? The Bounds would be the maximum rectangular bound of the model in which it is completely filled, so that instead of clicking on the model's x,y with an arbitrary rx, ry randomness, we can simply click the Bounds
    .
    Or overload glGetModels to have one that can retrieve all points of the model (so that we can manipulate the points for our desired intent)
    Last edited by riwu; 09-10-2013 at 12:28 PM.

  23. #73
    Join Date
    Jun 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    what about the world space coordinates? could that possibly be used for getting the users global location (assuming you know your model ID)

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

    Default

    Bounds clicking is possible but I removed it. There was a function that gets vertices for every model and allowed you to click whichever one you wanted.. However, I got complaints about lag from ppl with old and crappy computers, and so I removed it..

    For world space coordinates. OpenGL knows no such thing and there is no way to get it without doing some hacky stuff. Only way to actually get it normally would be to create SPS for OpenGL.
    I am Ggzz..
    Hackintosher

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

    Default

    Quote Originally Posted by Brandon View Post
    Bounds clicking is possible but I removed it. There was a function that gets vertices for every model and allowed you to click whichever one you wanted.. However, I got complaints about lag from ppl with old and crappy computers, and so I removed it..

    For world space coordinates. OpenGL knows no such thing and there is no way to get it without doing some hacky stuff. Only way to actually get it normally would be to create SPS for OpenGL.
    Make it such that the points are only retrieved if you pass a boolean arg to the function? So ppl with latency problems can simply ignore the TPA field of glModel.

    Also can u get on irc chat? i'm facing a strange problem with glGetChars() atm in which Simba would beep 4 times and the result would be like half way break off:
    Code:
    [{TEXTUREID = 16777215, COLOUR = 281, X = 182, Y = 85, LETTER =

    EDIT: found the problem @ https://github.com/Brandon-T/SRL-GLX...#GLXCore.simba
    Last edited by riwu; 09-11-2013 at 01:11 PM.

Page 3 of 9 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
  •