SRL Archive - OSR Combat/Fighting Scripts

[AeroLib] Davi'sRanger


Davi

2015-05-04 05:14:33

Key Features
  • Plays the ranged guild shooting competitions
  • Lines the target up with the close button for faster shooting
  • 20k+ xp per hour
  • Lots of antiban with customizable options
  • A paint to show you the status
  • 100% color

Requirements:
Newest AeroLib
Newest Simba


Set up

Start in the ranged guild by the competition judge with gold to play in your inventory. Limit is in levels gained.
For more xp wield the best longbow possible, accurate shooting style.

Make sure your brightness is on max, Interpreter is Lape.

Please report any bugs or post programs below.

Changelog

v1.033: Added position checking and repositioning when out of position and improved efficiency and speed of talking to the judge.

v1.032: No longer need my interfaces include as it's included with the latest AeroLib, Minor fixes.

v1.031: Experimental release, sans-level handling. 1.03 breaks on level, this one might not. Please report back with data

v1.03: Fixed every error that I could reproduce, lowered the thresh-hold for finding targets, fixed sorting of the ATPA, adjusted timers and added basic support for dismissing randoms.

v1.02: HOPEFULLY fixed a crapton of errors that I created when I updated to 1.01

v1.01: Improved target finding, timing structure and added support for finding the judge when he's underneath you.

v1 : Release

Proggies



niini

2015-05-05 05:40:06

Be interested in this, any proggies?

Davi

2015-05-05 16:36:50

From: niini
Be interested in this, any proggies?


I ran it for about 4 hours straight last night, 70-72 ranged. I didn't save the proggy though.

Hyperion

2015-05-06 01:22:18

Trying out now, will post proggy when I let it finish.
Reserving spot for proggy, yadda yadda.

niini

2015-05-06 08:33:44

Error: Unknown declaration "SMART_ShowConsole" at line 288
Compiling failed.

getting this error, , ill try redoing smart, any other suggestions?

Hyperion

2015-05-06 08:58:20

Timed out: Could not find targets - Terminating script
Thanks for using Davi's Ranger. Ran for: 8 Minutes and 58 Seconds
Successfully executed.


Happens quite frequently, not sure why. Usually looking away when it happens, so I'll pay more attention next time I run it.

Davi

2015-05-06 09:17:43

From: niini
Error: Unknown declaration "SMART_ShowConsole" at line 288
Compiling failed.

getting this error, , ill try redoing smart, any other suggestions?


Sounds like you don't have AeroLib installed properly.

From: zaboomasimba
Happens quite frequently, not sure why. Usually looking away when it happens, so I'll pay more attention next time I run it.


Hm, this is probably because of my laziness in picking colours for the target, I have an update in the works.

Edit: Update posted, should have fixed that error and improved the general quality of the script.

vashanddou

2015-05-06 13:14:40

Misclicked - Trying to find targets
Timed out: Could not complete shooting - Terminating script
Thanks for using Davi's Ranger. Ran for: 4 Minutes and 49 Seconds
Successfully executed.

Yeah he can't find the target a lot. barely runs for 10min for me lol

Davi

2015-05-06 14:26:46

From: vashanddou
Misclicked - Trying to find targets
Timed out: Could not complete shooting - Terminating script
Thanks for using Davi's Ranger. Ran for: 4 Minutes and 49 Seconds
Successfully executed.

Yeah he can't find the target a lot. barely runs for 10min for me lol


Yeah, I broke a lot of stuff with my small update… I spent the last 2 hours trying to fix it all and think I've managed it with 1.02. If not post errors you get now and I'll work on them tomorrow (Have to study for an exam now)

Having said that, finding the target was never an error for me, is your brightness on max?

Pekoni64

2015-05-06 15:32:32

Working atm, going to run it overnight. It definitely should have more antiban though. The clicking pattern is pretty much identical every single time.

vashanddou

2015-05-06 20:57:54

Just tested it, still having trouble finding targets

niini

2015-05-06 21:50:46

