Zummy Posted August 17, 2018 Share Posted August 17, 2018 Hello, I'm trying to detect whether my character is logout out during script runtime: public void logoutCheck(){ if (getClient().getLoginStageValue() == 0){ log("I'm logged out!"); loginEvent = new LoginEvent(this.login, this.password); getBot().addLoginListener(loginEvent); execute(loginEvent); } } I added the method in the onLoop but never gets triggered, am I retarded? Thanks. Quote Link to comment Share on other sites More sharing options...
FrostBug Posted August 17, 2018 Share Posted August 17, 2018 (edited) onLoop will not be called while logged out unless you unregister the OSBot Login Handler Are you using the correct CLI args to boot osbot without login handler? Edited August 17, 2018 by FrostBug 1 Quote Link to comment Share on other sites More sharing options...
Zummy Posted August 17, 2018 Author Share Posted August 17, 2018 6 minutes ago, FrostBug said: onLoop will not be called while logged out unless you unregister the OSBot Login Handler Are you using the correct CLI args to boot osbot without login handler? Wasn't thinking about that one, thanks! Also should use getLoginUIState instead of getLoginStageValue. Quote Link to comment Share on other sites More sharing options...