Jump to content

runmacroLUA not working on vanilla quest


Recommended Posts

as title says- from the quest profile editor the "runmacrolua" pulse doesn't pass the macro through to the game.

I made a bunch of files for BC that rely on that and im having issues backporting them.

 

anyone got a working example?

wave.xml

Link to comment
Share on other sites

 

17 minutes ago, Droidz said:

Hello, RunMacroText does not exist in Vanilla.

So there is no way to send a macro from a quest profile pulse?

Link to comment
Share on other sites

12 minutes ago, Droidz said:

Use normal lua code, what macro do you want use?

Anything... Mostly its a spell.  This was one from a previous thread.

RunMacroText("/petautocaston Firebolt")
Edited by eeny
Link to comment
Share on other sites

function Zorlen_TogglePetSpellAutocast(SpellName, mode)
	local m = nil
	if not (UnitHealth("pet") > 0) then
		Zorlen_debug("Your pet is not active or alive to use pet ability: "..SpellName)
		return false
	end
	for i=1, NUM_PET_ACTION_SLOTS, 1 do
		local slotspellname, slotspellsubtext, texture, isToken, isActive, autoCastAllowed, autoCastEnabled = GetPetActionInfo(i)
		if (slotspellname and slotspellname == SpellName) then
			if (mode == "on") then
				if not autoCastEnabled then
					TogglePetAutocast(i)
					return true
				end
			elseif (mode == "off") then
				if autoCastEnabled then
					TogglePetAutocast(i)
					return true
				end
			else
				TogglePetAutocast(i)
				return true
			end
		end
	end
	Zorlen_debug("Unable to locate pet ability: "..SpellName)
	return false
end

(ref: http://addons.us.to/addon/zorlen-0 file "Zorlen_Pets.lua")

 

Use:

Zorlen_TogglePetSpellAutocast("Firebolt", "on")

 

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