From: Davi
Sounds like you don't have AeroLib installed properly.




I'm not so sure,

when I run

program RUNME;
{$DEFINE SMART}
{$DEFINE WALKER}

{$i AeroLib/AeroLib.Simba}

begin
initAL();
end.

I get no errors.

niini

2015-05-06 22:02:15

if you just // the line out it will fix itself actually.

Also a different way to get through the ranging guild is to just spam click the target so your second shot goes off before the screen for the first one pops up - not sure if thats helpful.

Davi

2015-05-07 00:44:54

From: niini
I'm not so sure,

when I run

program RUNME;
{$DEFINE SMART}
{$DEFINE WALKER}

{$i AeroLib/AeroLib.Simba}

begin
initAL();
end.

I get no errors.


Maybe it's not up to date? I'm not sure why hiding smarts console would not be recognised for you.

From: niini
if you just // the line out it will fix itself actually.

Also a different way to get through the ranging guild is to just spam click the target so your second shot goes off before the screen for the first one pops up - not sure if thats helpful.


My first iteration of this script was clicking on a target, then moving the mouse to close the interface then moving to the target again and click- It was pretty slow.

Second iteration was as you said with the spam clicking- However in order to do this method reliably I had to set the delays inhumanly low - Like 50-100 ms. Even with that it would sometimes have to manually close the interfaces, about 1/5 of the time.

This is my 3rd iteration and is how I do the range guild manually.

From: Pekoni64
Working atm, going to run it overnight. It definitely should have more antiban though. The clicking pattern is pretty much identical every single time.


Well it leaves the mouse where it is if it's going to click on a target. Just like a human (I) would do if playing legitimately.
Each time it has to find the targets it randomises where the mouse will end up though.

From: vashanddou
Just tested it, still having trouble finding targets


I am having trouble reproducing this with 1.02 - especially because I temporarily took out the rechecks, it only checks once now at the start of the competition to see if it can find targets.

Edit: I found a number of small errors that may be presenting themselves in different ways for different users - I've fixed these, added a bit more randomisation and added support for dismissing randoms - Running a 1 hour stress test before uploading 1.03

Europe

2015-05-07 05:52:46

This is so extremely annoying,after like 10 it keeps running outside of the fences and script stops


clicked close - no move
clicked target at: 41184
leveled
clicked targetThanks for using Davi's Ranger. Ran for: 10 Minutes and 40 Seconds
Successfully executed.

Keeps running here
[ATTACH=CONFIG]25832[/ATTACH]



Edit : NVM, it now works correctly
Edit 2 : Nope, I was wrong, same problem after 39 minutes.

Please fix this problem


EDIT : The problem keeps happening after leveling


leveled
clicked target at: 35131
Misclicked - Trying to find targets
clicked target at: 47533
Misclicked - Trying to find targets
clicked target at: 59936
Misclicked - Trying to find targets
Timed out: Could not complete shooting - Terminating script
Thanks for using Davi's Ranger. Ran for: 26 Minutes and 5 Seconds
Successfully executed.

Davi

2015-05-07 08:38:19

From: Europe
This is so extremely annoying,after like 10 it keeps running outside of the fences and script stops


clicked close - no move
clicked target at: 41184
leveled
clicked targetThanks for using Davi's Ranger. Ran for: 10 Minutes and 40 Seconds
Successfully executed.

Keeps running here
[ATTACH=CONFIG]25832[/ATTACH]



Edit : NVM, it now works correctly
Edit 2 : Nope, I was wrong, same problem after 39 minutes.

Please fix this problem


EDIT : The problem keeps happening after leveling


leveled
clicked target at: 35131
Misclicked - Trying to find targets
clicked target at: 47533
Misclicked - Trying to find targets
clicked target at: 59936
Misclicked - Trying to find targets
Timed out: Could not complete shooting - Terminating script
Thanks for using Davi's Ranger. Ran for: 26 Minutes and 5 Seconds
Successfully executed.


Yeah I've known about this for a while, the problem is it's extremely difficult for me to test if I've fixed it because I am now 81 range and hardly ever level up. In theory it should NOT be doing that.

