kpeno 1 Posted June 28, 2018 Share Posted June 28, 2018 Sometime have bug, where bot not closed after character change :"Character changed, closing bot." And i cant get access to MemoryRobot.Memory.Close(); Any way to avoid it? if (Logging.ReadLastString(Logging.LogType.Error) == "Character changed, closing bot.") { MemoryRobot.Memory. } Link to comment https://wrobot.eu/forums/topic/9658-need-help-with-close-wrobot-via-c-code/ Share on other sites More sharing options...
Droidz 2738 Posted June 28, 2018 Share Posted June 28, 2018 Hello, use: robotManager.Events.LoggingEvents.OnAddLog += delegate (robotManager.Helpful.Logging.Log log) { if (log != null && !string.IsNullOrWhiteSpace(log.Text) && log.LogType == robotManager.Helpful.Logging.LogType.Error && log.Text == "Character changed, closing bot.") { System.Diagnostics.Process.GetCurrentProcess().Kill(); } }; (run this code one time) Link to comment https://wrobot.eu/forums/topic/9658-need-help-with-close-wrobot-via-c-code/#findComment-44867 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now