Gift Anomaly Ratting salvAGE Bot with Sanderling - GARBAGE-2 and measuring his efficiency

script
sanderling
eve-online

#41

the afterburner it starts man.
do you have setup the overview like here?
over%2033
and here are modules
modules
I suggest you to read and setup your overview like here


so, create a tab for combat, named combat with: rats, any pilot, collydables ( broken )and non empty wrecks
and a second tab with all wrecks + the combat setup.


Bot DFADE32F - /*V 1.1.2 This bot ratting anomaly and/or asteroids;It use tethering zone, warp distance configurable from
#42

Now it works fine. 2 hours running with some enemys coming etc. Very nice Job!!
Now i try to start multisession with rdpwrap :slight_smile:


#43

Thanks for the overview guide!


#44

I will put here snippets (2 void), to refill with combat drones the ship and later ( in space ) to move the drones to the folder. These 2 could be add to the script and integrate in the mainstep and at undock

DroneViewEntryGroup DronesInBayListEntry =>
    WindowDrones?.ListView?.Entry?.OfType<DroneViewEntryGroup>()?.FirstOrDefault(Entry => null != Entry?.Caption?.Text?.RegexMatchIfSuccess(@"Drones in bay", RegexOptions.IgnoreCase));
DroneViewEntryGroup DronesInSpaceListEntry =>
    WindowDrones?.ListView?.Entry?.OfType<DroneViewEntryGroup>()?.FirstOrDefault(Entry => null != Entry?.Caption?.Text?.RegexMatchIfSuccess(@"Drones in Local Space", RegexOptions.IgnoreCase));

DroneViewEntryGroup DronesInBayListFolderEntry =>
    WindowDrones?.ListView?.Entry?.OfType<DroneViewEntryGroup>()?.FirstOrDefault(Entry => null != Entry?.Caption?.Text?.RegexMatchIfSuccess(CombatDronesFolder, RegexOptions.IgnoreCase));
DroneViewEntryGroup DronesInSpaceListFolderEntry =>
    WindowDrones?.ListView?.Entry?.OfType<DroneViewEntryGroup>()?.LastOrDefault(Entry => null != Entry?.Caption?.Text?.RegexMatchIfSuccess(CombatDronesFolder, RegexOptions.IgnoreCase));


DroneViewEntryGroup DronesInBayListFolderSalvageEntry =>
    WindowDrones?.ListView?.Entry?.OfType<DroneViewEntryGroup>()?.FirstOrDefault(Entry => null != Entry?.Caption?.Text?.RegexMatchIfSuccess(SalvageDronesFolder, RegexOptions.IgnoreCase));


int? DronesInSpaceCount => DronesInSpaceListEntry?.Caption?.Text?.AsDroneLabel()?.Status?.TryParseInt();
int? DronesInBayCount => DronesInBayListEntry?.Caption?.Text?.AsDroneLabel()?.Status?.TryParseInt();

int? DronesInBaySalvageFolderCount =>DronesInBayListFolderSalvageEntry!= null ? ((int?) (DronesInBayListFolderSalvageEntry?.Caption?.Text?.AsDroneLabel()?.Status?.TryParseInt())): 0;
int? DronesInBayCombatFolderCount =>DronesInBayListFolderEntry!= null ? ((int?) (DronesInBayListFolderEntry?.Caption?.Text?.AsDroneLabel()?.Status?.TryParseInt())): 0;


int? DronesInBayFromFoldersCount => DronesInBaySalvageFolderCount + DronesInBayCombatFolderCount;
DroneViewEntryItem[] AllDrones => WindowDrones?.ListView?.Entry?.OfType<DroneViewEntryItem>()?.ToArray();

void MoveDronesToFolder()
{
while(DronesInBayFromFoldersCount != DronesInBayCount)
{
ClickMenuEntryOnPatternMenuRoot(AllDrones?.FirstOrDefault()?.LabelText?.Where(combatdronename =>combatdronename?.Text?.RegexMatchSuccessIgnoreCase(@LabelNameAttackDrones) ?? false)?.FirstOrDefault(), "Move Drone", CombatDronesFolder);
Host.Delay(444);
ClickMenuEntryOnPatternMenuRoot(AllDrones?.FirstOrDefault()?.LabelText?.Where(salvagedronename =>salvagedronename?.Text?.RegexMatchSuccessIgnoreCase(@LabelNameSalvageDrones) ?? false)?.FirstOrDefault(), "Move Drone", SalvageDronesFolder);
Host.Delay(444);
Host.Log("               moving a drone to his folder");

}

}

and refill


ITreeViewEntry InventoryActiveShipDronesContainer =>
        WindowInventory?.ActiveShipEntry?.TreeEntryFromCargoSpaceType(ShipCargoSpaceTypeEnum.DroneBay);
IInventoryCapacityGauge DronesHoldCapacityMilli =>
    (InventoryActiveShipDronesContainer?.IsSelected ?? false) ? WindowInventory?.SelectedRightInventoryCapacityMilli : null;
int? DronesHoldFillPercent =>DronesHoldCapacityMilli?.Max > 0 ? ((int?)((DronesHoldCapacityMilli?.Used * 100) / DronesHoldCapacityMilli?.Max )) : 0 ;

bool? IsExpanded(IInventoryTreeViewEntryShip shipEntryInInventory) =>
	shipEntryInInventory == null ? null :
	(bool?)((shipEntryInInventory.IsExpanded ?? false) || 0 < (shipEntryInInventory.Child?.Count() ?? 0));

#45

second part refill


void RefillDrones()
{
        EnsureWindowInventoryOpen();
        EnsureWindowInventoryOpenActiveShip();
        var inventoryActiveShip = WindowInventory?.ActiveShipEntry;
        if(InventoryActiveShipDronesContainer == null && !(IsExpanded(inventoryActiveShip) ?? false))
		Sanderling.MouseClickLeft(inventoryActiveShip?.ExpandToggleButton);
	Sanderling.WaitForMeasurement(); 
        Sanderling.MouseClickLeft(InventoryActiveShipDronesContainer);
        Sanderling.WaitForMeasurement(); 
        Host.Delay(3111);
    
        Host.Log("               DronesHoldFillPercent   " +DronesHoldFillPercent+ "");

        if (DronesHoldFillPercent < 90)
       { 

    var HangarContainerLabelRegexPattern =
            InventoryContainerLabelRegexPatternFromContainerName(UnloadDestContainerName);
        var HangarContainer =
            WindowInventory?.LeftTreeListEntry?.SelectMany(entry => new[] { entry }.Concat(entry.EnumerateChildNodeTransitive()))
            ?.FirstOrDefault(entry => entry?.Text?.RegexMatchSuccessIgnoreCase(HangarContainerLabelRegexPattern) ?? false);
             Host.Delay(3111);

        Host.Delay(1111);
        Sanderling.MouseClickLeft(HangarContainer);
        Host.Delay(1111);   
       Sanderling.MouseClickLeft(WindowInventory?.InputText?.FirstOrDefault());
        Sanderling.TextEntry(LabelNameAttackDrones);
        var dronesHoldListItem = WindowInventory?.SelectedRightInventory?.ListView?.Entry?.ToArray();
        var dronesHoldItem = dronesHoldListItem?.FirstOrDefault();
                if (1 < dronesHoldListItem?.Length)
            ClickMenuEntryOnMenuRoot(dronesHoldItem, @"select\s*all");
        Sanderling.WaitForMeasurement(); 
        Sanderling.MouseDragAndDrop(dronesHoldItem , InventoryActiveShipDronesContainer);
	Sanderling.WaitForMeasurement();
       
       var SetQuantityWindow = Measurement?.WindowOther?.FirstOrDefault(w => (w?.Caption.RegexMatchSuccessIgnoreCase("Set Quantity") ?? false));
        var SetOkyButton = Sanderling?.MemoryMeasurementParsed?.Value?.WindowOther?.FirstOrDefault()?.ButtonText?.FirstOrDefault(text => text.Text.RegexMatchSuccessIgnoreCase("ok"));
     Sanderling.WaitForMeasurement();
	if (SetOkyButton !=null)
	{
	Sanderling.MouseClickLeft(SetOkyButton);
    Host.Delay(500);
    }
            Host.Delay(1111);
        Sanderling.MouseClickLeft(WindowInventory?.SelectedRightFilterButtonClear);
           Console.Beep(1500, 200);
           Host.Log("              Filled with Drones the ship");
       }

}

#46

may somebody can tell me what should be wrong, i try to use ratting+commander and get this error:

srry for asking just never ever used c# and code base is kinda big

Error message

RuntimeException: System.AggregateException: Egy vagy több hiba történt. —> System.AggregateException: Egy vagy több hiba történt. —> System.ArgumentOutOfRangeException: StartIndex értéke nem lehet nullánál kisebb.
Paraméter neve: startIndex
a következő helyen: System.String.Remove(Int32 startIndex)
a következő helyen: Submission#0.<>d__0.MoveNext()
— Verem vége nyomkövetés a kivétel előző előfordulási helyétől kezdve —
a következő helyen: System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
a következő helyen: System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
a következő helyen: Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.d__91.MoveNext() --- Verem vége nyomkövetés a kivétel előző előfordulási helyétől kezdve --- a következő helyen: System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() a következő helyen: System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) a következő helyen: Microsoft.CodeAnalysis.Scripting.Script1.d__21.MoveNext()
— Vége a belső kivételek veremkivonatának —
a következő helyen: System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) a következő helyen: BotSharp.ScriptRun.ScriptRun.<>c__DisplayClass75_1.<Start>b__3() a következő helyen: System.Threading.Tasks.Task1.InnerInvoke()
a következő helyen: System.Threading.Tasks.Task.Execute()
— Vége a belső kivételek veremkivonatának —
a következő helyen: System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
a következő helyen: System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
a következő helyen: System.Threading.Tasks.Task.Wait()
a következő helyen: BotSharp.ScriptRun.ScriptRun.<>c__DisplayClass75_0.b__4()
—> (0 számú belső kivétel) System.AggregateException: Egy vagy több hiba történt. —> System.ArgumentOutOfRangeException: StartIndex értéke nem lehet nullánál kisebb.
Paraméter neve: startIndex
a következő helyen: System.String.Remove(Int32 startIndex)
a következő helyen: Submission#0.<>d__0.MoveNext()
— Verem vége nyomkövetés a kivétel előző előfordulási helyétől kezdve —
a következő helyen: System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
a következő helyen: System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
a következő helyen: Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.d__91.MoveNext() --- Verem vége nyomkövetés a kivétel előző előfordulási helyétől kezdve --- a következő helyen: System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() a következő helyen: System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) a következő helyen: Microsoft.CodeAnalysis.Scripting.Script1.d__21.MoveNext()
— Vége a belső kivételek veremkivonatának —
a következő helyen: System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) a következő helyen: BotSharp.ScriptRun.ScriptRun.<>c__DisplayClass75_1.<Start>b__3() a következő helyen: System.Threading.Tasks.Task1.InnerInvoke()
a következő helyen: System.Threading.Tasks.Task.Execute()
—> (0 számú belső kivétel) System.ArgumentOutOfRangeException: StartIndex értéke nem lehet nullánál kisebb.
Paraméter neve: startIndex
a következő helyen: System.String.Remove(Int32 startIndex)
a következő helyen: Submission#0.<>d__0.MoveNext()
— Verem vége nyomkövetés a kivétel előző előfordulási helyétől kezdve —
a következő helyen: System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
a következő helyen: System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
a következő helyen: Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.d__91.MoveNext() --- Verem vége nyomkövetés a kivétel előző előfordulási helyétől kezdve --- a következő helyen: System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() a következő helyen: System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) a következő helyen: Microsoft.CodeAnalysis.Scripting.Script1.d__21.MoveNext()<—
<—

22-56-36.949: status transition from None to Failed.

edit.: i solved the problem it had with the name generation but right after i have a new error :v


#47

What error you have?
Anyway, you donthve to move the mouse t the begining of script because he read the tootips


#48

I don’t do any click, move after I started the bot, if you click on the arrow next to error message, you can see it, I hidden it to not make a 70 line post :slight_smile:

18:22:32.517 [52] : I feel a great disturbance in the Force … taking a nap into station until hostiles go from this system

18:22:28.406 [51] : switch to active ship

spamming this, i cant understand, its sitting in the right ship(with right ship name)
and nobody is in local


#49

switch to ative ship is in the context when it opens your inventory
and if it try to open that means your ship that means you have a problem with that.

while ((RetreatOnNeutralOrHostileInLocal && hostileOrNeutralsInLocal) || tooManyOnLocal)
it goes back to mainstep.
and he try again to open inventory ( but it cannot do that)
and he cannot get out.

dunno what settings and what you changed, or maybe your local is not read.


#50

it says Logout in: 16:23:26 ; Sites 0 ; HP: Shield: % ; Armor: % ; Local Count (MAX) : 14 / 63 ; >> Hostiles: 13 ignored: 0 Drones: (heavy): ( ) <<☾⊙☽>> Msg : Hostiles or too many in local ! >> Rats: ; killedrats 0 ; Loot: ; ISK: 0 ; Targets: ; Cargo: 0% ; Tractors (inactive): 0(0) ; Wrecks: <<☾⊙☽>> NextAct: MainStep

so as i see it says: every local ppl is hostile but idk why, everything is set, local is full of blue and greens…
so it see the local because it can count how many player is there, but idk why its see them as enemy.

if i change this lane : string CharName =firstname.Remove(firstname.IndexOf(" ")).ToLower();
to string CharName =firstname.ToLower(); the program runs(my char dont have " " in its name, but always read in a wrong name(seems like its take the first name from local), idk why.


#51

SOLVED, the ignoring stuff was causing the problem, removed it at all and now seems like its working

other problem: jump to site at 30 and doing stuff so slow, rats start to shoot before it can orbit and i get dmged hard


#52

so you have 16 in local, max is 63 ( setting by you)
and you had 13 reds ( or neutral etc etc)
it seems to me the bot had reason to stay in station.

maybe you are in HS??
Anyway, you deleted completely the condition to stay in station if you have reds

the friends are here:

bool IsNeutralOrEnemy(IChatParticipantEntry participantEntry) =>
   !(participantEntry?.FlagIcon?.Any(flagIcon =>
     new[] { "good standing", "excellent standing", "Pilot is in your (fleet|corporation|alliance)", "Pilot is an ally in one or more of your wars", }
     .Any(goodStandingText =>
flagIcon?.HintText?.RegexMatchSuccessIgnoreCase(goodStandingText) ?? false)) ?? false);

so anyone who is not in ally/corp/good standing with you/your corp is hostile

so you dont have a name like Pew Pew, but pewpew. yes, you have to delete the index of
also, your char name it doesnt have any flag actually, so is here:

var MyOwnChar  = chatLocal?.ParticipantView?.Entry?.FirstOrDefault(myflag =>myflag?.FlagIcon == null);
var firstname = MyOwnChar?.NameLabel?.Text

and, like i explained before, if your char is not visible in local chat, then it cannot take him.
to avoid that you have 2 options ( explained already, but i will do it again)
put directly your name( or any name), because is used only to register a file with stats. You have to delete some lines: 29,30 ( var myownchar and firstname) and chane the string CharName = “anyname”;
OR
make bigger the local chat window, so you are sure it will be visible. also if you have 200 in local, then you cannot see any red coming in local, if he has a name like “xxxx xxxx” ( last letter from alphabet)
and do not forget to set in your overview like i presented above ( everybody in red, except corp, ally and fleet)


#53

you can change at 50, or 100 line 41:

string WarpToAnomalyDistance = "Within 30 km";

but if you take damage too hard …


#54

Yep its fine, ill try to test how far should i jump, but the issue wasn’t config error, in the rat+command 1v1 script there is a ignore string to what neutrals should be ignored(if they camp system or something) and thats somehow fcked up the whole local/hostile autorization, after i removed it the script realised instantly which one is me and not see my mates as hostile.

new question: i want to use auto targeting, i see there is some implementation like
string OmniSup = “Omnidirectional”; // ex: Omnidirectional Tracking Link I ( you can use an autotarget module in place)
string SensorSup = “Sensor”;
string TractorBeast = “Tractor”;
string [] PermanentActive = new [] {
“Omnidirectional”, “Sensor”, “Auto”,

should i make a new string called string Auto=“Auto”; or just ad the omni string “Omnidirectional | Auto” or change sensorsup to “Auto”?


#55

is autotarget, but you can change auto to entire name of module
also

int ? IgnoreListCount  => chatLocal?.ParticipantView?.Entry?.Where(ignoreplayer =>ignoreplayer?.NameLabel?.Text?.RegexMatchSuccessIgnoreCase(IgnoreNeutral) ?? false).ToArray()?.Count() ;

public bool hostileOrNeutralsInLocal => 1+IgnoreListCount < chatLocal?.ParticipantView?.Entry?.Count(IsNeutralOrEnemy);

if ignorelist count is 0 then the count is 1+0 =1 so is ok
at least for me is working daily with ignoring stuff


#56

Idk why my ignoring stuff not worked, simply removed the whole ignoring system and its working flawless except one bug.: if friendly is on site, bot right click on site in probe scanner and instead of ignoring, click on save destination and for name put in a R, than do this in endless loop putting more R-s in it, today ill try to fix this.


#57

it seems your computer is different.
taping R is only when he retreat the drones, but to do that when he is in another void is strange


#58

do you have AltGr on your keyboard?


#59

yes, i have, should i change something than :O?


#60

AltGr in windows presses different keys than you are expecting when pressing Alt.

you have to change your application to use LMENU instead of MENU if you are using VirtualKeyCode.MENU somewhere
That will fix your issues