Europe

2015-05-07 09:16:01

From: Davi
Yeah I've known about this for a while, the problem is it's extremely difficult for me to test if I've fixed it because I am now 81 range and hardly ever level up. In theory it should NOT be doing that.


How can you fix it?
Is there anything I can do?

iriep12345

2015-05-07 10:00:42

why do i keep getting this Error: Unknown declaration "TARGETSCREEN" at line 597
Compiling failed. i updated aerolib and updated to ur include..

Davi

2015-05-07 10:28:32

From: iriep12345
why do i keep getting this Error: Unknown declaration "TARGETSCREEN" at line 597
Compiling failed. i updated aerolib and updated to ur include..


That error means it can't find the target interface from my include - try redownloading.

Europe

2015-05-07 10:33:52

Yo, how can we fix the missclicks after each level up.

iriep12345

2015-05-07 10:36:05

Ok i managed to make it work but when it logs in it just spins around the screen and than logs out
Timed out: Could not find targets - Terminating script
Thanks for using Davi's Ranger. Ran for: 2 Minutes and 44 Seconds
Successfully executed.

Davi

2015-05-07 11:20:20

From: Europe
Yo, how can we fix the missclicks after each level up.


I told you I have no idea how to fix it as of yet.

From: iriep12345
Ok i managed to make it work but when it logs in it just spins around the screen and than logs out
Timed out: Could not find targets - Terminating script
Thanks for using Davi's Ranger. Ran for: 2 Minutes and 44 Seconds
Successfully executed.


Is your brightness on max?

vashanddou

2015-05-07 12:03:17

(sorry thought of more useful things to say)

EDIT:

Here are some tips that might help

Solution 1:
Your lining up target seems very bot-like how it has to be in the exact corner
The way I've seen this script in the past is soon as it sees its target and slightly lines up it'll start spam clicking it (sometimes this closes the window if fast enough)
Add a statement (idk lape scripting) in the firing loop that if it can't click target to close the target window and find target to shoot again


Solution 2: (better solution IMO but may perform slightly slower)
I feel the main reason it loses the target so much is because you have to have the screen so exact for your script to work, so add in it fires once the screen is level with the target and then even if it fires once then proceeds to close the screen after firing each time until it counts to what? 11 times so it also ends competition, then moves on to starting the competition again. Slow and Steady wins the race.

Davi

2015-05-07 12:12:58

From: vashanddou
I know this is in pascal but maybe reading over this script might help?

https://villavu.com/forum/showthread.php?t=99923&highlight=Archer

When I was more into the scripting side, I always used older scripts as references to fix my problems.


See what that script owner did… was not handle levelling at all.

Europe

2015-05-07 12:50:54

From: Davi
See what that script owner did… was not handle levelling at all.


Well, that's better than how it is now.

vashanddou

2015-05-07 13:06:38

From: Europe
Well, that's better than how it is now.


He's trying his best, don't condescend like that.

Davi

2015-05-07 13:14:59

From: Europe
Well, that's better than how it is now.


Ok I have attached a version with no leveling at all and a version with a slight edit that might fix leveling - nl is no level, b is beta, let me know if either work.

Edit: See main post for current solution.

vashanddou

2015-05-07 13:37:25

1.03 nl


clicked close - no move
clicked target at: 58843
clicked close - no move
Timed out: Could not complete shooting - Terminating script
Thanks for using Davi's Ranger. Ran for: 3 Minutes and 8 Seconds
Successfully executed.
Had 1 shot left when went back on.

1.03b
can't find judge
it found the judge once then just spun the screen trying to find it and logged out

Davi

2015-05-07 13:39:24

From: vashanddou
1.03 nl


clicked close - no move
clicked target at: 58843
clicked close - no move
Timed out: Could not complete shooting - Terminating script
Thanks for using Davi's Ranger. Ran for: 3 Minutes and 8 Seconds
Successfully executed.
Had 1 shot left when went back on.

