SRL Archive - Scripts and Snippets

[ogLib] oglPC - Pest Control


Obscurity

2015-04-11 01:55:43

oglPC
By @Clarity and @Obscurity

Last Updated: 2015-04-11




[INDENT=1]Introduction

[/INDENT]

[INDENT=2]Back in January I applied for SRL Membership with a Pest Control script. This script used the GLX and obscurityLibrary includes which were great at the time - but incredibly slow and somewhat unreliable.

Today, that changes. With the release of our new ogLib, the script could be rewritten. This did many things: brought the line count down from ~400 to ~150, added features, added speed and reliability, added reliable player tracking.[/INDENT]

[INDENT=2]What's It Do?

[/INDENT]

[INDENT=3]oglPC is simple yet advanced. While at Pest Control, either in or near the veteran boat or in a game, press the play button!

The script will automatically cross into the nearest boat and wait for a game to start. While waiting, the script may occasionally walk to various squares within the boat.

Once the game starts, the script will run you toward the knight or one of the portals. It will camp this portal for roughly 15 minutes until it chooses another location.

While at the desired location, the script will do pretty much the only thing to do in Pest Control - kill monsters. If the portal opens, and you're not under attack, it'll proceed to attack the portal.

When the game ends, the script will attempt to cross into the boat again. If you manage to get a pair of hybrid boots, it'll choose which ever is closest to the current mouse position. I had hundred of these bloody things.[/INDENT]

[INDENT=2]What's It Need?

[/INDENT]

[INDENT=3]To start off, you need ogLib.

If you've already got ogLib, set you graphics settings to those specified in Figure 5.1 of OpenGL - A Beginner's Scripting Tutorial thread. This is important!

Make sure, in interface settings, that Target reticules are checked!

Set your actionBar set to either momentum or revolution. Keep in mind that revolution will still work with a hidden actionBar but you'll have to set up the appropriate abilities.

Your layout doesn't matter. I typically use something like this screenshot. Keep in mind, there's no need for your inventory or other interfaces and you want as big of a click area as possible. You also do not want your map any smaller then in the image.[/INDENT]



Comment, rate, subscribe, y'know. :P.
Enjoy!

Hoodz

2015-04-11 03:51:03

Gz on release

Obscurity

2015-05-18 13:00:17

Will post a fixed oglPC when I get home! Just realized this won't work with recent ogLib updates.

Sin

2015-05-18 16:23:39

From: Obscurity
Will post a fixed oglPC when I get home! Just realized this won't work with recent ogLib updates.


Sweet, was going to ask you if this still works. Hopefully in time for the double points weekend?

Clarity

2015-05-18 17:05:35

If he doesn't get to it tonight, with his permission I'll post my version that I've been using since today's update. It is SO OP. :)

Obscurity

2015-05-18 19:12:34

oglPC updated! Make sure you (*cough* Taric *Cough*) ensure your plugins are up to date!

Taric

2015-05-18 19:23:29

From: Obscurity
oglPC updated! Make sure you (*cough* Taric *Cough*) ensure your plugins are up to date!


How can I play this off… OOH!

@3Garrett3 forgot to enable smart whenever we were messing around with osrs! There we go. Crisis averted. :stirthepot:

Obscurity

2015-05-18 19:53:35

Since mouse.rightClickOption() doesn't use my new method for reading text (seen in dialogue.simba), detecting spaces and new lines, etc (spaces aren't drawn, the text is just offset)… It still uses my old method and therefore would examine people named, "Supreme attacker Hacktivism". Note the word "attack". I just uploaded a fix for this - in the oglPC script, not the library.

I also made it primarily left-click the plank. It'll have a 1/6 chance of right clicking.

Also increased the wait after selecting boots.



My next push to ogLib will have fixed mouse.rightClickOption().

Sin

2015-05-24 15:17:47

Quick report; it manages to get into the game and walk to a portal, however it doesn't actually seem to attack the monsters. It just right clicks them everytime.

Obscurity

2015-05-24 15:28:49

When did you last update ogLib?

Sin

2015-05-24 15:49:18

Took it out of the main post. @Obscurity today*

Obscurity

2015-05-24 16:02:32

Perhaps your client has different fonts. Add me on Skype.

Sin

2015-05-24 16:04:55

Heading out for a bit, i'll be back in an hour or two and I definitely will. Thanks :)