Fuzzy building A-Bot


#171

Take a look at this thread.


#172

k, i was able to get it work, even drone retrieve when neut enters, on/off mwd and stuff… but one very strange thing i cant really figure out.
There is a problem when on overview are 2 rats, it throws this:

---- Exception ----
System.NullReferenceException: Object reference not set to an instance of an object.
   at Sanderling.ABot.Bot.Task.CombatTask.<get_Component>d__7.MoveNext() in D:\Repos\A-Bot-ORBIT-Player-Detection\src\Sanderling.ABot\Bot\Task\Combat.cs:line 215
   at Bib3.Extension.<EnumeratePathToNodeFromTreeDFirst>d__35`1.MoveNext()
   at Bib3.Extension.<EnumeratePathToNodeFromTreeDFirst>d__35`1.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at Sanderling.ABot.EnumerableExtension.<EnumerateSubsequencesStartingWithFirstElement>d__0`1.MoveNext() in D:\Repos\A-Bot-ORBIT-Player-Detection\src\Sanderling.ABot\EnumerableExtension.cs:line 12
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__1.MoveNext()
   at System.Linq.Enumerable.LastOrDefault[TSource](IEnumerable`1 source)
   at Sanderling.ABot.Bot.BotExtension.TakeSubsequenceWhileUnwantedInferenceRuledOut(IEnumerable`1 listTaskPath) in D:\Repos\A-Bot-ORBIT-Player-Detection\src\Sanderling.ABot\Bot\BotExtension.cs:line 51
   at Sanderling.ABot.Bot.Bot.StepOutputListTaskPath() in D:\Repos\A-Bot-ORBIT-Player-Detection\src\Sanderling.ABot\Bot\Bot.cs:line 65
   at Sanderling.ABot.Bot.Bot.Step(BotStepInput input) in D:\Repos\A-Bot-ORBIT-Player-Detection\src\Sanderling.ABot\Bot\Bot.cs:line 110

It seems like this error is not that uncommon in other projects as well, but i have no clue what to do or how to downgrade something somewhere :slight_smile:

any help?


#173

actually the distance 60000 is not really defined ( I’m not a programmer so …). I erased this code line. if you orbit at 30-35 km you don’t need that. Also, you orbit around an broken and he isn’t in the center of anomaly, so sometime you are at 63-67 km, other time at 35 of rats.


#174

actually that fixed it … :wink: thanks

now it is running without errors.

I’ll be tweaking it more tho, as drones gets aggro by small shits so i need bot to kill them first. Anyways, thanks for good solid basics :slight_smile:


#175

basics… lols. Last time was 15 years ago when I played with bot scripts; and Im not an programmer

the orbit branch has some flaws:
it doesn’t deactivate the afterburner ( for warping/return drones)
the combat script it more too complicate
betwen anomalys, you have to stop the ship, return the drones etc
the information window, I posted the code
it doesnt make refresh at probe window ( personnally i put the refresh in warp state, so i can ignore the ocupied anomalys)
if somebody come to your anomaly and you are in combat state, the bot try to leave the anomaly ( i lost 10 drones with that).
You have to add corp players not only blues and if some red appear on overview you have to warp ASAP ( just to be sure). Also like that you can get away from anomaly if you have more than 10 rats
for save ship you have to develop the script: stop ship, return drones, activate the armor repairer, align and go home.
Also, for ignore anomalys, you can expand the code: so you can ignore/warp from same task not only with km, but any other anomaly ( you dont need anomaly skip)

if you find an commander ( faction rat) you HAVE TO take the 100 mil loot ( i still have to do that manually )
If you do havens in vni you need differents tactics( bigger orbit, passing drones from aggressive to passive mode - actually you cant do that)
Id like to implement the delay, like in sanderling.
Id like to find a way to stop the bot ( for downtime). You can use the trigger from notifications feed ( tooltips, label text ) go in station, dock, and close for diner. but you can’t stop the bot - actually you can, but im lazy /busy for now… you put an condition undock task … if you dont have the notification, you can undock -or you can use internet time but personnally i cannot do that))
ah and changing the ship in station… i cannot do that -in code lines ( so you see, im not good enough)

Overall, you have to learn from others: dont use too many bots, is better to keep an eye on him because you can be banned .And mostly, dont bot more than 6-7 hours, … with the same char. Additionnaly, try to customise the bot so the moves look more … humans. if you use vni, use the speed vni, not the one on armor


#176

for the drones aggro … use 2 speed navigation module and an omni in low. or an omni in midle with speed targeting script.


#177

all mentioned by you, i’ve already fixed… so bot now deactivate ab, return drones etc.

there are some small flaws, but not so many, will work on those later on.


#178

maybe I miss uderstood but bot not already realise if i use a VNI with 100mn orbit fit, and use it to rat?
Just because my bot just went to a sanctum not moved even a littlebit and just died.


#179

Good evening my friends, I’m editing a personal use BOT and I’m trying to do some implementations, but I’m having two problems, if anyone can help me I appreciate it.

1- When it disables the afterburner module, it continues selecting it until the full cycle and it turns off, is there any way it can check the afterburner that has already been selected to disable? Maybe check the color around the module that turns red?

Code

if (ab.IsActive(Bot) ?? false)
{
yield return new BotTask { Effects = new[] { ab.MouseClick(BotEngine.Motor.MouseButtonIdEnum.Left) } };
}

2- I want to be checked if there is any module in the ship, if it does not have a Retreat, so if I’m in a pod it will get out of the anomaly.

Code

I do not have this code yet


#180

To detect if is capsule i use windowinventory( see my scripts).
For afterburner you can use module?.is rampactive?? False or/and is glowing,(taping from phone, i dont have the code and sanderling in front or my eyes to give you the exact code)


#181

1]
here is what you are looking for

2]
do not check modules, but check if you have drone window, it’s way quicker and all ratting ships should have at least two drones anyway.


#182

You can detect this with the BusyVisible property on the ship module.


#183

I managed to make it work perfectly, thanks for the help.