Jump to content

Recommended Posts

Hello, you can use code like 

       var spell = new Spell("Healing Touch");
        spell.Launch(true, false);
        Thread.Sleep(Usefuls.Latency + 300);
        while (ObjectManager.Me.CastingSpell.Name == "Healing Touch")
        {
            if (ObjectManager.Me.HealthPercent > 80)
            {
                Lua.LuaDoString("SpellStopCasting() SpellStopCasting()");
                break;
            }
            Thread.Sleep(50);
        }

https://wrobot.eu/forums/topic/2652-how-to-cancel-the-current-cast/

 

What game locale are you using? The safest way is to use NameInGame instead of Name if you are using EN game locale.

Or instead of string name comparsion - use something like this (works for me 100% times):
 

public Spell LightningBolt = new Spell("Lightning Bolt");

if (ObjectManager.Me.CastingSpell.NameInGame == LightningBolt.NameInGame)
{
  // Your action here
}

 

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...