Ratting bot: anomaly and/or asteroids with Sanderling

I know I will regret this, but… I do like to know about new horizons anyway :slight_smile:
Is your code really doing what you need? cos there are some utcnows but I dont really see where you know on which time DT is. So you are substracting time from utc.now but , that will give you now-variable.

Anyway
Code for DT exit should be really simplified from those else ifs you have to simply:

var RndMin = new Random().Next(12,47);
var UtcNow = DateTime.UtcNow.ToShortTimeString();
var UtcExit = DateTime.UtcNow.Date.AddHours(10).AddMinutes(RndMin).ToShortTimeString();

if(UtcNow == UtcExit)
// do stuff

UtcNow is current utc time in HH:mm format
UtcExit is exit time in HH:mm randomized on minutes eg. 10:38 because we dont want to exit everyday on very same minute, do we?

Because we know exactly when DT is (11:00 UTC) we just pick our exit Time (UtcExit) and then compare actual UTC with our exitUTC. If they match → do stuff, if not, ignore

There is no need to check today, tomorrow, current or anything else.

Best

good for you, you tested your code?
**if you don’t understand some shitty basic math it doesn’t mean the maths are wrong

you do not regret because you have clients who ask this feature.

yeah right, regret is real

sorry to bother m8

I don’t know about your regrets, but I can see you like spamming other posts due to boring all day or some ego’s echoes :slight_smile: :slight_smile: don’t worry, you’ll stay alone here because I will not keep posting.

you seems to be bit rude to my liking for no reason, but do what you need to :wink:

over%20order
I promised at somebody to upload this picture.

keep updated!

It’s your turn to lose some ships :))
Who accept the challenge to lose some ships, say it here and try the updated bot
after 1-2 days repost here your result to take the second reward( big big thanks :)) )
** valid offer until next update

testing latest version. seems bot is not prioritizing ewar frigs anymore.

1 Like

it doesnt make clik on them or it doesnt send drones?
comment like that: ( but will change the ewar targets often, again)

        else if ( null != EWarSelected) // && droneInLocalSpaceIdle)
        {
            //Host.Log("drones change to ewar target"); // it was for debug
            Sanderling.KeyboardPress(attackDrones);
            Host.Log("Some nasty rats, engaging them ");
        }

And I saw with the tethering stuffs he try to warp home first, when you search anomaly (Im working at that)
did you tried the havens?
** and the reward :)) thank you for feedbacks

1 Like

Ok. Bot was ratting for several hours and prioritizing ewar correctly. Then all of a sudden it got triple web and scram, and never detected it. "Some nasty rats, engaging them " never showed up in logs, and it never sent drones. Only bot detected need to armor rep. Could this be an issue with sanderling since bot never detected ewar?

2 Likes

From a month i take alot of disconnects, but yesterday I experimented maybe 10 disconnects from the game, the usual socket closed.
When I traced the route, the last bridge to them was always with a big delay and one another bridge, the same.
This it happens from the start of big war and the guys used ewar to delay the server and not lose their keepstars.
Anyway, this week I lost 2 ships because of that, in the evening.
About the Sanderling in these situations he “lose” some readings. Is normal, since even the game interface “lose” things and connection.
Sometimes he warp home from nothing, it put the message " retreat from hostiles", without the number of hostiles in system, but you are alone in system. And surprise, after you change the interface ( docking) you see the guys there.
Sometimes you take damage but it didn’t appear , even in interface, but the bot detect ( and because of that I modified the script a little to not stop bot on armor low hp and verify the entire hp of ship when you are in tehering zone).
Overall, because of this failures, I had to put plenty of " security" checks and the script become too complicated and hard to add new features. Anyway, I think this is not the fault of Sanderling. Somehow he detects there is something messy because I take this " failures" when are more than 28800-29000 peoples on the server. If are more than 30000 and is a big battle with more than 1200 into a system is completely unstable and his readings are messed, so he didn’t detect.
Anyway, overall, I advise not using the bot more than 4-5 h/ session( mostly in the weekend period). After the each session is better to restart the computer, because of eve server and interface( and eve cache).

2 Likes

Hey, I’ve been using your script while adding and removing some things to make it run smoother and better for me. I have a list of some things you might want to take a look at in your original.

If a rat warps off in a belt, the bot will keep attempting to lock/orbit it from even 800 km out, etc So I added a distance maximum for locking targets and orbiting and when it considers a site finished.

Also, there is some sort of error which pops up very rarely in which the bot will sit in a belt/anomoly with targets locked but not launch drones. I put in extra dronelaunch failsafes to correct that.

2 Likes

yes, why not. you can send me in pm all changes.

Honestly, about 800km it didnt hapened to me, but I still think from the begining at that. I said well, it isnt happen. but if you experienced that, I can add them in script.

