Code:
-- Much thanks goes to Stoneharry for his assistance.
local hax = nil
function haddan_OnMenu1(pUnit, event, player)
pUnit:GossipCreateMenu(4344576, player, 0)
pUnit:GossipMenuAddItem(9, "We need to stop lying low and start doing something. If we stay here the guards will track us down and arrest us.", 1, 0)
pUnit:GossipMenuAddItem(7, "I'll wait.", 2, 0)
pUnit:GossipSendMenu(player)
end
function haddan_OnGossipSelect(pUnit, event, player, id, intid, code)
if (intid == 1) then
pUnit:SendChatMessage(12, 0, "What is ther' tae do? We're stuck here 'til we can--")
player:GossipComplete()
pUnit:Emote(1, 1000)
end
if (intid == 2) then
player:GossipComplete()
end
end
function haddan_OnSpawn (pUnit, event, player)
pUnit:RegisterEvent("ancienterror_Cast", 5, 1)
end
RegisterUnitGossipEvent(844575, 1, haddan_OnMenu1)
RegisterUnitGossipEvent(844575, 2, haddan_OnGossipSelect)
RegisterUnitEvent(844575, 1, haddan_OnSpawn)
function ancienterror_Cast (pUnit, event, player)
hax = pUnit
hax:RegisterEvent("haddan_Cast", 5000, 1)
end
function haddan_Cast(pUnit, event, player)
pUnit:SendChatMessage(12, 0, "Did ye hear that? It's coming from upstairs...")
pUnit:SendChatMessage(16, 0, "The sound of a loud horn fills your ears.")
pUnit:Emote(6, 1155)
player:PlaySoundToPlayer(10843)
pUnit:RegisterEvent("haddan_scared_Cast", 5000, 1)
end
function haddan_scared_Cast(pUnit, event, player)
pUnit:SendChatMessage(12, 0, "Do ye even know what a bloody HORN means?! It means they've found us! We're dead!")
pUnit:Emote(430, 5555)
pUnit:RegisterEvent("haddan_beg_Cast", 5555, 1)
end
function haddan_beg_Cast(pUnit, event, player)
pUnit:SendChatMessage(12, 0, "Titans above, I beg of ye, save my spirit from damnation...")
end