Twist Gaming
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Need Help with lua scripting

Go down

Need Help with lua scripting Empty Need Help with lua scripting

Post  davedave Fri Jul 30, 2010 12:49 am

Hello, now i have look at guides and stuff but i cant figure out what is wrong with my really basic script for a custom NPC :

Code:
 
function MrHoneyBadger_OnCombat(Unit, Event)
Unit:SendChatMessage(12, 0, "How dare you!!")
end

function MrHoneyBadger_OnLeaveCombat(Unit, Event)
Unit:RemoveEvents()
Unit:SendChatMessage(11, 0, "hahaha!")
end

function MrHoneyBadger_OnDied(Unit, Event)
Unit:RemoveEvents()
Unit:SendChatMessage(12, 0, "Fools! You really thought i was that weak? This is a mear incarnation of me! If you want a real challenge come and find me in my realm of the Forest...")
end

function MrHoneyBadger_OnKilledTarget(Unit, Event)
Unit:SendChatMessage(12, 0, "Muhahaha! Maybe now you will show me some more respect...")
end

RegisterUnitEvent(5080002, 1, "MrHoneyBadger_OnCombat")
RegisterUnitEvent(5080002, 2, "MrHoneyBadger_OnLeaveCombat")
RegisterUnitEvent(5080002, 3, "MrHoneyBadger_OnKilledTarget")
RegisterUnitEvent(5080002, 4, "MrHoneyBadger_OnDied")

the NPC has spawn ID 5080002 and i've spawned him in game. i tried a lower spawn ID to see if for some reason the really high one caused a problem but a low one didn't work either.

I saved the lua file in the scripts folder in Arcemu and called it Mr_Honey_Badger.lua

Sorry i get impatient easily, is there a forum anyone could suggest that is more attuned with lua scripting for wow ?

Thanks,
davedave
davedave
davedave
Member
Member

Posts Posts : 16
Reputation Reputation : 0

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum