Exemplo n.º 1
0
		public ShipState(
			BotEngine.EveOnline.Sensor.ShipHitpointsAndEnergy Hitpoints,
			ShipManeuverTypeEnum? ManeuverType)
		{
			this.Hitpoints = Hitpoints;
			this.ManeuverType = ManeuverType;
		}
Exemplo n.º 2
0
		/// <summary>
		/// </summary>
		/// <param name="Measurement">contains the structures read from the eve online client process memory.</param>
		static public void MeasurementReceived(BotEngine.Interface.FromProcessMeasurement<IMemoryMeasurement> Measurement)
		{
			Console.WriteLine("\nMeasurement received");
			Console.WriteLine("measurement time: " + ((Measurement?.End)?.ToString("### ### ### ### ###")?.Trim() ?? "null"));

			var ListUIElement =
				Measurement?.Value?.EnumerateReferencedUIElementTransitive()
				?.GroupBy(UIElement => UIElement.Id)
				?.Select(Group => Group?.FirstOrDefault())
				?.ToArray();

			Console.WriteLine("number of UI elements in measurement: " + (ListUIElement?.Length.ToString() ?? "null"));

			var ContextMenu = Measurement?.Value?.Menu?.FirstOrDefault();

			var ContextMenuFirstEntry = ContextMenu?.Entry?.FirstOrDefault();

			if (null == ContextMenuFirstEntry)
			{
				Console.WriteLine("no contextmenu open");
			}
			else
			{
				var Center = ContextMenuFirstEntry.Region.Center();

				Console.WriteLine("contextmenu first entry : label: \"" + (ContextMenuFirstEntry?.Text ?? "null") + "\", center location : " +
					Center.A.ToString() + ", " + Center.B.ToString());
			}
		}
Exemplo n.º 3
0
        private void AddBotTemplate(BotEngine.BotDescriptor bot)
        {
            ListViewItem item = new ListViewItem();
            item.Text = bot.Name;

            item.SubItems.Add(bot.Count.ToString());
            item.SubItems.Add(bot.Silenced.ToString());
            item.SubItems.Add(bot.Host.ToString());
            item.SubItems.Add(bot.Running ? "running" : "stopped");
            item.SubItems.Add(bot.Script);
            item.Tag = bot;

            BotList.Items.Add(item);
        }
Exemplo n.º 4
0
        public BotCommandForm(BotEngine.BotCommand cmd)
        {
            InitializeComponent();
            FCommand = cmd;

            FPropertyTable = new BotStudio.PropertyPack.PropertyTable();

            foreach(BotEngine.BotCommand.Parameter param in cmd.Parameters)
            {
                FPropertyTable.Properties.Add(new BotStudio.PropertyPack.PropertySpec(param.Name, typeof(string)));
            }

            commandPropList.SelectedObject = FPropertyTable;
        }
Exemplo n.º 5
0
        private static void Main()
        {
            var engine = new BotEngine();
            engine.Start();
            Console.WriteLine("Bot is running. Press any key to stop him!");
            while (true)
            {
                if (Console.KeyAvailable)
                {
                    Console.ReadKey();
                    Console.WriteLine("Stopping...");
                    engine.Stop();
                    return;
                }

                Thread.Sleep(100);
                Application.DoEvents();
            }
        }
Exemplo n.º 6
0
        public BotPropDlg(BotEngine.BotDescriptor botDesc)
        {
            InitializeComponent();

            BotDesc = botDesc;
        }
Exemplo n.º 7
0
 public void RemoveBot(BotEngine.BotDescriptor bot)
 {
     FBots.Remove(bot);
     Emmit_ListChanged();
 }
Exemplo n.º 8
0
 public void AddBot(BotEngine.BotDescriptor bot)
 {
     FBots.Add(bot);
     Emmit_ListChanged();
 }
Exemplo n.º 9
0
 public CommandBase(BotEngine engine)
 {
     iEngine = engine;
 }
Exemplo n.º 10
0
 void _engine_BotEventEntersWorld(BotEngine sender, EventHandling.BotEngine.EventBotEntersWorldArgs e)
 {
     // bot is logged in and entered the world. Create a remote client seeion to the bot engine.
     waitHandle.Set();
 }
Exemplo n.º 11
0
 public QuoteBotPlugin(BotEngine bot) : base(bot)
 {
 }
 public InitBotChatMessage(BotEngine botEngine, String botKey) : base($"{botEngine}:{botKey.ToLowerInvariant()}")
 {
     BotEngine = botEngine;
     BotKey    = botKey;
 }
 public RegisterBotProcessingMessage(BotEngine botEngine, String botKey) : base($"{botEngine}:{botKey.ToLowerInvariant()}")
 {
     BotEngine = botEngine;
     BotKey    = botKey;
 }