Code:
function On_Gossip(unit, event, player)
unit:GossipCreateMenu(15704, player, 0) --There's a great evil held up inside this door, friend. I am the only one with access to the inside.
unit:GossipMenuAddItem(0, "Jonathan, please open the door.", 1, 0)
unit:GossipSendMenu(player)
end
function Gossip_Submenus(unit, event, player, id, intid, code)
if(intid == 1) then
unit:GossipCreateMenu(15607, player, 0) --What?! You can't be serious! If I open the gate then he will escape and this world will come to a swift end, and I will not allow that to happen!
unit:GossipMenuAddItem(1, "We're not here for tea and crumpets, Jonathan. Me and my allies seek to destroy the evil one.", 2, 0)
end
if(intid == 2) then
unit:GossipCreateMenu(15606, player, 0) --Very well, then. I will open the gate for a short time. Once you and your allies enter the prison, you will not be able to exit until you defeat him.
unit:GossipMenuAddItem(1, "I understand, Jonathan, open the gate.", 3, 0)
end
if(intid == 3) then
unit:RegisterEvent("Jonathan_Open_Gate", 3000, 1)
unit:RegisterEvent("Jonathan_Summon_Boss", 5000, 1)
unit:SendChatMessage(12, 0, "Heros, quickly enter the prison, he cannot be allowed to escape!")
end
end
function Jonathan_Open_Gate(unit, event)
local x = unit:GetX()
local y = unit:GetY()
local z = unit:GetZ()
local door = unit:GetGameObjectNearestCoords(x, y, z, 180904) --door I want opened's ID
if (door ~= nil) then
door:Activate()
end
end
function Jonathan_Summon_Boss(unit, event)
unit:SpawnCreature(99999, -8267.537109, 1539.098145, -4.42702, 1, 2212, 1)
end
RegisterUnitGossipEvent(15693, 1, "On_Gossip")
RegisterUnitGossipEvent(15693, 2, "Gossip_Submenus")
Any help will be repped :>