Reply
Thread Tools Display Modes
Unread 11-02-12, 09:52 AM   #1
gmarco
Premium Member
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 97
CastSpellByID

Hi,
I am italian, and now we have the wow client in our language too.

I'd like to modify my macro to use the spell id and item id so I don't have to change them everytime I switch from the game in english and in italian.

For example now I have a simple macro:

#showtooltip
/y I am resurrecting %t
/cast [combat] Rebirth ; Revive


And this obviusly doesn't work when I start the game in italian.
I'd like to write it like:


#showtooltip
/y I am resurrecting %t
/cast [combat] spell:20484 ; spell:50769

but it seems not possible.

Instead it seems to works something like, for example:

/use item:86569 --> for crystal of insanity.

So it works for items, but not for spell or mount (I think they are spell too).

The questions are ... :-)

1) Am I miss something or it is in this way ?

2) Could I try to use the castspellbyid wow api function in any way and if yes can someone post some example ?

3) Last thing: if everything above is impossible is there an addon that can let us spellid or simplify the dual locale management of the macro ?

Thanks everyone.
gmarco is offline   Reply With Quote
Unread 11-02-12, 10:51 AM   #2
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 761
Can't cast spells by id as "spell:" is not implemented in the macro system.

Can't use lua either as the function is protected.
__________________
Profile: Curse | Wowhead
Vlad is offline   Reply With Quote
Unread 11-02-12, 10:54 AM   #3
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,191
What would probably work is have each spell twice in your macro.

Shift-click them from your spellbook in each language.

I mean something like:
/cast EnglishName
/cast ItalianName

It should skip whichever doesn't exist and move to the next.
Dridzt is offline   Reply With Quote
Unread 11-02-12, 12:48 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,007
Also to note, Even though Spell IDs don't work, Item IDs do. There are also other ways to use items. You can refer to the inventory slot they're equipped in for equipped items and you can also refer to Bag & Slot IDs.

Examples:
Code:
#Use Hearthstone by ItemID 6948
/use 6948
Code:
#Activate Trinket 1 by InventoryID 13
/use 13
Code:
#Activate item in Bag 0, Slot 1
#Bag IDs range 0-4 increasing right-to-left (Bag 0 is Backpack)
#Slot IDs start at index 1, increasing left-to-right, then top-to-bottom (Slot 1 is upper left slot)
/use 0 1
__________________
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
SDPhantom is offline   Reply With Quote
Reply

Go BackWoWInterface » AddOns, Compilations, Macros » Macro Help » CastSpellByID

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off