Beispiel #1
0
        public frmTravelPath(PatrolAreas patrolareas, AutoKillerScript.clsAutoKillerScript ak)
        {
            _patrolareas = patrolareas;
            _ak          = ak;

            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            this.lvwPatrolArea.Validated += new EventHandler(lvwPatrolArea_Validated);

            //we have our PatrolAreas class, lets load the comboBox with the area names
            foreach (string patrolareaname in _patrolareas.GetAllPatrolAreas())
            {
                if (_patrolareas.GetPatrolArea(patrolareaname).Type == PatrolType.TravelPath)
                {
                    cbxPatrolAreas.Items.Add(patrolareaname);
                }
            }

            // set up our timer for recording waypoints as the player runs
            AutoWaypointsTimer          = new System.Windows.Forms.Timer();
            AutoWaypointsTimer.Interval = 1000;
            AutoWaypointsTimer.Tick    += new EventHandler(AutoWaypointsTimer_Expired);
            AutoWaypointsTimer.Enabled  = true;
            AutoWaypointsTimer.Stop();
        }
Beispiel #2
0
        /// <summary>
        /// Create a new PatrolAreas class that can contain PatrolArea objects
        /// </summary>
        /// <param name="wow">The WoW!Sharp object</param>
        /// <param name="wow">PatrolType indicating what type of list it is</param>
        internal PatrolAreas(AutoKillerScript.clsAutoKillerScript ak)
        {
            _ak           = ak;
            _mPatrolAreas = Hashtable.Synchronized(new Hashtable());

            LoadPatrolAreas();
        }
Beispiel #3
0
        public DAoC_Scout(AutoKillerScript.clsAutoKillerScript ak, Profile profile, PatrolAreas patrolareas)
            : base(ak, profile, patrolareas)
        {
            _ak = ak;

            cooldowns.DefineCooldown("Stealth", 10 * 1000);
            cooldowns.DefineCooldown("FightDelay", (int)(1.5 * 1000));
        }
Beispiel #4
0
 /// <summary>
 /// Waypoint constructor
 /// </summary>
 /// <param name="ak">A AutoKillerScript.clsAutoKillerScript object</param>
 /// <param name="wpt">The Waypoint object to copy and add</param>
 public Waypoint(AutoKillerScript.clsAutoKillerScript ak, Waypoint wpt)
 {
     _ak        = ak;
     _mX        = wpt.X;
     _mY        = wpt.Y;
     _mZ        = wpt.Z;
     _pointName = wpt.Name;
     _mType     = wpt.Type;
 }
Beispiel #5
0
 private int _mType;         //1=keep travelling, 2=try to fight
 /// <summary>
 /// Waypoint constructor
 /// </summary>
 /// <param name="ak">A AutoKillerScript.clsAutoKillerScript object</param>
 /// <param name="x">The X coordinate of the new waypoint</param>
 /// <param name="y">The Y coordinate of the new waypoint</param>
 /// <param name="z">The Z coordinate of the new waypoint</param>
 /// <param name="name">The optional name of the new waypoint</param>
 /// <param name="type">Unused, for future concept of fighting at just some points</param>
 public Waypoint(AutoKillerScript.clsAutoKillerScript ak, float x, float y, float z, string name, int type)
 {
     _ak        = ak;
     _mX        = x;
     _mY        = y;
     _mZ        = z;
     _pointName = name;
     _mType     = type;
 }
Beispiel #6
0
        /// <summary>
        /// Create a new waypoint list with target names
        /// </summary>
        /// <param name="ak">A AutoKillerScript.clsAutoKillerScript ak object used for calculating distances etc.</param>
        /// <param name="targetNames">An ArrayList of target names to associate with this PatrolArea</param>
        internal PatrolArea(AutoKillerScript.clsAutoKillerScript ak, ArrayList targetNames, PatrolType type, string name)
        {
            this._ak = ak;
            _type    = type;
            _name    = name;

            _mWaypoints   = ArrayList.Synchronized(new ArrayList());
            _mTargetNames = ArrayList.Synchronized(new ArrayList(targetNames));
        }
Beispiel #7
0
        public frmLoot(AutoKillerScript.clsAutoKillerScript ak)
        {
            _ak = ak;

            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            this.lvwBadLoot.Validated += new EventHandler(lvwBadLoot_Validated);
        }
Beispiel #8
0
        public DAoC_Necro(AutoKillerScript.clsAutoKillerScript ak, Profile profile, PatrolAreas patrolareas)
            : base(ak, profile, patrolareas)
        {
            _ak = ak;

            cooldowns.DefineCooldown("Heal", 15 * 1000);
            cooldowns.DefineCooldown("Ranged", 1 * 1000);
            cooldowns.DefineCooldown("MeleePT", 1 * 1000);
            cooldowns.DefineCooldown("Buff", 3 * 1000);
            cooldowns.DefineCooldown("FacilitatePain", 30 * 1000);
            cooldowns.DefineCooldown("BuffStrength", 20 * 60 * 1000);
            cooldowns.DefineCooldown("BuffDex", 20 * 60 * 1000);
            cooldowns.DefineCooldown("BuffAbsorb", 10 * 60 * 1000);
        }
