public void Mailer() { Log(Time() + "[ Starting the Mail Process ]"); gps = new Gps(this); gps.LoadDataBase(Application.StartupPath + _gpsfile); Log(Time() + "INFO: Moving to Mailbox"); gps.GpsMove("Mail"); List <Item> mailitems = new List <Item>(); { List <Item> Inventory = getInvItems(_plant); foreach (Item item in Inventory) { if (mailitems.Count <= 8) { break; } mailitems.Add(item); } } var mailcount = itemCount(_plant); if (mailcount >= _amtmail) { Log(Time() + "INFO: Sending " + _plant + " to " + _mailto); SendMail(_mailto, _mailsub, _mailtext, _fastmail, 0, mailitems); } else { Log(Time() + "[ Mail Processes Finished ]"); } }
private void cmbox_ZoneMaps_SelectedIndexChanged(object sender, EventArgs e) { Utils.InvokeOn(this, () => { int index = cmbox_ZoneMaps.SelectedIndex; // Clear box lbox_GpsPoints.Items.Clear(); if (index == 0) { return; } var mapName = cmbox_ZoneMaps.SelectedItem.ToString(); var map = MapsHelper.GetMap(mapName); if (map == null) { return; } var gps = new Gps(Host); switch (map.MapUseType) { case MapUseType.Local: gps.LoadDataBase(map.GetMapPath()); break; case MapUseType.Internal: gps.LoadDataBase(map.GetByteMap()); break; } var points = gps.GetAllGpsPoints().Where (p => p.name.Contains("Fight")).Select(p => p.name + " : " + p.radius); if (points.Count() > 0) { lbox_GpsPoints.Items.AddRange(points.ToArray()); } }); }
public override void Start(Host host) { base.Start(host); gps = new Gps(host); host.Log("Loading gps from " + Application.StartupPath + "\\plugins\\questing\\path.db3"); gps.LoadDataBase(Application.StartupPath + "\\plugins\\questing\\path.db3"); gps.onGpsPreMove += gpsPreMove; }
public void MoveToSafe() { gps = new Gps(this); Log(Time() + "Loading GPS File"); gps.LoadDataBase(Application.StartupPath + _gpsfile); if (_enabledoor == true) { Log(Time() + "We need to Open / Close the Door"); gps.GpsMove("Door0"); // Time to Open the Door DoodadObject doors = getNearestDoodad("Door"); Log(Time() + "INFO: " + string.Format("Name: {0} - ID: {1}", doors.name, doors.phaseId)); if (doors != null && ComeTo(doors, 2)) { if (doors.phaseId == 11163) { UseDoodadSkill(16828, doors); Thread.Sleep(1000); gps.GpsMove("Door1"); } else { gps.GpsMove("Door1"); } // Time to Close the Door if (doors.phaseId == 11165) { UseDoodadSkill(16828, doors); Thread.Sleep(1000); } } // Log(Time() + "Moving to Safe"); gps.GpsMove("Safe"); Log(Time() + "Safe Spot has been Reached"); if (_enablerest == true) { Relax(); Log(Time() + "Rest Time"); } } else { Log(Time() + "INFO: _enabledoor Set to False"); } }
// Utility Stuff public void BuySeeds() { while (true) { var _mygold = me.goldCount; var seedcount = itemCount(_seed); if (_mygold <= _mingold) { Log(Time() + "INFO: Unable to Purchase due to lack of funds"); break; } else { Log(Time() + "Lets go buy seeds"); gps = new Gps(this); gps.LoadDataBase(Application.StartupPath + _gpsfile); gps.GpsMove("Seed"); SetTarget(_buyvendor); Log(Time() + "Seed Stock: " + seedcount); if (seedcount <= _minseed && seedcount <= _maxseed) { BuyItems(_seed, _buyseedamt); var seedcount2 = itemCount(_seed); Log(Time() + "Updated Seed Cound: " + seedcount2); var mseconds = random.Next(2000, 5000); var seconds = mseconds / 1000; Log(Time() + "Checking seed stock"); Thread.Sleep(mseconds); } else { Log(Time() + "[ Seed Purchase Completed ]"); break; } } } }