1.03b
can't find judge
it found the judge once then just spun the screen trying to find it and logged out


wtf - neither of those should be happening.

Edit: I can't reproduce either,

vashanddou

2015-05-07 14:07:33

From: Davi
wtf - neither of those should be happening.

Edit: I can't reproduce either,


Alright so these problems are probably caused because I was using a slower computer testing it on my better one now.

Davi

2015-05-07 14:11:47

From: vashanddou
Alright so these problems are probably caused because I was using a slower computer testing it on my better one now.


Actually I did discover a bug with NL - Here is my fix for the NL version

Edit: See main post.

Davi

2015-05-07 15:55:17

Hello people? I need to know if this works or not so I can fix it. Even if I run it for 7 hours straight I will not level up.

Europe

2015-05-07 19:46:29

For me it works, but still after each level up the script starts missclicking and stops

vashanddou

2015-05-07 22:24:47

Sorry I was at my gf's place testing now lol.

vashanddou

2015-05-07 22:42:57

Paired with SMART[49032]
[AL] Startup complete!
Timed out: Could not complete shooting - Terminating script
Thanks for using Davi's Ranger. Ran for: 14 Minutes and 45 Seconds
Successfully executed.

Davi

2015-05-07 23:57:04

From: vashanddou
Paired with SMART[49032]
[AL] Startup complete!
Timed out: Could not complete shooting - Terminating script
Thanks for using Davi's Ranger. Ran for: 14 Minutes and 45 Seconds
Successfully executed.


You misunderstand, the only thing I'm testing is the level up, any other bugs are on your end.


From: Europe
For me it works, but still after each level up the script starts missclicking and stops


See that's absolutely baffling. There is no special code being executed when it levels up and both clicks check for the uptext of either "fire at target" or "close" before they ever click. Furthermore, the close click waits specifically for the interface to appear before it can be executed and a second target click cannot happen until that happens. SO anyone have any ideas as to why it randomly misclicks when you level up.

In pseudo code target clicking looks like this:

if the mouse is over the target
click
wait until target interface shows up
if the mouse is on the close button
click
otherwise move the mouse to the close button and click

The only explanations I can think of are:
a) that when it levels up it messes with the uptext checking and the interface checking
b) that when it levels up the interface opens for just a brief enough amount of time that all the checks pass, then it is closed by the level up causing the click to come in after they all close.

If either of these are true the version I have attached should fix it, otherwise, could someone just manually walk through a level up and tell me what happens.

paradoxxx

2015-05-08 11:31:11

Mine stops after about 30-40 Minutes because I believe It missclickes the x to close the window after a while and it doesnt know what to do from there because its not closing when it clicks the x (missclicks) I could be wrong, But thats the only reasonable thing I can think of, Because I was testing it yesterday and I came on and the target screen was up, But the script was looking for the judge. Also Get this alot Couldn't grab xp values - will under report. Thanks 15k xp in 44minutes though so not bad

Ps; I Completely believe you should take out the Modal/Pop-up Login when You press play. I would do it myself, But theres more stuff included all wrapped up, But I hate reentering my email and password everytime I need to restart the script so.. Just a suggestion to get a scripted login info…

Davi

2015-05-08 19:42:21

From: paradoxxx
Mine stops after about 30-40 Minutes because I believe It missclickes the x to close the window after a while and it doesnt know what to do from there because its not closing when it clicks the x (missclicks) I could be wrong, But thats the only reasonable thing I can think of, Because I was testing it yesterday and I came on and the target screen was up, But the script was looking for the judge. Also Get this alot Couldn't grab xp values - will under report. Thanks 15k xp in 44minutes though so not bad

Ps; I Completely believe you should take out the Modal/Pop-up Login when You press play. I would do it myself, But theres more stuff included all wrapped up, But I hate reentering my email and password everytime I need to restart the script so.. Just a suggestion to get a scripted login info…


If it misclicks the close button then it enters a loop where it tries to close the interface repeatedly for up to a maximum of 10 seconds.

