hello
i try to write a little helper for magtheridon but i've problems with some protected functions.
for example here is a part of my source so that you can understand what i try to do.
if target is Hellfire Channeler
then
if target is casting Dark Mending
then
/cast kick
elseif combopoints < 5
then
/cast shiv
elseif combopoints == 5
then
/cast rupture
end
end
function rogue_magtheridon()
local tname;
tname = UnitName("target");
if(tname == "Hellfire Channeler")
then
DEFAULT_CHAT_FRAME:AddMessage("target is Hellfire Channeler");
local spell, _, _, _, _, _ = UnitCastingInfo("target")
if(spell == "Dark Mending")
then
DEFAULT_CHAT_FRAME:AddMessage("trying to kick");
RunMacroText("/cast Kick");
--RunMacroText("/p gekickt");
elseif(GetComboPoints() < 5)
then
DEFAULT_CHAT_FRAME:AddMessage("cast shiv");
--RunMacroText("/cast shiv");
elseif(GetComboPoints() == 5)
then
DEFAULT_CHAT_FRAME:AddMessage("cast rupture");
--RunMacroText("/cast Rupture");
end
end
end
i don't know if it is possible to do that by a macro.
and now i need some help how i can get this code to work
or an alternativ idead that has the same effect.
i don't want that my addon plays for me.
if i use a makro that puts poisons on my weapons with modifier etc its the same thing.
i only want a better overview to the raid.
and thats only an example not the finished source.
which part is confused?
*edit
i want a macro that calls this function an the lua script is only checking what the best action is.
for example if i press my macro the script takes shiv as the best choice.. next time the mob is casting the spell and the script takes another attack..
No, it is having the mod play the game for you. Mods and macros cannot decide which actions to cast for you based on what's going on. It *can* though tell you what to do and have *you* do it. Blizzard's stance is UI not AI.
i don't want that my addon plays for me.
if i use a makro that puts poisons on my weapons with modifier etc its the same thing.
i only want a better overview to the raid.
and thats only an example not the finished source.
which part is confused?
*edit
i want a macro that calls this function an the lua script is only checking what the best action is.
for example if i press my macro the script takes shiv as the best choice.. next time the mob is casting the spell and the script takes another attack..
What you're looking to do is have a code make decisions for you based on a condition which affects combat. Cannot be done. At all. And never will be. This is called semi-botting and it was close enough to full-blown cheating to warrant having it removed.
Quote from idle »
which part is confused?
Apparently you.
Edit: Actually there is an alternative. An addon can check your conditions and at a precise moment in combat flash a message on the screen telling you to press a certain button. Though you still have to press the button. And I'll be blunt: it's downright cheap play and you aren't going to win any most-skilled awards running it.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
i try to write a little helper for magtheridon but i've problems with some protected functions.
for example here is a part of my source so that you can understand what i try to do.
if target is Hellfire Channeler
then
if target is casting Dark Mending
then
/cast kick
elseif combopoints < 5
then
/cast shiv
elseif combopoints == 5
then
/cast rupture
end
end
i don't know if it is possible to do that by a macro.
and now i need some help how i can get this code to work
or an alternativ idead that has the same effect.
thx
BTW, read the PIL. You're confused about some of Lua's basic syntax.
if i use a makro that puts poisons on my weapons with modifier etc its the same thing.
i only want a better overview to the raid.
and thats only an example not the finished source.
which part is confused?
*edit
i want a macro that calls this function an the lua script is only checking what the best action is.
for example if i press my macro the script takes shiv as the best choice.. next time the mob is casting the spell and the script takes another attack..
What you're looking to do is have a code make decisions for you based on a condition which affects combat. Cannot be done. At all. And never will be. This is called semi-botting and it was close enough to full-blown cheating to warrant having it removed.
Apparently you.
Edit: Actually there is an alternative. An addon can check your conditions and at a precise moment in combat flash a message on the screen telling you to press a certain button. Though you still have to press the button. And I'll be blunt: it's downright cheap play and you aren't going to win any most-skilled awards running it.