A-Bot (small adjustments to the codes) [HELP]

Hello my friends…

Recently I was able to install and start editing the A-BOT codes to fit it to my type of ratting.

Small adjustments need to be made but unfortunately I am not aware of programming for this.

If someone here who understands programming can help me I appreciate it a lot because there are little things that BOT can do to work the way I expect.


Are they…

  • It identifies the object in the overview and begins to orbit

  • I want to change the option to open the menu by a simple shortcut key (W), it clicks on the object and uses the key (W), making the command more efficient.

      			var Broken = memoryMeasurement?.WindowOverview?.FirstOrDefault()?.ListView?.Entry
      			?.Where(entry => entry?.Name?.RegexMatchSuccessIgnoreCase("Broken") ?? false)
      			?.OrderBy(entry => entry?.DistanceMax ?? int.MaxValue)
      			?.ToArray();
    
  • Here it checks the velocity, and when it is below 100m / s it commands orbits said object.

      			if (speedMilli < 100000)
      			yield return Broken.FirstOrDefault().ClickMenuEntryByRegexPattern(bot, "Orbit", "20 km");
    


Another function that is not performing well is to identify an ally and move on to the next anomaly.

  • It identifies the ally, and opens and closes the anomaly window (updating the list), but does not perform the function of ignoring it and moving on to the next one.

  • The codes are …

  • combat.cs

      			if (listOverviewEntryToAttack.Count() > 0)
      		{
      			var listOverviewEntryFriends =
      			memoryMeasurement?.WindowOverview?.FirstOrDefault()?.ListView?.Entry
      			?.Where(entry => entry?.ListBackgroundColor?.Any(IsFriendBackgroundColor) ?? false)
      			?.ToArray();
    
      			if (bot?.OwnAnomaly != true)
      			{
      				if (listOverviewEntryFriends.Length > 0)
      				{
      					yield return bot.SkipAnomaly(memoryMeasurement);
      					yield return new AnomalyEnter { bot = bot };
      				}
      				else
      				{
      					bot?.SetOwnAnomaly(true);
      				}
      			}
      		}
    
  • module.cs

      public class SkipAnomalyF : IBotTask
    {
      public Sanderling.Parse.IMemoryMeasurement MemoryMeasurement;
      public IEnumerable<IBotTask> Component => null;
      public static bool ActuallyAnomaly(Interface.MemoryStruct.IListEntry scanResult) =>
      	scanResult?.CellValueFromColumnHeader("Distance")?.RegexMatchSuccessIgnoreCase("km") ?? false;
      public static bool AnomalySuitableGeneral(Interface.MemoryStruct.IListEntry scanResult) =>
      	scanResult?.CellValueFromColumnHeader("Group")?.RegexMatchSuccessIgnoreCase("combat") ?? false;
      public IEnumerable<MotionParam> Effects
      {
      	get
      	{
      		var pKey = VirtualKeyCode.VK_A;
    
      		yield return pKey.KeyDown();
      		yield return pKey.KeyUp();
    
      		yield return pKey.KeyDown();
      		yield return pKey.KeyUp();
    
      		var probeScannerWindow = MemoryMeasurement?.WindowProbeScanner?.FirstOrDefault();
      		var scanActuallyAnomaly =
      			probeScannerWindow?.ScanResultView?.Entry?.FirstOrDefault(ActuallyAnomaly);
    
      		if (null != scanActuallyAnomaly)
      		{
      			var menuResult = MemoryMeasurement?.Menu?.ToList();
      			if (null == menuResult)
      			{
      				yield return scanActuallyAnomaly.MouseClick(MouseButtonIdEnum.Right);
      			}
      			else
      			{
      				menuResult = MemoryMeasurement?.Menu?.ToList();
      				var menuResultToUse = menuResult[0].Entry?.ToList();
      				//if (menuResultToUse[2].Text == "Ignore Result")
      				if (menuResultToUse[2].Text == "Warp to Withing|Ignore Result")
      				{
      					yield return menuResultToUse[2].MouseClick(MouseButtonIdEnum.Left);
      				}
      			}
      		}
      	}
      }
    }
    

Could someone please review these codes and help me make these changes?
There are only these steps to make A-BOT work properly for me.

Thank you everyone’s attention, and I’m sorry to bother you one more time.

friends detection in original A-Bot was not working as there was some redundant codes…

I’ve done my code as follows

					if (bot?.OwnAnomaly != true)			// is it ours?
					{
						if ((listOverviewEntryFriends.Count() == 0) && (listOverviewAvoidAnomalys.Count() == 0) && (listOverviewOrbitPoints.Count() > 0))
						{
							bot?.SetOwnAnomaly(true);
							bot?.SetSkipAnomaly(false);
						}
						else
						{
							if (null == scanActualAnomaly && bot?.SkipAnomaly != true)
							{
								yield return new ReloadAnomalies();
							}
							else if (null != scanActualAnomaly && bot?.SkipAnomaly != true)
							{
								yield return new SkipAnomaly { bot = bot };
								bot?.SetSkipAnomaly(true);
							}
							else if (null != scanActualAnomaly && bot?.SkipAnomaly == true)
							{
								yield return new SkipAnomaly { bot = bot };
								bot?.SetSkipAnomaly(true);
							}
							else if (null == scanActualAnomaly && bot?.SkipAnomaly == true)
							{
								yield return new AnomalyEnter { bot = bot };
							}
						}
					}

and orbit is fairly easy

					if (ShipManeuverStatus != ShipManeuverTypeEnum.Orbit)
					{
						var orbitKeyCode = VirtualKeyCode.SHIFT;
						yield return new BotTask
						{
							Effects = new[]
							{
							MotionParamExtension.KeyDown(orbitKeyCode),
							listOverviewOrbitPoints.FirstOrDefault().MouseClick(MouseButtonIdEnum.Left),
							MotionParamExtension.KeyUp(orbitKeyCode)
							}
						};
					}

do not use “W” as it will mess up when you will have chat window focused, it’s better to use SHIFT instead

1 Like

where in the code do you put these statements? combat.cs? and what line would you put it at?

put it where you want to start with orbiting… usually where fight begins, after checking anomaly is owned by you

btw mine code contains orbitpoints, which is list defined in config.
in original fuzzy’s abot bot is orbiting around npc targets, take a look on it as well

Can you explain …

How to put code into abot and make it recognize if anomaly is occupied already so your bot will move on …

read the:

  1. entire forum, each page
    2 . take a look here: Can't understand code - #4 by Viir
    3 . read carefully here: https://docs.microsoft.com/en-us/dotnet/csharp/index

and most important; test

really, we cannot learn you programing from 0

will read … and try to get better

you can do it;
I learn in '91 basics of algorithms , Pascal and basic languages. Dont ask me about them, because i missed almost all classroom. What I didn’t miss. the algorithms .
Since then in 2005 ( maybe??) I’ve played a little with scripting.
And now , i put the hands on my keyboard and start to play on coding and not only in gam just because Im lazy and I dont like to do click click and so on.
You see, my laziness, push me to do some things…

Are your lazy? You wanna make money ingame? wanna automatize some things? wanna be THE OP? its a good motivation to read, and learn :slight_smile:

i have it on line 181, but as I said → i do have completely different combat.cs :slight_smile: