PDA

View Full Version : [Lua * Epic Release] - NPC Announcer!


RakkorZ - ZxoxZ
05-12-2009, 07:46 AM
Hello everyone.
I've made a new script in Lua.
An Npc Announcer.

Here it is: :D
--NPCNAME
RegisterUnitEvent(ENTRYID, 18, "NPCNAME")
RegisterUnitEvent(ENTRID, 4, "NPCNAME_Died")

function NPCNAME_Died(Unit, event, player)
Unit:RemoveEvents()
end

function NPCNAME(Unit, event, player)
Unit:RegisterEvent("NPCNAME_Say",60000, 0)
end

function NPCNAME_Say(Unit, event, player)
local chance = math.random(1,4)
if(chance == 1) then
Unit:SendChatMessage(12, 0, "MESSAGE1")
end
if(chance == 2) then
Unit:SendChatMessage(12, 0, "MESSAGE2")
end
if(chance == 3) then
Unit:SendChatMessage(12, 0, "MESSAGE3")
end
if(chance == 4) then
Unit:SendChatMessage(12, 0, "MESSAGE4")
end
end

http://img216.imageshack.us/img216/7936/001000logololozor.png

Hope you like it.

Thanks, :P
Regards,
Zxoxz.

Alvanaar
05-12-2009, 09:31 AM
I made a much more sophisticated one one or two days ago...
Search before you post buddy.

Alvanaar