Thanks for your replay :P
I tryed what you told me to but didn't work
This is what I wrote:
/script MyFuncTable.MotW(); -- CastSpellByName('Mark of the Wild');
It crossed my mind that Mark of the Wild have a rank too. Is that why this doesn't work ?
Anyway, this is an overview on how I'm building the addon:
MyFuncTable = {
MyHealingFunc = function()
-- A lot of stuff happen here like which rank to use. so by exemple:
rank = 13; -- i know that doesn't exists ^^ it's jus't an exemple :P
-- It is checked who the target will be, so to the exemple let's say the target is player's target
MyCastFunc("Healing Touch", rank, "target");
end;
-- Some other functions here
}
function MyCastFunc(spell, rank, target)
if(not rank) then
CastSpellByName(spell);
else
CastSpellByName(spell.."(Rank "..rank..")");
end
SpellTargetUnit(target);
end;
Maybe by checking this exemple above, you can tell me what am I doing wrong with your trick :P Or some1 tell me if it is possible to make a button like the one's we drag from spellbook (able to associate to an action bar, show if target's in distance, if there are enough mana to be casted and the cooldown) :P
Thks again