Example #1
0
        public override bool Do()
        {
            Functions.Interact(unit);
            Thread.Sleep(2000);

            if (GossipFrame.IsVisible())
            {
                if (!GossipFrame.ClickOptionText("training"))
                {
                    return(false);
                }
                Thread.Sleep(2000);
            }
            if (TrainerFrame.IsVisible())
            {
                TrainerFrame.LearnAllSkills();
                PPather.WriteLine("Train: Learned new skills");
                GContext.Main.SendKey("Common.Escape");                 // Clear up
                // Stop it from trying to execute again on the same level
                PPather.ToonData.Set("TrainLevel" + trainType,
                                     GPlayerSelf.Me.Level.ToString());
            }
            else
            {
                GContext.Main.SendKey("Common.Escape");
                return(false);
            }             // ? Try again?
            return(true);
        }
Example #2
0
        private void TRAINER_SHOW()
        {
            if (TrainerFrame.IsOpen)
            {
                TrainerFrame.Destroy();
            }
            TrainerFrame.Create();
#if OUTPUT
            Console.WriteLine("###############\nSpells avaible: " + TrainerFrame.Instance.AvaibleSpells);
            foreach (var x in TrainerFrame.Instance.Spells)
            {
                Console.WriteLine(x.Name + " -> Rank: " + x.Rank);
            }
            Console.WriteLine("###############");
#endif
            OnTrainerShow?.Invoke(this, new EventArgs());
        }
Example #3
0
 private void TRAINER_CLOSED()
 {
     TrainerFrame.Destroy();
     OnTrainerClosed?.Invoke(this, new EventArgs());
 }