Hooksecurefunc and castspellbyname questions

#0 - April 9, 2007, 10:31 a.m.
Blizzard Post
Ok, so I am attempting to access CastSpellByName using hooksecurefunc as I'm assuming I correctly understand I need to... only, I can't find any good example of these two being used together, or at least not that I comprehend. I'm trying to access CastSpellByName from within a function that will hand it the spells name based on user hand defined preferences. The core idea of the code I'm working with is to be able to cycle the same set of keys through a predermined order of spells, in combat. The bound key calls the same CastSpellByName function and receives a different spell name depending on what sequence number you're on.

Sort of like being able to hit Shift+UpArrow and continue pressing your unmodified number buttons to access your Action Bar, instead of using you Action Bar Page Two keys and similar. The net result is kind of like using /castsequence, only it'd be like this, requiring a keypress to make a choice at each stage in the sequence:

Q u o t e:
/castsequence spell1a OR spell1b, spell2a OR Spell2b, spell3a OR spell3b, et cetera


Where do I place the hooksecurefunc call in relation to my function that accesses CastSpellByName? (Does it go inside it? Directly after? In the event handler for the keybinding?)

Do I have to use Secure header types in the entire add on for this to work?

Any and all help appreciatted. Thanks in advance. =D
#18 - April 11, 2007, 1:17 a.m.
Blizzard Post
/castsequence might also help you here. Check the macro FAQ for details.