Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Code doesnt stop fighting complete.

  • Product: WRobot General
  • Type: Bug
  • Status: Unconfirmed

Hello @Droidz

while i am making a fightclasses and using a EscapeProtocol, i found that this code doesnt completely stop the fight. it will still fight if attacked. i cant seem to get it to stop attack when attacked for a fightclass C#

wManager.Wow.Helpers.Fight.StopFight();

 

User Feedback

Recommended Comments

Hello, this stop fight, but bot probably try to attack again target, to skip all combat you need to use code like:

        wManager.Events.FightEvents.OnFightStart += delegate(WoWUnit unit, CancelEventArgs cancelable)
            {
                cancelable.Cancel = true;
                if (unit.IsValid)
                    ObjectManager.BlackListGetUnitAttackPlayerGuidTime.Add(unit.Guid, DateTime.Now + TimeSpan.FromMinutes(10));
            };

 

TheSmokie

Banned
On 5/1/2019 at 9:28 AM, Droidz said:

Hello, this stop fight, but bot probably try to attack again target, to skip all combat you need to use code like:


        wManager.Events.FightEvents.OnFightStart += delegate(WoWUnit unit, CancelEventArgs cancelable)
            {
                cancelable.Cancel = true;
                if (unit.IsValid)
                    ObjectManager.BlackListGetUnitAttackPlayerGuidTime.Add(unit.Guid, DateTime.Now + TimeSpan.FromMinutes(10));
            };

 

i know this is gonna sound like a stupid question but can you give some advice or some help with my code i am working on for my quester? i am trying to black list all mobs in a area for 5 mins

Thread Water = new Thread(() =>
            {
                
                Logging.Write("[Water]: Water Search Initialized");
                List<WoWUnit> attackers = ObjectManager.GetUnitAttackPlayer();
                while (Conditions.ProductIsStarted || Conditions.ProductInPause)
                {
                    var unit = ObjectManager.GetWoWUnitAttackables().Where(x => x.Position.DistanceTo(ObjectManager.Me.Position) <= 30);
                       
                    if (ObjectManager.Me.BreathTimerLeft <= 2000)
                    {
                        ObjectManager.BlackListGetUnitAttackPlayerGuidTime.Add(unit.ToArray(WoWUnit), DateTime.Now + TimeSpan.FromMinutes(5));
                        wManager.Wow.Helpers.Keybindings.PressKeybindings(wManager.Wow.Enums.Keybindings.JUMP, 5000);
                        
                    }
                    Thread.Sleep(12000);
                } 
                Logging.Write("[Water]: Water Search Disposed");
            });
            Water.Start();

 

        Thread Water = new Thread(() =>
        {
            Logging.Write("[Water]: Water Search Initialized");
            while (Conditions.ProductIsStarted)
            {
                try
                {
                    if (!Conditions.ProductInPause && ObjectManager.Me.BreathTimerLeft <= 2000)
                    {
                        var unit = ObjectManager.GetWoWUnitAttackables().Where(x => x.Position.DistanceTo(ObjectManager.Me.Position) <= 30);
                        foreach (var u in unit)
                        {
                            if (!ObjectManager.BlackListGetUnitAttackPlayerGuidTime.ContainsKey(u.Guid))
                                ObjectManager.BlackListGetUnitAttackPlayerGuidTime.Add(u.Guid, DateTime.Now + TimeSpan.FromMinutes(5));
                        }
                        wManager.Wow.Helpers.Keybindings.PressKeybindings(wManager.Wow.Enums.Keybindings.JUMP, 5000);

                    }
                }
                catch (Exception e)
                {
                    Logging.WriteError("[Water] ERROR: " + e);
                }
                Thread.Sleep(12000);
            }
            Logging.Write("[Water]: Water Search Disposed");
        });
        Water.Start();

 

TheSmokie

Banned

@Droidz Any advice on why my abort isnt working? trying to work on it so i can post it in the code snips as a call for using c# but i am gonna try to add a data base for flying, also if there a method to check if player is flying to?

    public class fly
    {
        public static void flying()
        {
            var zone = Lua.LuaDoString<string>("return GetZoneText()");
            Thread flying = new Thread(() =>
            {
                Logging.Write("[Flight]: Has initialized");

                while (Conditions.ProductIsStarted && zone != "Orgrimmar")
                {
                    var position = new Vector3(-6810.2f, 841.704f, 49.66529f);
                    int npcEntryId = 15178;
                    var Zon= Lua.LuaDoString<string>("return GetZoneText()");

                    if (!ObjectManager.Me.IsOnTaxi && Zon != "Orgrimmar")
                    {
                        if (wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(position, npcEntryId))
                        {
                            int node;
                            Usefuls.SelectGossipOption(GossipOptionsType.taxi);

                            node = wManager.Wow.Helpers.Lua.LuaDoString<int>("for i=0,30 do if string.find(TaxiNodeName(i),'Orgrimmar') then return i end end");

                            wManager.Wow.Helpers.Lua.LuaDoString("TakeTaxiNode(" + node + ")");
                        }
                    }
                    Thread.Sleep(1000);
                    
                }
                
            });
            if (zone != "Orgrimmar")
            {
                flying.Start();
            }
            else
            if (zone == "Orgrimmar")
            {
                Logging.Write("[Flight]: has disposed");
                flying.Abort();
            }

        }
    }

 

TheSmokie

Banned

sorry, i dont follow. isnt using product thread as in while condition ?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.