Beispiel #9
0
        public frmTravel(PatrolAreas patrolareas, AutoKillerScript.clsAutoKillerScript ak)
        {
            _patrolareas = patrolareas;
            _ak          = ak;

            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            cbxPatrolAreas.GotFocus  += new EventHandler(cbxPatrolAreas_GotFocus);
            cbxDestinations.GotFocus += new EventHandler(cbxDestinations_GotFocus);
        }
Beispiel #10
0
		public frmAdvanced( AutoKillerScript.clsAutoKillerScript ak)
		{
			_ak = ak;

			_ak.OnLog += new clsAutoKillerScript.OnLogEventHandler(OnLogLine);
			_ak.OnRegExTrue += new clsAutoKillerScript.OnRegExTrueEventHandler(RawLogLine);

			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}
Beispiel #11
0
        private void frmMain_Load(object sender, System.EventArgs e)
        {
            _ak = new AutoKillerScript.clsAutoKillerScript();


            _profile = new Profile();

            // No setting screens for these yet
            _profile.DefineVariable("MinimumCastDistance", 300f);
            _localization = new Localization();

            _patrolareas = new PatrolAreas(_ak);

            _frmGeneral = new frmGeneral();
            _profile.AddProfileForm(_frmGeneral);
            ShowForm((Form)_frmGeneral);

            _frmRest = new frmRest();
            _profile.AddProfileForm(_frmRest);
            ShowForm((Form)_frmRest);

            _frmPatrolArea = new frmPatrolArea(_patrolareas, _ak);
            _profile.AddProfileForm(_frmPatrolArea);
            ShowForm((Form)_frmPatrolArea);

            _frmTravelPath = new frmTravelPath(_patrolareas, _ak);
            _profile.AddProfileForm(_frmTravelPath);
            ShowForm((Form)_frmTravelPath);

            _frmTravel = new frmTravel(_patrolareas, _ak);
            ShowForm((Form)_frmTravel);

            _frmNecroSettings = new frmNecroSettings(_ak);
            _profile.AddProfileForm(_frmNecroSettings);
            ShowForm((Form)_frmNecroSettings);

            _frmScoutSettings = new frmScoutSettings(_ak);
            _profile.AddProfileForm(_frmScoutSettings);
            ShowForm((Form)_frmScoutSettings);

            _frmFlee = new frmFlee( );
            _profile.AddProfileForm(_frmFlee);
            ShowForm((Form)_frmFlee);

            _frmDistances = new frmDistances( );
            _profile.AddProfileForm(_frmDistances);
            ShowForm((Form)_frmDistances);

            _frmLoot = new frmLoot(_ak);
            _profile.AddProfileForm(_frmLoot);
            ShowForm((Form)_frmLoot);

            _frmStatistics = new frmStatistics(_ak);
            ShowForm((Form)_frmStatistics);

            _frmAdvanced = new frmAdvanced(_ak);
            ShowForm((Form)_frmAdvanced);

            _frmGeneral.Focus();

            // This hides the MDI frame border
            foreach (Control c in Controls)
            {
                int windowLong = GetWindowLong(c.Handle, GWL_EXSTYLE);
                windowLong &= ~WS_EX_CLIENTEDGE;
                SetWindowLong(c.Handle, GWL_EXSTYLE, windowLong);

                c.Width = c.Width + 1;
            }

            try
            {
                //get path
                string directory = Path.GetDirectoryName(Application.ExecutablePath);
                if (!directory.EndsWith("\\"))
                {
                    directory += "\\";
                }

                directory += "\\form.xml";

                XmlDocument doc = new XmlDocument();
                doc.Load(directory);

                XmlNode variableNode = doc.SelectSingleNode("//Coords/@X");
                int     myLeft       = int.Parse(variableNode.Value);

                variableNode = doc.SelectSingleNode("//Coords/@Y");
                int myTop = int.Parse(variableNode.Value);

                this.Top  = myTop;
                this.Left = myLeft;
            }
            catch
            {
            }

            bRunning = false;
            engine   = new Thread(new ThreadStart(Engine));
//			engine.Priority = ThreadPriority.AboveNormal ;
            bEngineStarted = true;
            engine.Start();
            Thread.Sleep(0);                                            //so the other thread can really start
            Thread.CurrentThread.Priority = ThreadPriority.BelowNormal; //let gui thread give up cpu to fight thread
        }