MARVEL script, ratting at a new level

eve-online
sanderling
#41

Hi Kaboonu!
I have try also the script and get also a NullExeption.

[
  {
    "TimeDateTimeIntraDayCal": "19.06.24",
    "TimeDateTimeIntraSecMilliString": "150",
    "CaptionString": "System.AggregateException: Mindestens ein Fehler ist aufgetreten. ---> System.ArgumentNullException: Der Wert darf nicht NULL sein.\r\nParametername: key\r\n   bei System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)\r\n   bei System.Collections.Generic.Dictionary`2.FindEntry(TKey key)\r\n   bei System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)\r\n   bei Submission#0.<<Initialize>>d__0.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   bei Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.<RunSubmissionsAsync>d__9`1.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   bei Microsoft.CodeAnalysis.Scripting.Script`1.<RunSubmissionsAsync>d__21.MoveNext()\r\n   --- Ende der internen Ausnahmestapelüberwachung ---\r\n   bei System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)\r\n   bei BotSharp.ScriptRun.ScriptRun.<>c__DisplayClass61_0.<Start>b__0()\r\n---> (Interne Ausnahme #0) System.ArgumentNullException: Der Wert darf nicht NULL sein.\r\nParametername: key\r\n   bei System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)\r\n   bei System.Collections.Generic.Dictionary`2.FindEntry(TKey key)\r\n   bei System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)\r\n   bei Submission#0.<<Initialize>>d__0.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   bei Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.<RunSubmissionsAsync>d__9`1.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   bei Microsoft.CodeAnalysis.Scripting.Script`1.<RunSubmissionsAsync>d__21.MoveNext()<---\r\n",
    "LineIndex": 32,
    "CharacterIndexInLine": 0,
    "LineIndexInAvalonEdit": 33,
    "CharacterIndexInLineInAvalonEdit": 1
  }
]

i have this put inside the script:


string VersionScript = "MARBEL-1v3 ";//do not change
//	begin of configuration section ->
// new System.Media.SoundPlayer(@"C:\sw4-force.wav").Play();
    Host.Log( "Gathering and processing some info to be used later ");
    Host.Delay(2111);
//important to change
string StationHomeName = "Hek VIII - Moon 12 - Boundless Creation Factory ( Minmatar Industrial Station )";//|station2
string IgnoreNeutral = "player1|player2"; //
string MyCorpo = "[EXXXX]";
var InfoPannelRegion =
    Measurement?.InfoPanelCurrentSystem?.HeaderText.RemoveXmlTag()?.Trim();
var CurrentRegion = InfoPannelRegion.Substring(InfoPannelRegion.LastIndexOf(' ')).TrimStart();
var CurrentSystem = InfoPannelRegion.Substring(0,InfoPannelRegion.IndexOf(' ')).TrimEnd();
var MyOwnChar  = chatLocal?.ParticipantView?.Entry?.FirstOrDefault(myflag =>myflag?.FlagIcon == null);
string CharName = MyOwnChar?.NameLabel?.Text.ToLower();

string MTUName;
Dictionary<string,string> NamingMtu=new Dictionary<string,string>();
NamingMtu.Add("XxxXxxxx", "Mobile Tractor Unit");
//NamingMtu.Add("mychar2", "2mtu");
NamingMtu.TryGetValue(CharName,out MTUName);
string WarpToAnomalyDistance = "Within 30 km";
string RattingShipName = "OhOh"; //|Vexor
string SalvageShipName = "Noctis|Gnosis";
var UseMissiles = true;
string MissilesName = "Caldari Navy Scourge Light Missile";
string QuantityMissiles = "2000";
int MinInLauncher = 19;
////usual to change

Maybe you put some examples in the recommende Field. Like station name.

1 Like
#42

is too long man, you dont need to put entire name, and from here i think you have the error
put

string StationHomeName = "Boundless";
NamingMtu.Add("NAME YOUR CHAR", "Mobile Tractor Unit");

post an pastebin script in pm, to see exactly what you have

**later

and you have to add your region, I think. to have drones name

1 Like
#43

Awesome work but for some reason I am getting an error.

