Look at them. They look like a model, not a texture. But yes, they're models.
Models can be drawn over an interface. Just look at the video of ogLivid script. Those livids (plants) on the interface are models.
Look at them. They look like a model, not a texture. But yes, they're models.
Models can be drawn over an interface. Just look at the video of ogLivid script. Those livids (plants) on the interface are models.
Version 2.0 is up, let me know what you guys think.
--- My Scripts ---
Just started to test v2.0 and it cant seem to find the plank even though i was right next to it.
19:53:37 | Adieuxs PestControl v2 > setup
Were outside starting script
First game, starting script...
Reset camera
Distance from plank 91.9673855233474
We werent next to the plank, walking there now
Did not find plank model will try to locate
EDIT: Now it finds the plank but fails to click it, I manually clicked it to see if it would run better and it couldnt find the pests within the game itself.
20:06:32 | Adieuxs PestControl v2 > setup
Were outside starting script
First game, starting script...
Reset camera
Distance from plank 0
Found plank model
We failed to click, retrying
Failed to click too many times, terminating.
Clicked correctly
We made it onto the boat, cool
No antiban right now
Waiting for game to start...
Game started!
Walking to the west
We currently have a target, waiting...
No pests found rotating camera...
No pests found rotating camera...
No pests found rotating camera...
No pests found rotating camera...
No pests found rotating camera...
Couldnt find pests...walking south a bit to see if we can find anything
No pests found rotating camera...
No pests found rotating camera...
No pests found rotating camera...
No pests found rotating camera...
Couldnt find pests after multiple camera rotates, area must be clear. Waiting for next game to start
Failed to get enough damage this game
Reset camera
Distance from plank 0
Found plank model
We failed to click, retrying
Failed to click too many times, terminating.
Terminating...
Successfully executed.
Last edited by BuffaloBill; 08-07-2015 at 12:11 AM.
@BuffaloBill; Really? It is working for me fine. I don't want to sound like a nag, but did you set everything up properly from the OP?
Quite a few things just updated OP https://villavu.com/forum/showthread...11#post1354311
Ahh start it in the boat, theres an issue where if you dont get in the boat then leave the distance is all messed up.
Get in the boat and let me know what happens.
--- My Scripts ---
Nag nag nag lol just kidding I redid my settings to exactly how they were in the OP and what do yah know, it worked perfectly clicking on the plank as well as finding targets
Also just a side note 1 game played and I got a boots pop up which it clicked through PERFECTLY so nice job on that as well!
ill post a proggy before i go to bed!
--- My Scripts ---
Distance from plank 0
Found plank model
Clicked correctly
Distance from plank 4
Found plank model
We failed to click, retrying
Error: Access violation at line 1595
Execution failed.
The following bitmaps were not freed: [0, 1]
This is the problem im having currently.
Last edited by BuffaloBill; 08-07-2015 at 12:59 AM.
--- My Scripts ---
So many people doing PC right now because it is in the spotlight XD
--- My Scripts ---
A few more tips. :P.
From clickOnGangPlank():
I would not use a vertical degrees of 90. It will never reach it and just end up timing out after 2.5-5 seconds. While 90 degrees is looking straight down on your character, in most locations, the furthest you can go is approximately 52 degrees. Keep in mind, mainScreen.setDegrees() and mainScreen.setRadians() have a tolerance of about 10 degrees to make it more realistic.Simba Code:mainscreen.setDegrees(0,90);
From clickOnGangPlank():
This is more an opinion then anything. A distance of 5 can be a lot. Don't quote me on this, but 5 squares from the gangplank, given the right chances, you may end up going into the medium boat. Something like three is reasonable. Again, just my opinion.Simba Code:if (distanceFrom > 5) and (timesResetCamera <= 1) then
//~ Stuff...
mouse.click(minimap.getScreenPosition([59,63]));
Clicking the exact coordinate on the minimap is risky. Add some randomization to it. You can do so by either adding it to the [59,63] itself or to the point returned by minimap.getScreenPosition().
I used 12 because 1 tile is roughly 4px on the minimap.Simba Code:mouse.click(minimap.getScreenPosition([normalRandom(56,62),normalRandom(60,66)]));
//~ Or...
mouse.click(minimap.getScreenPosition([59,63]).randomizePointEllipse(12));[
From waitFlag and startTheGame():
Take a look at interfaces\dialogue.simba. Is has methods for detecting all dialogues, clicking continue, getting the title, contents, prompt, selecting options, etc. It's currently undocumented, but it, as well as minimap, are my next files to be documented and rewritten.Simba Code://~ Stuff...
From getClickResult() and clickOnGangPlank():
It might be safe to also add a chance at using mouse.rightClickOption(). It returns true if the menu options was found, which could be used in place of mouse.getClick(). However, I think even right clicking will trigger mouse.getClick() if selecting 'Cross Gangplank'.Simba Code:mouse.click(sentPlankTPA[0].adjustPosition(0,5).randomizePointEllipse(4));
//~ And...
mouse.click(plankTPA[0].adjustPosition(0,5).randomizePointEllipse(4));
From getOntoBoat():
This is the cause of your access violation. While you're using length(), it's not in an if statement. Therefore, there's nothing checking to ensure that plankTPA[0] even exists. So, it may be trying to adjust the position of a model that hasn't yet been drawn - which can be cause by map loading, etc.Simba Code:length(plankTPA := ogl.getClientMidPoint().closest(ogl.getModels(TCardinalArray([1781393848,2892440677,3763942768,4136683396,4168949912])).getVisible()));
mouse.click(plankTPA[0].adjustPosition(0,5).randomizePointEllipse(4));
Anyways, I'm off to bed so won't have time to comment much more. I hope you don't take this as me nagging at you. As it's your first time using ogLib (and a freaking amazing script at that regardless), I figured I'd help you out a bit and show you some methods that I didn't think you were aware of. .
Last edited by Obscurity; 08-07-2015 at 01:57 AM.
--- My Scripts ---
--- My Scripts ---
Setup everything identicle to you and I still get this;
07:47:09 | Adieuxs PestControl v2.1 > setup
Were outside starting script
First game, starting script...
Reset camera
Distance from plank 91.9673855233474
We werent next to the plank, walking there now
happens regardless of where i start it
Last edited by Calluminati; 08-07-2015 at 06:54 AM.
--- My Scripts ---
--- My Scripts ---
@Calluminati; Not sure what could possibly be going on tbh, when you get on the boat or inside pest control and start it what does the debugger say?
The reason youre getting this error is because it thinks your far away from the gang plank. I've fixed this my self by getting on the boat, leaving and closing out Simba then relaunching. Will look into this more tomorrow since I'm rewriting most of the code.
--- My Scripts ---
There are currently 1 users browsing this thread. (0 members and 1 guests)