Ok well this IS NOT my script originally I'm just trying to modify it so that the npc will say something upon killing the player but I can't seem to get it to work cuz i'm still a Lua nub >.>
I've tried it two different ways but neither are working and I need some help on it if anyone could give me a hand.
Here is the script:
Code:function Battleguard(pUnit, Event) pUnit:RegisterEvent("Lookingforpvpers", 1000, 0) end function Lookingforpvpers(pUnit, Event) local tbl = pUnit:GetInRangeFriends() for k,v in pairs(tbl) do if v:IsInCombat() == true and v:IsPlayerAttacking() == true and v:GetDistance(pUnit) <= 1800 then pUnit:Kill(v) pUnit:SendChatMessage(12,0,Player:Getname()..", Keep those weapons outta my sight or pay with your life!") end end end RegisterUnitEvent(82027 , 18, "Battleguard")
It was a couple days ago that I got this script so I can't remember exactly who it was who posted it from another site, but I will look so I can give them credit.
But if anyone could tell me how to get the npc's to actually say something when they kill the player it would be a great help cuz I just can't get it to work for me.
I'll give +Rep for the help