public void Start() { if (!Win32.IsPoERun()) { throw new Exception("Path of Exile is not running!"); } if (Win32.GetActiveWindowTitle() != "Path of Exile") { Win32.PoE_MainWindow(); } _CurrenciesService = new CurrenciesService(_loggerService); _ItemService = new ItemsService(_CurrenciesService); // Go to hideout Win32.ChatCommand("/hideout"); Thread.Sleep(700); // Detect Stash if (!_StashHelper.OpenStash()) { _loggerService.Log("Stash is not found in the area."); throw new Exception("Stash is not found in the area."); } // Clean inventory _StashHelper.ClearInventory("5"); _StashHelper.ScanTab(); // Listen for trades _LogReaderServices = new ReadLogsServce(_loggerService, _CurrenciesService); _LogReaderServices.TradeRequest += TradeRequest; // Move for not been afk _LogReaderServices.AFK += StopAFK; // Trade accepted event _LogReaderServices.TradeAccepted += TradeAccepted; // Trade canceled event _LogReaderServices.TradeCanceled += TradeCanceled; //Trade customer left event _LogReaderServices.CustomerLeft += CustomerLeft; // Trade customer arrived event _LogReaderServices.CustomerArrived += BeginTrade; }
private bool ValidateFarmTabs() { // Detect Stash if (!_StashHelper.OpenStash()) { _loggerService.Log($"{MethodBase.GetCurrentMethod().Name} Stash is not found in the area."); return(false); } var lTabs = OpenCV_Service.GetText(ScreenCapture.CaptureScreen()); return(true); }