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.

Interrupts

Featured Replies

Hello,

 

sample code (fightclass in c#, save this file in *.cs):

using System;
using System.Threading;
using System.Windows.Forms;
using robotManager.Helpful;
using wManager.Wow.Class;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;

public class Main : ICustomClass
{
    public float Range { get { return 4.5f; } } // Fight Range

    private bool _isLaunched;
    private const string FightClassName = "Interrupts";

    #region ListSpells

    private Spell _mightyBash;

    #endregion ListSpells

    public void Initialize()
    {
        Logging.Write("Loading FightClass: " + FightClassName);

        // Init spells:
        _mightyBash = new Spell("Mighty Bash");

        Logging.Write("FightClass Loaded: " + FightClassName);

        // Launch loop in new thread:
        _isLaunched = true;
        var threadLoop = new Thread(Loop);
        threadLoop.Start();
        Logging.Write("FightClass Launched: " + FightClassName);
       
    }

    private void Loop()
    {
        while (_isLaunched)
        {
            try
            {
                if (Fight.InFight && ObjectManager.Target.IsValid)
                {
                    // Spell Mighty Bash:
                    if (ObjectManager.Target.IsCast && _mightyBash.IsSpellUsable && _mightyBash.IsDistanceGood)
                    {
                        var resultLua =
                            Lua.LuaDoString(
                                "ret = \"false\"; spell, rank, displayName, icon, startTime, endTime, isTradeSkill, castID, interrupt = UnitCastingInfo(\"target\"); if interrupt then ret = \"true\" end",
                                "ret");
                        if (resultLua == "true")
                        {
                            _mightyBash.Launch();
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Logging.Write("Error in FightClass " + FightClassName + ": " + e);
            }
            Thread.Sleep(35); // Wait for UC usage
        }
    }

    public void Dispose()
    {
        _isLaunched = false;
        Logging.Write("FightClass Disposed: " + FightClassName);
    }

    public void ShowConfiguration()
    {
        MessageBox.Show("No setting for this Fight Class: " + FightClassName);
    }
}

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.