Jump to content

Recommended Posts

I'm trying to find a way to use the ExtraActionButton1 to cast an AoE spell to kill NPC's. I've tried several variations including InteractWithNpc with "ExtraActionButton1:Click()" in the macro. This will give me the AoE green circle to put down, but it never clicks or uses it.

 

I've also tried the code from Use item on hostile "weakened" mob but I am not good enough with coding to change it from an item to a spell.

 

Any suggestions?

Link to comment
https://wrobot.eu/forums/topic/4137-use-extraactionbutton-spell-to-kill-npc/
Share on other sites

Like here: http://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/?do=findComment&comment=12204

try with this code: 

            Thread t = new Thread(() =>
            {
                uint itemId = 62899;
                uint spellId = 62899;
                int questId = 28000;
                while (robotManager.Products.Products.IsStarted)
                {
                    if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause)
                    {
                        if (!Quest.HasQuest(questId))
                            break;
                        if (ObjectManager.Target.IsValid && ObjectManager.Target.IsAlive)
                        {
                            if (itemId > 0)
                                ItemsManager.UseItem(itemId); // if it is item
                            if (spellId > 0)
                                SpellManager.CastSpellByIdLUA(spellId); // if it is spell
                            ClickOnTerrain.Pulse(new Vector3(ObjectManager.Target.Position)); // for AOE spell/item
                        }
                    }
                    Thread.Sleep(500);
                }
            });
            t.Start();

 

 

            Thread t = new Thread(() =>
            {
                uint itemId = 0;
                uint spellId = 185887;
                int questId = 38582;
                while (robotManager.Products.Products.IsStarted)
                {
                    if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause)
                    {
                        if (!Quest.HasQuest(questId))
                            break;
                        if (ObjectManager.Target.IsValid && ObjectManager.Target.IsAlive)
                        {
                            if (itemId > 0)
                                ItemsManager.UseItem(itemId); // if it is item
                            if (spellId > 0)
                                SpellManager.CastSpellByIdLUA(spellId); // if it is spell
                            ClickOnTerrain.Pulse(new Vector3(ObjectManager.Target.Position)); // for AOE spell/item
                        }
                    }
                    Thread.Sleep(500);
                }
            });
            t.Start();

 

This appears to work for normal spells in spellbook, like Heroic Leap, but does not activate the ExtraActionButton1 spell. 

Spell in question is185887 Ysera's Wrath

Quest 38582 To Old Friends

ps: you can also replace

                            if (itemId > 0)
                                ItemsManager.UseItem(itemId); // if it is item
                            if (spellId > 0)
                                SpellManager.CastSpellByIdLUA(spellId); // if it is spell

by

Lua.LuaDoString("ExtraActionButton1:Click()");

 

7 hours ago, Droidz said:

When you run in your wow chat 


/cast Ysera's Wrath

this works?

Nope.

7 hours ago, Droidz said:

ps: you can also replace


                            if (itemId > 0)
                                ItemsManager.UseItem(itemId); // if it is item
                            if (spellId > 0)
                                SpellManager.CastSpellByIdLUA(spellId); // if it is spell

by


Lua.LuaDoString("ExtraActionButton1:Click()");

 

This did.

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