function Frame1_OnLoad()
this:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED");
--this:RegisterEvent("COMBAT_LOG_EVENT");
end
function Frame1_OnEvent()
if((event == "UNIT_SPELLCAST_SUCCEEDED") and (arg1 == "player") and (arg2 == "Frostbolt") and (arg3 == "16") ) then
--if(event == "UNIT_SPELLCAST_SUCCEEDED")then
print("Hello world!");
end
end
Im using addon studio to make this. This will automatic generate the xml where i can dus drag a frame on the UI. The lua part is what i noobed out :P
Thanks for pointing out to use combat events, ill try to use that instead. But i would still like to know how i can use the arguments in my piece of code. Could anyone help me with that?
Hey all, im new to add-on programming and im trying to make an add-on to help me and my arena partner. The currently problem i have is, i want to use UNIT_SPELLCAST_SUCCEEDED event which can have 3 arguments:
Signature: ("unitID", "spell", "rank")
Arguments: unitID - The unit that's casting. (string) spell - The name of the spell that's being casted. (string) rank - The rank of the spell that's being casted. (string)
I tried this as a test which works for every completed cast:
function Frame1_OnLoad()
this:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED");
end
function Frame1_OnEvent()
if(event == "UNIT_SPELLCAST_SUCCEEDED") then
print("Hello world!");
end
end
But now i want to use the arguments to pick the correct spell, how could i implement this?
I had the same problem. Log out on wowace.com (not the forums), then log in on wowace.com (not the forums), then log in on the forums. Same effect as clearing your cookies.
0
0
Im using addon studio to make this. This will automatic generate the xml where i can dus drag a frame on the UI. The lua part is what i noobed out :P
0
if((event == "UNIT_SPELLCAST_SUCCEEDED") and (arg1 == "player") and (arg2 == "Frostbolt") and (arg3 == "16") )
and it gave me no error, but when i cast this skill "hello world" isnt showing. What could be the problem?
0
0
so i would like to use the arguments ("unitID", "spell", "rank") -> ("self", "Polymorph", "4")
But i dont know where and how i can implement and use these arguments
0
Signature: ("unitID", "spell", "rank")
Arguments: unitID - The unit that's casting. (string) spell - The name of the spell that's being casted. (string) rank - The rank of the spell that's being casted. (string)
I tried this as a test which works for every completed cast:
function Frame1_OnLoad()
this:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED");
end
function Frame1_OnEvent()
if(event == "UNIT_SPELLCAST_SUCCEEDED") then
print("Hello world!");
end
end
But now i want to use the arguments to pick the correct spell, how could i implement this?
0
Thanks that helped out :)