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.


#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


#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.


#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:


#46

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