Jump to content

Force bot to close game and pause Wrobot


Recommended Posts

Hey!

Does anyone know how set bot close game and pause Wrobot or Relogger when any player attack bot in game?

Bot often get ban when other player kite bot in game and shooting this to video and send GM. 

Link to comment
Share on other sites

Hello,

in relogger option you have option "Wait time to relaunch and relogge after crash", use it to not relaunch bot and wow quickly.

To close game you can use this code:

        wManager.Events.FightEvents.OnFightStart += delegate (WoWUnit unit, CancelEventArgs cancelable)
        {
            try
            {
                if (unit != null && unit.Type == WoWObjectType.Player)
                    wManager.Wow.Memory.WowMemory.Memory.GetProcess().Kill();
            }
            catch {}
        };

 

Link to comment
Share on other sites

1 hour ago, Droidz said:

Hello,

in relogger option you have option "Wait time to relaunch and relogge after crash", use it to not relaunch bot and wow quickly.

To close game you can use this code:


        wManager.Events.FightEvents.OnFightStart += delegate (WoWUnit unit, CancelEventArgs cancelable)
        {
            try
            {
                if (unit != null && unit.Type == WoWObjectType.Player)
                    wManager.Wow.Memory.WowMemory.Memory.GetProcess().Kill();
            }
            catch {}
        };

 

Thank you!

Please, tell where i should put this code? It's need to create plugin?

Link to comment
Share on other sites

Yes create plugin (save it in file type .cs )

using System.ComponentModel;
using wManager.Wow.Enums;
using wManager.Wow.ObjectManager;

public class Main : wManager.Plugin.IPlugin
{
    public void Initialize()
    {
        wManager.Events.FightEvents.OnFightStart += delegate (WoWUnit unit, CancelEventArgs cancelable)
        {
            try
            {
                if (unit != null && unit.Type == WoWObjectType.Player)
                    wManager.Wow.Memory.WowMemory.Memory.GetProcess().Kill();
            }
            catch { }
        };
    }

    public void Dispose()
    {
    }

    public void Settings()
    {
    }
}

 

Link to comment
Share on other sites

1 hour ago, Droidz said:

Yes create plugin (save it in file type .cs )


using System.ComponentModel;
using wManager.Wow.Enums;
using wManager.Wow.ObjectManager;

public class Main : wManager.Plugin.IPlugin
{
    public void Initialize()
    {
        wManager.Events.FightEvents.OnFightStart += delegate (WoWUnit unit, CancelEventArgs cancelable)
        {
            try
            {
                if (unit != null && unit.Type == WoWObjectType.Player)
                    wManager.Wow.Memory.WowMemory.Memory.GetProcess().Kill();
            }
            catch { }
        };
    }

    public void Dispose()
    {
    }

    public void Settings()
    {
    }
}

 

Thx! It's working.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...