November 22, 20178 yr I looked into the Trainers state, but it's highly obfuscated. I know the TrainLevel plugin that just keeps overwriting the wRobot setting, but sometimes it misses out and then you have to wait for 6 levels, so I'm not happy with that. So I have tried this code, but it doesn't exactly work either. Can you maybe give some more info @Droidz? public static void Start() { FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += TrainingEventHandler; } public static void Stop() { FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState -= TrainingEventHandler; } private static void TrainingEventHandler(robotManager.FiniteStateMachine.Engine engine, robotManager.FiniteStateMachine.State state, System.ComponentModel.CancelEventArgs cancelable) { if (state.GetType() == typeof(Trainers)) { bool hasToTrain = LevelsToTrain.Contains(ObjectManager.Me.Level); Logging.WriteDebug("Checking if we have to go to trainer: " + (hasToTrain ? "yes" : "no")); if (!hasToTrain) { cancelable.Cancel = true; } } }
November 22, 20178 yr Hello, your code seem good, check if you haven't another plugins activated (check also if without this plugin wrobot go to trainer to check your trainer settings)
November 22, 20178 yr Author I think it was missing trainers in the database for some reason. I added some more and it seemed to work then, thanks.
Create an account or sign in to comment