Set everything up but when the bot undocks and looks for an anomaly I get a “Value cannot be null” in reference to “get_listOverviewMtu”

I also notice that the bot appears to search for items in the window but no text is input, so when it’s refilling drones I assume it is trying to search for republic fleet etc but no text is input so it ends up trying to put an mtu in the drone bay.

Any advice welcome, looks really nice just not sure what I’ve done wrong haha :slight_smile:

---> (Inner Exception #0) System.ArgumentNullException: Value cannot be null.
Parameter name: pattern
   at System.Text.RegularExpressions.Regex..ctor(String pattern, RegexOptions options, TimeSpan matchTimeout, Boolean useCache)
   at System.Text.RegularExpressions.Regex.Match(String input, String pattern, RegexOptions options)
   at BotEngine.Common.RegexExtension.RegexMatchSuccess(String input, String regexPattern, RegexOptions regexOptions)
   at BotEngine.Common.RegexExtension.RegexMatchSuccessIgnoreCase(String input, String regexPattern, RegexOptions regexOptions)
   at Submission#0.<get_listOverviewMtu>b__213_0(IOverviewEntry mtu)
   at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Submission#0.get_listOverviewMtu()
   at Submission#0.MainStep()
   at Submission#0.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
#44

Welcome @Skye , and congratulation for first post :wink:

the scripts are really complex, and more settings are based on older scripts, and their settings. That’s why I have made the wiki page, a place where I wrote ( and now, update) a helper to fill in the settings. And a guide of how to post your problems.
In your case is really simple:
you used on NamingMtu.Add(“mychar1”, “1mtu”); a combination of minuscules and Majuscules, or maybe 2 words… it have to be in minuscule and only one word is enough.
Because your dictionary is not ok, , when he undock and go in mainstep he has an error at

listOverviewMtu

that also it happens at refill void, because actually you have a null name , but there is no problem because is a type text and if there are no items in inventory on station, then he didnt drag and drop any item.
Also I updated this refill, because in some cases he write mtu1 and it does not clear the filter. for next refill. I fixed that and updated the script on git.

1 Like
#45

Ah wasn’t aware of the wiki page will go check :slight_smile:

Thanks for the response, new to sanderling but not new to eve botting overall :smiley:

1 Like
#46

fix deleting the bookmark when friends are near station and you are on retreat

#47

hi all.
this is my problem:
21-03-27.665: Toggle module ‘Thermal Dissipation Field II’ using F2
21-03-29.558: Toggle module ‘X-Large C5-L Emergency Shield Overload I’ using Alt-F1
21-03-30.773: ready for rats
21-03-30.774: RuntimeException: System.AggregateException: Произошла одна или несколько ошибок. —> System.AggregateException: Произошла одна или несколько ошибок. —> System.ArgumentNullException: Значение не может быть неопределенным.
Имя параметра: pattern
в System.Text.RegularExpressions.Regex…ctor(String pattern, RegexOptions options, TimeSpan matchTimeout, Boolean useCache)
в System.Text.RegularExpressions.Regex.Match(String input, String pattern, RegexOptions options)
в BotEngine.Common.RegexExtension.RegexMatchSuccess(String input, String regexPattern, RegexOptions regexOptions)
в BotEngine.Common.RegexExtension.RegexMatchSuccessIgnoreCase(String input, String regexPattern, RegexOptions regexOptions)
в Submission#0.<get_listOverviewMtu>b__213_0(IOverviewEntry mtu)
в System.Linq.Enumerable.WhereArrayIterator1.MoveNext() в System.Linq.Buffer1…ctor(IEnumerable1 source) в System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
в Submission#0.get_listOverviewMtu()
в Submission#0.MainStep()
в Submission#0.<>d__0.MoveNext()
— Конец трассировка стека из предыдущего расположения, где возникло исключение —
в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
в Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.d__9`1.MoveNext()

в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
в Microsoft.CodeAnalysis.Scripting.Script`1.d__21.MoveNext()

в System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) в BotSharp.ScriptRun.ScriptRun.<>c__DisplayClass75_1.<Start>b__3() в System.Threading.Tasks.Task1.InnerInvoke()
в System.Threading.Tasks.Task.Execute()