The under-reporting XP is because it sometimes cannot find the event tickets and doesn't know how much xp you gained, like 1/100 loops.
It's probably because BMPs suck, I'm changing it to a DTM for 1.04.

I'm also in the process of rewriting the entire main loop for 1.04, but it could take a while for this to be released especially as I have an AIO fighter in the works.

The username and password are not necessary if you're already logged in, I often leave them blank and fill in the relevant details: Antirandom and such. I am planning on adding a saving settings option for all of my scripts at a future date.

paradoxxx

2015-05-09 13:23:58

From: Davi
If it misclicks the close button then it enters a loop where it tries to close the interface repeatedly for up to a maximum of 10 seconds.

The under-reporting XP is because it sometimes cannot find the event tickets and doesn't know how much xp you gained, like 1/100 loops.
It's probably because BMPs suck, I'm changing it to a DTM for 1.04.

I'm also in the process of rewriting the entire main loop for 1.04, but it could take a while for this to be released especially as I have an AIO fighter in the works.

The username and password are not necessary if you're already logged in, I often leave them blank and fill in the relevant details: Antirandom and such. I am planning on adding a saving settings option for all of my scripts at a future date.


The only useful thing you actually said here was the under-reporting. Idk what this loop is but it obviously misses. It says on my screen 'Looking for judge' While the target screens open. Then rotates my screen like its looking for the judge. WITHOUT closing the interface, Then it logs out. So idk.. Its also logged out because it wasnt able to find the target, This was after 55minutes. I still think scripting loggin is alot better, And I feel like setting the antirandom req. Is also pointless as 100% will do it everytime so atleast have it on like.. 40-60 when it pops up. That way I can just click start. I use my phone to check my computer while Im at work, So its kinda difficult to enter numbers on it. I can just do it myself tbh its not a big deal at all. I was just recommending it but Thanks. Hope the Aio comes out good.

Oh, Also I have the reenter my info because like I said im at work, And I go afk for a while so i dont babysit it until it shuts off, The script automatically logs you out if something goes wrong usually, And that also requires me to log back in.. So…

Davi

2015-05-10 09:17:41

From: paradoxxx
The only useful thing you actually said here was the under-reporting. Idk what this loop is but it obviously misses. It says on my screen 'Looking for judge' While the target screens open. Then rotates my screen like its looking for the judge. WITHOUT closing the interface, Then it logs out. So idk.. Its also logged out because it wasnt able to find the target, This was after 55minutes. I still think scripting loggin is alot better, And I feel like setting the antirandom req. Is also pointless as 100% will do it everytime so atleast have it on like.. 40-60 when it pops up. That way I can just click start. I use my phone to check my computer while Im at work, So its kinda difficult to enter numbers on it. I can just do it myself tbh its not a big deal at all. I was just recommending it but Thanks. Hope the Aio comes out good.

Oh, Also I have the reenter my info because like I said im at work, And I go afk for a while so i dont babysit it until it shuts off, The script automatically logs you out if something goes wrong usually, And that also requires me to log back in.. So…


Antirandom is just a checkbox, antiban delay is the interval between doing things like checking xp or moving the mouse around randomly - On the default setting it does it 100% of the time as long as the last time was less than 2-8 seconds ago. It checks to do antiban between shooting and talking to the judge.

As for why I told you the process of the misclick check, it was to inform you that from a programming perspective there isn't anything wrong (that I can see) And it cannot be fixed until I get more information.

paradoxxx

2015-05-10 21:42:44

From: Davi
Antirandom is just a checkbox, antiban delay is the interval between doing things like checking xp or moving the mouse around randomly - On the default setting it does it 100% of the time as long as the last time was less than 2-8 seconds ago. It checks to do antiban between shooting and talking to the judge.

As for why I told you the process of the misclick check, it was to inform you that from a programming perspective there isn't anything wrong (that I can see) And it cannot be fixed until I get more information.


I've been trying to run it the last 2 hours, And all it seems to do is not be able to find the target.. It cant line it up so it logs me out, Its happened everytime I go to start it.. But Idk otherwise it isnt really showing any other errors other then not being able to complete it once

