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(); }
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)); }
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); }
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); }
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 }