March 17, 20179 yr Is there any way in my fight class to execute Lua code, whenever I die, once? I want it to call ReloadUI() to prevent the combat rotation from stopping randomly on a MoP client. I tried some custom scripts, but the bot never executed them (and there is that issue of only doing it ONCE too).
March 17, 20179 yr Hello, in the fightclass editor, in "Additionnal C# code" (top left) put this code: static Main() { bool lastState = false; while (Conditions.ProductIsStarted) { if (Conditions.InGameAndConnectedAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore) { if (lastState && !ObjectManager.Me.IsDeadMe) { Logging.WriteDebug("Retrieve corpse, ReloadUI"); Lua.LuaDoString("ReloadUI()"); } lastState = ObjectManager.Me.IsDeadMe; } Thread.Sleep(100); } }
March 17, 20179 yr Author That bugs it entirely, so the bot only keeps working if I turn it on/off (for one fight, but it doesn't run unless I turn it on, and doesn't fight unless I turn it off). Probably a multithreading issue. But it's okay, I'll use this to write a custom plugin instead.
March 17, 20179 yr If you want than WRobot stop to reloadui you can change settings here http://wrobot.eu/forums/topic/4918-since-last-update-the-bot-spams-reloadui/?do=findComment&comment=22750
Create an account or sign in to comment