Europe

2015-05-11 16:09:35

Works, but not dismissing randoms

Davi

2015-05-12 05:59:08

From: Europe
Works, but not dismissing randoms


Did you enter your Nick? It's needed for random dismissal.

Europe

2015-05-12 06:20:14

Ofcourse I did lol, but it doesn't dismiss it.

Btw, i'm really thankful for your work and dedication on this script but we need this problems fixed to make it perfect :P


EDIT : Just found out my AeroLib was outdated, updated and testing.
Will post results

Europe

2015-05-12 16:59:47

Still has the levelup problem, keeps running outside the fences after each levelup and times out.

Davi

2015-05-15 19:52:57

From: Europe
Ofcourse I did lol, but it doesn't dismiss it.

Btw, i'm really thankful for your work and dedication on this script but we need this problems fixed to make it perfect :P


EDIT : Just found out my AeroLib was outdated, updated and testing.
Will post results


From: Europe
Still has the levelup problem, keeps running outside the fences after each levelup and times out.


So the reason it doesn't dismiss some randoms is because they aren't supported with AeroLib yet- I could use reflection and write my own random dismissal function, but I'd rather not use reflection for this script.

The level up bug should finally be fixed with 1.033 - It will now check your position and reposition you when out of position.

Uploaded now :)

RealBot

2015-05-24 18:05:39

Runs pretty stable till it tries to line up the targets from time to time the camera would keep rotating, if it doesn't start up again it logs you out which is nice. I'm able to run it longer when I lower the anti-ban though.

Stick1234

2015-05-25 18:58:04

Error: Unknown declaration "TARGETSCREEN" at line 596
Compiling failed.

Does anybody know what my problem is here? I have newest aero and everything else is up to date as well.

lolznub

2015-06-08 13:52:26

I haven't been able to get it to run longer then 15 min. It takes a long time for it to line up the target. It will also randomly log out after shooting all of the arrows.

Nxtahata

2015-06-09 05:00:34

58-90 range i get it,i love this script.Perfect working.

iriep12345

2015-06-09 08:32:44

From: Nxtahata
58-90 range i get it,i love this script.Perfect working.


I Dont know if u did that for pc or its real.. i cant get it to work well

captainblast

2015-06-20 14:59:41

Hey Davi, great script, but I really need to suggest a few things. This script is on the verge of being a solid running script, just a few things need to be added to make it unstoppable.

Needs some failsafes bro, if it miss-clicks or logs in already started in competition, it just adjusts camera. It does everything well but if something is off, camera will rotate a few times then log out.

I am going to run it all day and keep checking for errors to help you diagnose it, because I want to see you make this an awesome script! It's on the verge, just needs a few fail safes.


—-

edited list:

[RANDOM] Found NickName
Timed out: Could not complete shooting - Terminating script
Thanks for using Davi's Ranger. Ran for: 1 Hours, 1 Minutes and 24 Seconds
Successfully executed.


When logging back in and trying to talk to the competition judge, he will say "do you need reminding of the rules", the GUI will say lining up target even though the chat dialouge is open with judge on reminding of the rules. This is one of the bigger issues that keeps the script from continually running. Should have a failsafe check for the open chat box with the judge. To reset it I have to drop the arrows again and start the bot over.

—-
edited: 6/22

Got this error today when logging in even though target was in sight and Iw as standing near the competition judge.
Camera kept rotating as well.

[AL] Logging player in…
Timed out: Could not complete shooting - Terminating script
Thanks for using Davi's Ranger. Ran for: 2 Minutes and 21 Seconds
Successfully executed.

jstemper

2015-06-20 17:49:49

Edit: Got it working, but doesn't find the judge very well. The most it ran was for 46 mins. Most of the time this happens;

Timed out: Could not find Judge - Terminating script
Thanks for using Davi's Ranger. Ran for: 2 Minutes and 10 Seconds
Successfully executed.

It seems that it has a hard time re-aligning the target back up at the right corner of the screen