Jump to content

Mecca21

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Mecca21's Achievements

  1. I feel like using 4 Lua injections is a lot when you can just concatenate and use like 2 injections.
  2. The Reason why i removed AddNpc() was because you are using it to create in another function. so 2 function for a simple task.
  3. Hey, I cleaned up your method and make it look a little cleaner. when i get a chance i will do some editing and see what i can do to help you improve it. public class Moonglade { static Moonglade() { Npc npc = new Npc { Type = NpcType.DruidTrainer, Name = "Loganaar", Entry = 12042, Position = new Vector3(7867.13, -2593.73, 486.8367), ContinentId = wManager.Wow.Enums.ContinentId.Kalimdor, Faction = Npc.FactionType.Neutral, CanFlyTo = true }; NpcDB.AddNpc(npc, true, true); Logging.Write($"[Moonglade]: Trainer {npc.Name} Was Added to Npc Database"); } internal static void Start() { FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += OnRunState; FiniteStateMachineEvents.OnRunState += OnRunState; FiniteStateMachineEvents.OnAfterRunState += OnAfterRunState; } internal static void Dispose() { FiniteStateMachineEvents.OnRunState -= OnRunState; FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState -= OnRunState; FiniteStateMachineEvents.OnAfterRunState -= OnAfterRunState; } private static void OnRunState(Engine Engine, State state, CancelEventArgs cancelable) { if (state.GetType() != typeof(Trainers)) return; if (CurrentLevel % 2 != 0 || !CanTravel || !wManager.wManagerSetting.CurrentSetting.TrainNewSkills) return; if (!MapName.Contains("Moonglade")) { cancelable.Cancel = true; MovementManager.StopMoveTo(true, Random); Lua.RunMacroText("/cast Teleport: Moonglade"); Usefuls.WaitIsCasting(); Thread.Sleep(Random); } } private static void OnAfterRunState(Engine Engine, State state) { if (state.GetType() != typeof(Trainers) || !CanTravel) return; if (MapName.Contains("Moonglade")) { ItemsManager.UseItem(6948); Usefuls.WaitIsCasting(); Thread.Sleep(5000); ToTown.ForceToTown = true; } } private static bool CanTravel { get { return SpellManager.KnowSpell(18960) && GetItemCoolDown(6948) == 0; } } private static String MapName => Usefuls.MapZoneName; private static Int32 Random = Others.Random(4000, 7000); private static ulong CurrentLevel => ObjectManager.Me.Level; private static Int32 GetItemCoolDown(Int32 ItemID) { return Lua.LuaDoString<Int32>($@"local startTime, duration, _ = GetItemCooldown({ItemID}); return duration - (GetTime() - startTime);"); } }
  4. Hello, the reason you didn't look the Old Ironjaw is because Wrobot doesnt look BOP (Bind on Pickup), you will need a addon or plugin click "Okay" when the Frame pops up. more info can be found here :
×
×
  • Create New...