Exemple #1
0
        /// <summary>
        /// Engage active target with drones in space
        /// </summary>
        /// <returns>True on success, false otherwise</returns>
        public bool engageDrones()
        {
            InterfaceResponse tresp = (InterfaceResponse)com.sendCall(FunctionCallFactory.CALLS.GETDRONESINSPACETAB, Response.RESPONSES.INTERFACERESPONSE);

            if (tresp == null)
            {
                Console.WriteLine("Couldn't retrieve drone tab");
                return(false);
            }
            InterfaceEntry ientry = new InterfaceEntry(tresp.X, tresp.Y, tresp.Width, tresp.Height);

            menu.open(ientry);
            Thread.Sleep(400);
            return(menu.click(MenuHandler.MENUITEMS.ENGAGETARGET));
        }
Exemple #2
0
        /// <summary>
        /// Expand local drones menu
        /// </summary>
        /// <returns>False if factory error, true otherwise</returns>
        public bool toggleLocalDrones()
        {
            InterfaceResponse tresp = (InterfaceResponse)com.sendCall(FunctionCallFactory.CALLS.GETDRONESINSPACETAB, Response.RESPONSES.INTERFACERESPONSE);

            if (tresp == null)
            {
                Console.WriteLine("Couldn't retrieve drone tab");
                return(false);
            }
            InterfaceEntry ientry = new InterfaceEntry(tresp.X, tresp.Y, tresp.Width, tresp.Height);
            Point          pt     = new Point(ran.Next(ientry.X, ientry.X + ientry.Width), ran.Next(ientry.Y, ientry.Y + ientry.Height - 5));

            m.move(pt);
            pm.synchronize(m);
            Thread.Sleep(ran.Next(300, 400));
            m.click(true);
            Thread.Sleep(ran.Next(500, 600));

            return(true);
        }
Exemple #3
0
 /// <summary>
 /// Open a menu at the given interface entry 
 /// </summary>
 /// <param name="entry">The interface entry to open the menu on</param>
 /// <returns>True if sucess, false otherwise</returns>
 public Boolean open(InterfaceEntry entry)
 {
     Point pt = new Point(random.Next(entry.X, entry.X + entry.Width), random.Next(entry.Y, entry.Y + entry.Height - 5));
     m.move(pt);
     pm.synchronize(m);
     Thread.Sleep(random.Next(300,400));
     m.click(false);
     Thread.Sleep(random.Next(1500, 1600));
     return true;
 }
Exemple #4
0
 /// <summary>
 /// Launch drones
 /// </summary>
 /// <returns>true on success, false otherwise</returns>
 public bool launchDrones()
 {
     InterfaceResponse tresp = (InterfaceResponse)com.sendCall(FunctionCallFactory.CALLS.GETDRONESINBAYTAB, Response.RESPONSES.INTERFACERESPONSE);
     if (tresp == null)
     {
         Console.WriteLine("Couldn't retrieve drone tab");
         return false;
     }
     InterfaceEntry ientry = new InterfaceEntry(tresp.X, tresp.Y, tresp.Width, tresp.Height);
     menu.open(ientry);
     Thread.Sleep(400);
     return menu.click(MenuHandler.MENUITEMS.LAUNCHDRONES);
 }
Exemple #5
0
        /// <summary>
        /// Expand local drones menu
        /// </summary>
        /// <returns>False if factory error, true otherwise</returns>
        public bool toggleLocalDrones()
        {
            InterfaceResponse tresp = (InterfaceResponse)com.sendCall(FunctionCallFactory.CALLS.GETDRONESINSPACETAB, Response.RESPONSES.INTERFACERESPONSE);
            if (tresp == null)
            {
                Console.WriteLine("Couldn't retrieve drone tab");
                return false;
            }
            InterfaceEntry ientry = new InterfaceEntry(tresp.X, tresp.Y, tresp.Width, tresp.Height);
            Point pt = new Point(ran.Next(ientry.X, ientry.X + ientry.Width), ran.Next(ientry.Y, ientry.Y + ientry.Height - 5));
            m.move(pt);
            pm.synchronize(m);
            Thread.Sleep(ran.Next(300, 400));
            m.click(true);
            Thread.Sleep(ran.Next(500, 600));

            return true;
        }