It happened to me also, couples times, but since I test all time the script and fix some errors or coding another script, I thought is because of that…
You can send also that in pm and I put that or another failsafes ( you see what I have in mind, but if your solution is better, you can be sure I use that).
And Really thank you for the feedbacks.

1 Like

I’ll send you some snippets later tonight when I get back to my computer, cheers

1 Like

anytime man. anyway, for the next version I planned some things and the next commit will be in max 1 week, after i test them.

I’ve been using this in the InBeltMineStep portion of the code to prevent chasing rats too far, the shinmaneuver portion is added to prevent it from saying the site is finished as we are warping into a site but the rats are showing > 160km

if(!(ListRatOverviewEntry?.FirstOrDefault()?.DistanceMax > 160) && (ShipManeuverTypeEnum.Warp != ManeuverType))
{
Host.Log(“Site Finished because of distance”);
SiteFinished = true;
}

And I put this snippet at the beginning of the defensesteps to make sure it always launches drones if it has a target, there might be a better way to do this, but so far it has been working for me.

if (null != targetSelected && DronesInSpaceCount < 5)
{
DroneLaunch();
}

I have been trying to make it use a mobile tractor unit next and a cloak for safespotting when locals arrive if not using a station or POS as your docking point. If I figure it out I will also post my snippets,
keep up the good work

if (Measurement?.ShipUi?.Indication?.ManeuverType == ShipManeuverTypeEnum.Orbit) //if orbitting something in site, engage defense step
{
return DefenseStep;
}

this snippet in your inbeltmine step, will allow the bot to start defense fighting if already orbitting an object but has no drones out, otherwise as your code sits now, he will just sit there forever tanking.

About launching drones I didn’t pay attention and misread attacking drones ( it happens that to me from time to time and I was glad somebody experiment also that). Actually, he didn’t just sit and tank never and this is a first

I suppose you use sitefinished for more than logout time, because in original is used only for that, and in next version will disappear entirely any usage ( will stay just for show, maybe). What it useful is the return to mainstep( in original).

For (ShipManeuverTypeEnum.Warp != ManeuverType) you can use ReadyForManeuver because if you are just warped to station and you have there some rats at 20km, you are in problems.ReadyForManeuver has docking included the states between warps and static.
if you use

if (null != targetSelected && DronesInSpaceCount < 5)

it means you launch drones even near stargate or station if you target them manual or by error. Also, you launch the drones, even before the orbit or verifying if the site is owned not?
you could use this on right after this lines:

    if (null != targetSelected)
    {
        if (shouldAttackTarget)
        {
  drones launch

exactly because you wanna check the site and take the aggression on the ship. but that depends on fit and sec space.

Defence start because there are rats, not because he orbits. and with that, being in Belt, if other rats come and you are not in orbit ( you take the wrecks) you go back to the first problem because it could happen to not launch the drones, again. So is not a fix, is not solve the situation.
If you want, you can put directly in insitebelt if rats>0 then drones launch and return DefenseStep;

Launching the drones is strictly sticked to how many drones you have in space and in the bay, and here it could be your problem
Do you have window drones big enough to read all drones?
I advise you to put some debug messages inside your code for example:
one at the beginning of defensestep, to see if he entered in defence or not.( but since it targets the rats, he is in defence step)
one between Orbitkeyboard(); and if (DefenseEnter), and so on. Like that you can identify where is the problem.
You have window drones big enough to read all drones? how many drones does it show in stats?

sorry, but in original script if you entered in defensestep, from there you get out only if you are not orbiting ( and get to insitebelt) or return null if you dont have rats. and in this case, you get to mainstep and from there to insitebelt. Also we are a lot of people who use regularly this script and never it happens to not launch the drones and tank.
Im the only one who get the problem with attacking not launching.
So I like a little more documentation on this bug, a log with a lot of debug messages is more than perfect

2 Likes

@Botfather did you transformed the distance from km to m?
I ask you because if you didnt transform the 160 ( you said its km) and since sanderling use m, you actually have there 160m. And, not having rats at distance < than 160m then you will be forever in “site finished” ( remember is used only for timeout session) and orbit and tank , indeed like you said, forever.
And indeed, you need a line like: if you orbit, then enter defense; how you posted early.
Its a common mistake ( myself done it right now, copying your line( I was lazy and not completed myself in sanderling)

1 Like

Now it ignores the rats further than 120km ( configurable in settings)
Warp configurable in settings
Changes in messages :slight_smile: R2D2 love you this time and Master Yoda teach you to feel the Force.
Default settings ( because the bot could be load from the web).
And some other gifts, but I let you use the script and discover them.
As usual, the master branch, open source and free to use:

3 Likes