в System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
в System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
в System.Threading.Tasks.Task.Wait()
в BotSharp.ScriptRun.ScriptRun.<>c__DisplayClass75_0.b__4()

Имя параметра: pattern
в System.Text.RegularExpressions.Regex…ctor(String pattern, RegexOptions options, TimeSpan matchTimeout, Boolean useCache)
в System.Text.RegularExpressions.Regex.Match(String input, String pattern, RegexOptions options)
в BotEngine.Common.RegexExtension.RegexMatchSuccess(String input, String regexPattern, RegexOptions regexOptions)
в BotEngine.Common.RegexExtension.RegexMatchSuccessIgnoreCase(String input, String regexPattern, RegexOptions regexOptions)
в Submission#0.<get_listOverviewMtu>b__213_0(IOverviewEntry mtu)
в System.Linq.Enumerable.WhereArrayIterator1.MoveNext() в System.Linq.Buffer1…ctor(IEnumerable1 source) в System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
в Submission#0.get_listOverviewMtu()
в Submission#0.MainStep()
в Submission#0.<>d__0.MoveNext()
в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
в Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.d__9`1.MoveNext()

в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
в Microsoft.CodeAnalysis.Scripting.Script`1.d__21.MoveNext()

в System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) в BotSharp.ScriptRun.ScriptRun.<>c__DisplayClass75_1.<Start>b__3() в System.Threading.Tasks.Task1.InnerInvoke()
в System.Threading.Tasks.Task.Execute()
Имя параметра: pattern
в System.Text.RegularExpressions.Regex…ctor(String pattern, RegexOptions options, TimeSpan matchTimeout, Boolean useCache)
в System.Text.RegularExpressions.Regex.Match(String input, String pattern, RegexOptions options)
в BotEngine.Common.RegexExtension.RegexMatchSuccess(String input, String regexPattern, RegexOptions regexOptions)
в BotEngine.Common.RegexExtension.RegexMatchSuccessIgnoreCase(String input, String regexPattern, RegexOptions regexOptions)
в Submission#0.<get_listOverviewMtu>b__213_0(IOverviewEntry mtu)
в System.Linq.Enumerable.WhereArrayIterator1.MoveNext() в System.Linq.Buffer1…ctor(IEnumerable1 source) в System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
в Submission#0.get_listOverviewMtu()
в Submission#0.MainStep()
в Submission#0.<>d__0.MoveNext()
— Конец трассировка стека из предыдущего расположения, где возникло исключение —
в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
в Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.d__91.MoveNext() --- Конец трассировка стека из предыдущего расположения, где возникло исключение --- в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) в Microsoft.CodeAnalysis.Scripting.Script1.d__21.MoveNext()<—
<—

21-03-30.774: status transition from Running to Failed.

#48

it seems you named … your mtu or your char with some differences.
there is a guide

1 Like
#49

Thank you! That helped!
my bad -_-

#50

lols, there is no problem man.
have fun and happy botting

#51

Just pulled the latest version from github, went through and filled out the config portion. then decided to give it a whirl.

