@ Shredfire I could be wrong on this, but I think that Lua is case sensitive in some areas. Make sure you use the correct capital or lowercase letters in the right settings.
On another note I have a question about Lua scripting. I am currently working on scripting Hex Lord Malacrass for ZA. I have 2 out of 3 of his spells working correctly but one I can't get to work for some reason. Basically what it does is takes the abilities of a certain player class in the raid and gives them to Hex Lord for use. I know for this to work correctly you need to find the correct number for the player class that has been targeted. I use the :GetPlayerClass() to find this number and set it to a variable so I can call the certain class abilities. Here is what my code looks like:
Code:
function HexLord_SoulDrain(Unit, event)
Unit:RemoveEvents()
Unit:SendChatMessage(12, 0, "Your will belong ta me now!")
Unit:PlaySoundToSet(12046)
Unit:FullCastSpellOnTarget(43501, Unit:GetRandomPlayer(0))
class = Unit:GetPlayerClass()
if class == 1 then
Unit:SendChatMessage(11, 0, "Check Warrior")
Unit:RegisterEvent("WarriorSpells", 1000, 1)
elseif class == 2 then
....
end
Unit:RegisterEvent("HexLord_SpiritBolts", 30000, 0)
end
What happens is he says the chat message, I heard the sound play, and he casts the spell on a random player. But that is all the happens. I don't see the message "Check Warrior" appear. I have reconfigured how I use the :GetPlayerClass() option may times but to the same affect. The question is am I doing something wrong here or does the :GetPlayerClass() option just not work on the Lua engine.
Help would be greatly appreciated. If I can get this working correctly I would love to post it here for everyone to use.
Edit: Since GetPlayerClass doesn't work. I just set it to a randomizer event. This should work for now.
-Sumner