how come i get this error: Error: Expected variable of type "array [0..1] of Int32", got "Int32" at line 5, column 12 at line 5
when i try to run anything with ogl.setup(); in it
>:)
Guide updated to reflect the need for ogl.setup(width, height);. This may be altered in the future, but the setup function is now pretty different as you can set the viewport within as well.
Simba Code:ogl.setup([800, 600], [0, 0, 576, 388]);
The above code would configure ogLib for oldschool settings.
Last edited by Clarity; 10-22-2015 at 01:57 AM.
Scripts: ClarityNex | ClaritySlayer | ClarityElfThief | ClarityBurialArmour | ClarityMudRunes | ClarityWells | ClarityProTables | ClarityArmadyl | ClarityHarps
ClarityDominonTower | ClarityAltar | ClarityCitadel | ClarityBarrows | ClarityEsswraith | ChampionScrollCamperTools & Extensions: OpenGL ID Highlight Tool | SRL-6 Messaging System | SRL Companion | Item DTM Generator | BBCode Converter
Massive thanks for the guide!
I'm having a problem, maybe due to incorrect setup, or maybe something else, I'm not sure, but the model IDs are not aligning with their respective onscreen counterpart, and rendering things not very useful:
It's a little blurry, but seen above is the problem, and when I try to click the model, it just clicks the actual ID, which is nowhere near the troll. Any advice?
Try going to 'RS3 Default' Interface settings, since you seem to be on Old School Interface at the moment.
Alternatively, use ogl.setViewPort(0,0,576,388); (see https://villavu.com/forum/showthread...16#post1360316) to continue to use OGL in Old School Interfaces.
OP has been updated with the automatic installation process.
Scripts: ClarityNex | ClaritySlayer | ClarityElfThief | ClarityBurialArmour | ClarityMudRunes | ClarityWells | ClarityProTables | ClarityArmadyl | ClarityHarps
ClarityDominonTower | ClarityAltar | ClarityCitadel | ClarityBarrows | ClarityEsswraith | ChampionScrollCamperTools & Extensions: OpenGL ID Highlight Tool | SRL-6 Messaging System | SRL Companion | Item DTM Generator | BBCode Converter
OP has been updated with an image detailing viewport sizes, courtesy @Obscurity;, and further information on ensuring proper model alignment.
![]()
Last edited by Clarity; 11-19-2015 at 01:17 AM.
Scripts: ClarityNex | ClaritySlayer | ClarityElfThief | ClarityBurialArmour | ClarityMudRunes | ClarityWells | ClarityProTables | ClarityArmadyl | ClarityHarps
ClarityDominonTower | ClarityAltar | ClarityCitadel | ClarityBarrows | ClarityEsswraith | ChampionScrollCamperTools & Extensions: OpenGL ID Highlight Tool | SRL-6 Messaging System | SRL Companion | Item DTM Generator | BBCode Converter
Tutorial updated to reflect no longer needing TCardinalArray() when retrieving multiple models.
Simba Code:myModels := ogl.getModels([ID1, ID2, ID3...]);
Scripts: ClarityNex | ClaritySlayer | ClarityElfThief | ClarityBurialArmour | ClarityMudRunes | ClarityWells | ClarityProTables | ClarityArmadyl | ClarityHarps
ClarityDominonTower | ClarityAltar | ClarityCitadel | ClarityBarrows | ClarityEsswraith | ChampionScrollCamperTools & Extensions: OpenGL ID Highlight Tool | SRL-6 Messaging System | SRL Companion | Item DTM Generator | BBCode Converter
How do I add an auto-login feature to an ogLib script? My current problem is that the script doesn't auto-login, and thus I have to disable SMART, enter login details. Once I'm logged in, I pair Simba to the client, and then start the script. The script then starts a new SMART client and doesn't pair with the original client, thus rendering the script as unusable. Perhaps I'm doing something wrong along the way, but to save me time, is there a way to enter an auto-login feature for ogLib as there is in SRL6?
Thanks for your time, greatly appreciated.
I'll be posting the interface I use for using lobby to select worlds/sort world list later on, here's something that will work for simply logging in for now though.
Code:program ogLib; {$i ogLib\lib\core\core.simba} const USERNAME = 'user'; PASSWORD = 'pass'; // Logs in the player. Clicks login, types in info, and presses enter. procedure loginPlayer(user, pass : String); begin repeat wait(1000); until login.clickLogin(); typeSend(user); KeyDown(9); // Tab Key wait(randomrange(20, 50)); KeyUp(9); wait(randomrange(20, 50)); typeSend(pass); wait(randomrange(200, 500)); if (not ogl.getTextures(1261319).isEmpty()) then mouse.click(TBox([313, 383, 484, 407]), mouse_LEFT) // Login button else begin writeLn('Error logging in.'); terminatescript; end; writeLn('Logged in'); end; procedure skipEmail(); var skip : GlTexturearray; begin skip := ogl.getTextures(91275); if (length(skip) = 13) then mouse.click(TBox([382, 416, 416, 443])); //Skip email verification end; function clickPlay(): boolean; begin mouse.click(TBox([340, 525, 350, 535])); // Play Now button end; begin ogl.setup([800, 600], [0, 0, 800, 600]); if length(ogl.getTextures(3060))>0 then begin exit; // Already logged in end else begin loginPlayer(USERNAME, PASSWORD); wait(1000); skipEmail(); wait(1000); clickPlay(); end; end.
I thought I was the only o e having that SMART issue! Clarity and Ross and everyone else does that seem to.
If I end the script and start it again, it'll attempt to load a new SMART exactly twice (which I close SMART and rerun the script each time), and the third it'll pair.
I believe this can happen when you make a habit of forcibly terminating scripts (pressing stop, then pressing the circular red X rather than waiting). This isn't a great thing to do because it bypasses anything in the termination procedure, such as freeing SMART, bitmaps, DTMs, etc.
I might be wrong though. If you don't have this habit, then it's clearly something else.
Regarding the login procedures, I've never really needed to use auto-login in my entire life so it's been a low priority for me. Most likely we will look at the currently posted methods by other people, optimize them, and push them.
Last edited by Clarity; 12-18-2015 at 04:57 AM.
Scripts: ClarityNex | ClaritySlayer | ClarityElfThief | ClarityBurialArmour | ClarityMudRunes | ClarityWells | ClarityProTables | ClarityArmadyl | ClarityHarps
ClarityDominonTower | ClarityAltar | ClarityCitadel | ClarityBarrows | ClarityEsswraith | ChampionScrollCamperTools & Extensions: OpenGL ID Highlight Tool | SRL-6 Messaging System | SRL Companion | Item DTM Generator | BBCode Converter
Thanks so much for making this guide! Super helpful!
Thanks for this super guide !! Will be trying to script myself soonexciting idea
![]()
Writing a script at the moment, I have hit a dialogue box after right clicking the model and choosing the option, I need the script to engage the dialogue box, how do I do that in OGL?
Only the weak surrender..
The "Attachment 26861" for automatic installation is invalid.
When running ogLib-Setup I get this error: Unknown declaration "init" at line 49
Refers to this line:
_Socket.init();
There are currently 2 users browsing this thread. (0 members and 2 guests)