Jump to content
Sign in to follow this  
whatisgoingon

How to simply use an item with a script, in a macro? not from inventory slot, from name

Recommended Posts

Just like

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

but not for spells, for.. food in this case

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

Share this post


Link to post
Share on other sites
4 hours ago, asdaaf said:

if you have supermacro you can use use('itemname').

Or use CastModifier which is very recommendet 

Share this post


Link to post
Share on other sites

i have castmodifiers but how does this help me writing a script? i need to know what to put into it

supermacro gave me too much trouble. i thank you for circumnavigating my question and desire to such a tool, but i really want it as a clean and addon-free macro. since it works, as you see above, with this script, for spells, without an addon.

what way is there to write it as a script?

Share this post


Link to post
Share on other sites

if you have castmodifier try this

/run if IsControlKeyDown() then MMC.DoUse('item1') else MMC.DoUse('item2') end

 

Share this post


Link to post
Share on other sites

Without any addons you could do this:

/run for i = 0, 4 do for j = 1, GetContainerNumSlots(i) do if strfind(GetContainerItemLink(i, j) or '', 'itemname') then UseContainerItem(i, j) return end end end

 

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  

×