Zummy Posted August 17, 2018 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.
FrostBug Posted August 17, 2018 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
Zummy Posted August 17, 2018 Author 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.