Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ID of creature
- local entryid = 1 -- should NEVER be 1 as it is - 1 is usually waypoint
- function HeraldSpawns(pUnit, Event)
- pUnit:RegisterEvent("SaySomethingHerald", 5000, 1)
- end
- function SaySomethingHerald(pUnit)
- local chance = math.random(1,4)
- if(chance == 1) then
- pUnit:SendChatMessage(12, 0, "Got some spare change?")
- elseif(chance == 2) then
- pUnit:SendChatMessage(12, 0, "Mind your own business, pal!")
- elseif(chance == 3) then
- pUnit:SendChatMessage(12, 0, "Are you looking for a fight, you prick?")
- elseif(chance == 4) then
- pUnit:SendChatMessage(12, 0, "Come over here!")
- end
- pUnit:RegisterEvent("SaySomethingHerald", math.random(1000, 60000*5), 1) -- send a message every 0-5 minutes
- end
- function CreatureDieda(pUnit, Event)
- pUnit:RemoveEvents()
- end
- RegisterUnitEvent(entryid, 18, "HeraldSpawns")
- RegisterUnitEvent(entryid, 4, "CreatureDieda")
Advertisement
Add Comment
Please, Sign In to add comment