Jump to content
Sign in to follow this  
whatisgoingon

"Key-down" / castmodifier script macro - why this error, whats not working?

Recommended Posts

/script if (IsCtrlKeyDown())then CastSpellByName("Arcane Explosion") else CastSpellByName("Frost Nova");end

I found this as an alternative for so called castmodifier macros (in retail wow mod:shift etc)

it gives me the red error ingame: [string "if (IsCtrlKeyDown())then CastSpellByName("A..]:1: attempt to call global `IsCtrlKeyDown´ (a nil value)

what does this mean and where is the error and how to make this work?

Share this post


Link to post
Share on other sites
3 minutes ago, Athene said:

IsControlKeyDown()

yes, found it working like so:

/script if IsControlKeyDown() then CastSpellByName("Flamestrike(Rank 6)") else CastSpellByName("Arcane Explosion(Rank 6)")end

do you know how i can get this to work with items, such as food? what terms do you use instead of CastSpellByName? ..UseItemByName or something similar?

Share this post


Link to post
Share on other sites
11 hours ago, Athene said:

Yes, that's it ;)

You can find the list of functions in the API with correct syntax here: http://wowwiki.wikia.com/wiki/World_of_Warcraft_API?oldid=221250

very nice, but I cant find any UseItemByName in there

there is the way to use inventory slots. What way is there to use a specific item directly, regardless where it is placed in the inventory (by name)?

Share this post


Link to post
Share on other sites

btw how do you do this for 3 or more in 1 macro? shift, ctrl and none

/script if IsShiftKeyDown() then CastSpellByName("Flamestrike(Rank 6)") if IsControlKeyDown() then CastSpellByName("Arcane Explosion(Rank 1)") else CastSpellByName("Arcane Explosion(Rank 6)")end

doesnt seem to be working - bold (if statement) reason?

Share this post


Link to post
Share on other sites
2 minutes ago, Athene said:

Change this if to an elseif

love you, works!

appreciate the feedback on the PM regarding items and truly all macro questions have been answered.

Share this post


Link to post
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
Sign in to follow this  

×