ok i was browsing google looking for a way to get Trial of the Crusader to work. as i was browsing i came across this post that a guy had made a Lua script but couldn't get it to work. I give him full credit for creating this and im asking if anyone could help me get this working because id like to get it working on my 3.2a realms
Code:
function ACMaster_OnGossipTalk(pUnit, event, player, pMisc)
if (player:IsInCombat() == true) then
player:SendAreaTriggerMessage("You are in combat!")
else
pUnit:GossipCreateMenu(3544, player, 0)
pUnit:GossipMenuAddItem(0, "We are ready to start the Trial of the Crusader!", 1, 0)
pUnit:GossipMenuAddItem(0, "We are ready to start the Trial of the Grand Crusader!", 2, 0)
pUnit:GossipMenuAddItem(0, "I would like to leave the Argent Coliseum.", 3, 0)
pUnit:GossipSendMenu(player)
end
end
function ACMaster_OnGossipSelect1(pUnit, event, player, id, intid, code)
if (intid == 1) then
pUnit:GossipSendMenu(player)
pUnit:SendChatMessage(12, 0, "Those brave champions have chosen to do the Trial of the Crusader!")
pUnit:RegisterEvent("ACMaster_Talk2", 5000, 1)
elseif (intid == 2) then
pUnit:GossipSendMenu(player)
pUnit:SendChatMessage(12, 0, "Those brave crusaders have chosen to do the Trial of the Grand Crusader!")
pUnit:RegisterEvent("ACMaster_TalkG2", 5000, 1)
elseif (intid == 3) then
pUnit:GossipSendMenu(player)
player:Teleport(571, 8515.63, 725.667, 558.247, 4.272)
end
end
function ACMaster_Talk2(pUnit, event, player, id, intid, code)
pUnit:SendChatMessage(12, 0, "Your first battle awaits - let me introduce, Gormok the Impaler!")
pUnit:SpawnCreature(34796, 564.897, 176.751, 394.136, 4.673127, 16, 0)
pUnit:Despawn(1, 0)
end
function ACMaster_TalkG2(pUnit, event, player, id, intid, code)
pUnit:SendChatMessage(12, 0, "Your first battle awaits - let me introduce, Gormok the Impaler!")
pUnit:SpawnCreature(34797, 564.897, 176.751, 394.136, 4.673127, 16, 0)
pUnit:Despawn(1, 0)
end
RegisterUnitGossipEvent(34816, 1, "ACMaster_OnGossipTalk")
RegisterUnitGossipEvent(34816, 2, "ACMaster_OnGossipSelect1")
Code:
function SnoboldVassal_OnCombat(pUnit, event)
pUnit:RegisterEvent("SnoboldVassal_Batter", 5000, 0)
pUnit:RegisterEvent("SnoboldVassal_FireBomb", 12000, 0)
pUnit:RegisterEvent("SnoboldVassal_HeadCrack", 4500, 0)
end
function SnoboldVassal_Batter(pUnit, Event)
MainTank = pUnit:GetMainTank()
if (MainTank) ~= nil then
pUnit:CastSpellOnTarget(66408, pUnit:GetMainTank())
else
end
end
function SnoboldVassal_FireBomb(pUnit, event)
pUnit:FullCastSpellOnTarget(66313, pUnit:GetRandomPlayer(0))
end
function SnoboldVassal_HeadCrack(pUnit, event)
MainTank = pUnit:GetMainTank()
if (MainTank) ~= nil then
pUnit:CastSpellOnTarget(66407, pUnit:GetMainTank())
else
end
end
function SnoboldVassal_OnDied(pUnit, event)
pUnit:RemoveEvents()
pUnit:Despawn(1, 0)
end
function SnoboldVassal_OnLeaveCombat(pUnit, event)
pUnit:RemoveEvents()
pUnit:Despawn(1, 0)
end
RegisterUnitEvent(34800, 1, "SnoboldVassal_OnCombat")
RegisterUnitEvent(34800, 2, "SnoboldVassal_OnLeaveCombat")
RegisterUnitEvent(34800, 4, "SnoboldVassal_OnDied")