then i got this.
03-18-35.253: RuntimeException: System.Exception: compilation error: (234,116): error CS0103: The name ‘MaxRatsOnGrid’ does not exist in the current context
at BotSharp.ScriptRun.ScriptRun.Start(IScriptRunClient client, Task1 compilationTask, Func2 prepareBotForOperationService, Boolean pausing, Func`2 callbackBreakpointInitialEnabled)

double checking my config and looking for anything i might have missed.

2 Likes
#52

is fixed. The variable was declared early in my own script ( before adding my chars names) and to avoid to give my chars names on public, I forget to add maxratsongrid on header of script, with anonyms names.
Thy for your feedback

1 Like
#53

Hey! I’m new here and I’m sorry, I’m Brazilian and I’m using Google Translate.

I downloaded the bot but what I do when I get this message: moving a drone to his folder.
It’s all there and nothing else happens.

#54

and also be care at naming your drones ( lines 56-57) : change at your need :

faction.Add("Delve", "Imperial Navy Praetor"); 
faction.Add("Fountain", "Caldari navy vespa");
#55

OMG! I’ll kill myself.

Image Error

13-18-11.851: Bot operation started in session aa6e94578282eef7.
13-18-12.237: Gathering and processing some info to be used later
13-18-14.358: RuntimeException: System.AggregateException: Um ou mais erros. —> System.AggregateException: Um ou mais erros. —> System.ArgumentException: Já foi adicionado um item com a mesma chave.
em System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
em System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) em Submission#0.<<Initialize>>d__0.MoveNext() --- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada --- em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) em Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.<RunSubmissionsAsync>d__91.MoveNext()
— Fim do rastreamento de pilha do local anterior onde a exceção foi gerada —
em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
em Microsoft.CodeAnalysis.Scripting.Script1.<RunSubmissionsAsync>d__21.MoveNext() --- Fim do rastreamento de pilha de exceções internas --- em System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
em BotSharp.ScriptRun.ScriptRun.<>c__DisplayClass75_1.b__3()
em System.Threading.Tasks.Task1.InnerInvoke() em System.Threading.Tasks.Task.Execute() --- Fim do rastreamento de pilha de exceções internas --- em System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) em System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) em System.Threading.Tasks.Task.Wait() em BotSharp.ScriptRun.ScriptRun.<>c__DisplayClass75_0.<Start>b__4() ---> (Exceção Interna N° 0) System.AggregateException: Um ou mais erros. ---> System.ArgumentException: Já foi adicionado um item com a mesma chave. em System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) em System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add)
em Submission#0.<>d__0.MoveNext()
— Fim do rastreamento de pilha do local anterior onde a exceção foi gerada —
em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
em Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.d__91.MoveNext() --- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada --- em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) em Microsoft.CodeAnalysis.Scripting.Script1.d__21.MoveNext()
— Fim do rastreamento de pilha de exceções internas —
em System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) em BotSharp.ScriptRun.ScriptRun.<>c__DisplayClass75_1.<Start>b__3() em System.Threading.Tasks.Task1.InnerInvoke()
em System.Threading.Tasks.Task.Execute()
—> (Exceção Interna N° 0) System.ArgumentException: Já foi adicionado um item com a mesma chave.
em System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
em System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) em Submission#0.<<Initialize>>d__0.MoveNext() --- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada --- em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) em Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.<RunSubmissionsAsync>d__91.MoveNext()
— Fim do rastreamento de pilha do local anterior onde a exceção foi gerada —
em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
em Microsoft.CodeAnalysis.Scripting.Script`1.d__21.MoveNext()<—
<—

13-18-14.358: status transition from None to Failed.

#56

In the screenshot you posted, I also see this code:

[...]

Dictionary<string,string> faction=new Dictionary<string,string>();
faction.Add("Delve", "Imperial Navy Praetor");
faction.Add("Delve", "Gecko");

[...]

This crashes the script, because of the weird API of the Dictionary type in the .NET framework.

The crash can be avoided by using the indexer instead of the Add method. The code then looks as follows:

Dictionary<string,string> faction=new Dictionary<string,string>();
faction["Delve"] = "Imperial Navy Praetor";
faction["Delve"] = "Gecko";

Note that the first one with Imperial Navy Praetor is ineffective because it is replaced with Gecko anyway. The Dictionary only allows one entry per key.

These crashes are one of the reasons I plan to improve on the static analysis of scripts.

1 Like
#57

you cannot have for same region more than one drone name.

I did’t know that and also for me is working daily ( still, one drone name/region)
But good to know, I fixed already on git

#58

Unfortunately, still the same error.
Even though I have changed:

image

#59

you read you cannot have for same region more than one drone names?
you must have or imperial drones or gecko.

faction["Delve"] = "Imperial Navy Praetor";
// faction["Delve"] = "Gecko";

or you could delete the entire snipet if you use more than one type of drones/region ( is used for refill with drones and move drones on folder)

#60

Even with only one drone per region, the error still continues.

image

1 Like