Jump to content

Droidz

Administrators
  • Posts

    12581
  • Joined

  • Last visited

Posts posted by Droidz

  1. Hello, try this WRobot plugin :

    using System;
    using robotManager.Helpful;
    using wManager.Plugin;
    using wManager.Wow.Helpers;
    
    public class Main : IPlugin
    {
        private bool _isLaunched;
        
        public void Initialize()
        {
            _isLaunched = true;
            while (_isLaunched)
            {
                CheckBags();
            }
        }
    
        private void CheckBags()
        {
            if (Conditions.InGameAndConnectedAndProductStartedNotInPause &&
                !Conditions.IsAttackedAndCannotIgnore &&
                Bag.GetContainerNumFreeSlots == 0)
            {
                Logging.Write("Bags are full, stopping profile.");
                wManager.Wow.Memory.WowMemory.CloseHookedProcess(); // Close game
                Environment.Exit(-20); // Exit code -20 stops relogger profile
            }
        }
    
        public void Dispose()
        {
            _isLaunched = false;
        }
    
        public void Settings()
        {
            Logging.Write("No settings available.");
        }
    }

     

    Main.cs

  2. Hello, try this plugin :

    using System.Linq;
    using wManager.Wow.Helpers;
    
    public class Main : wManager.Plugin.IPlugin
    {
        public void Initialize()
        {
            robotManager.Events.Events.OnCustomEvent += (eventName, args, cancelEvent) =>
            {
                try
                {
                    if (eventName =="SpellManager.CastSpellByNameOn" &&
                        args != null &&
                        args.Length == 2 &&
                        args[0] != null &&
                        args[0] is string &&
                        args[1] != null &&
                        args[1] is string)
                    {
                        var spellName = (string)args[0];
                        var luaUnitId = (string)args[1];
    
                        var spell = SpellManager.SpellBook().FirstOrDefault(s => s.NameInGame == spellName);
                        if (spell != null)
                        {
                            var englishSpellName = spell.Name;
                            if (!string.IsNullOrWhiteSpace(englishSpellName))
                            {
                                Lua.LuaDoString(string.Format("CastSpellByName('{0}', '{1}');", englishSpellName.Replace("'", @"\'"), luaUnitId.Replace("'", @"\'")));
                                cancelEvent.Cancel = true;
                            }
                        }
                    }
                } catch{}
            };
        }
    
        public void Dispose()
        {
        }
    
        public void Settings()
        {
        }
    }

     

    Main.cs

×
×
  • Create New...