Hey all. Ok so basically I've made this script where you talk to an NPC who gives out a quest for the arena. If you accept the quest then choose the first option upon talking to him again, you are moved down to the center of the arena and then after 5 seconds THIS SHOULD HAPPEN (but doesn't
): The battlemaster should speak (see code if you want to know what he says) and then spawn an NPC.
Code:
--[[
Arena Battlemaster Script
]]
-- Variables
local NPC_ID = 50000
-- On Triggers
function exampleGossipOnTalk(Unit, Event, player)
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "Let's do this!", 1, 0)
Unit:GossipMenuAddItem(0, "Forget it.", 2, 0)
Unit:GossipSendMenu(player)
end
function exampleGossipOnSelect(Unit, Event, player, id, intid, code, pMisc)
if (intid == 1)then
if player:HasQuest(50000) then
player:MovePlayerTo(-13208.142578, 263.146149, 21.858044, 1.000000, 4096)
Unit:RegisterEvent("Initiation_RoundOne", 5000, 1)
player:GossipComplete()
else
player:SendBroadcastMessage("You currently have no active arena quest.")
player:GossipComplete()
end
end
if (intid == 2) then
player:GossipComplete()
end
end
function Initiation_RoundOne(Unit, Event)
Unit:SendChatMessage(14, 0, "Good luck, challenger! Commence round one!!")
Unit:SpawnCreature(118, -13194.796875, 290.456818, 21.858200, 4.300000, 2, 0)
end
RegisterUnitGossipEvent(NPC_ID, 1, "exampleGossipOnTalk")
RegisterUnitGossipEvent(NPC_ID, 2, "exampleGossipOnSelect")
RegisterUnitEvent(NPC_ID, 0, "Initiation_RoundOne")
Any ideas?
Thankyou in advance