Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Cinema = {}
- Cinema.Gossiper = 90091
- Cinema.Nicolas = 99902
- Cinema.Dummy = 99903
- function Cinema.Cinematic_OnGossip(pUnit, event, player)
- pUnit:GossipCreateMenu(100, player, 0)
- pUnit:GossipMenuAddItem(0, "Hello Soldier, Begin Your Journey Here ..", 100, 0)
- pUnit:GossipSendMenu(player)
- end
- function Cinema.Cinematic_OnGossipSubMenus(pUnit, event, player, id, intid, code)
- if (intid == 100) then
- pUnit:RemoveEvents()
- pUnit:SetNPCFlags(2)
- pUnit:RegisterEvent(Cinema.Cinematic_Phase1, 1000, 1)
- end
- player:GossipComplete()
- end
- RegisterUnitGossipEvent(Cinema.Gossiper, 1, Cinema.Cinematic_OnGossip)
- RegisterUnitGossipEvent(Cinema.Gossiper, 2, Cinema.Cinematic_OnGossipSubMenus)
- function Cinema.Cinematic_Phase1(pUnit, event)
- pUnit:SendChatMessage(12, 0, "Welcome to Universe-WoW. Here Is Where You Will Make Yourself The Warrior That You Want To Become.")
- pUnit:RegisterEvent(Cinema.Cinematic_Phase2, 6000, 1)
- end
- function Cinema.Cinematic_Phase2(pUnit, event)
- pUnit:SendChatMessage(12, 0, "Remember That The Path You Choose Is Bound. You Only Get 1 Choice, So Be Wise In Your Choosing.")
- pUnit:RegisterEvent(Cinema.Cinematic_Phase3, 6000, 1)
- end
- function Cinema.Cinematic_Phase3(pUnit, event)
- pUnit:SendChatMessage(12, 0, "Come with me....")
- local x, y, z, o = pUnit:GetX(), pUnit:GetY(), pUnit:GetZ(), pUnit:GetO()
- pUnit:MoveTo(x - 36, y + 14, z + 0, o)
- pUnit:RegisterEvent(Cinema.Gossiper_Speech1, 4500, 1)
- end
- function Cinema.Gossiper_Speech1(pUnit, event)
- pUnit:SendChatMessage(12, 0, "Here on Universe-WoW, We Want You To Work For Your Reputation.")
- pUnit:Emote(1, 100)
- pUnit:RegisterEvent(Cinema.Gossiper_Speech2, 4500, 1)
- end
- function Cinema.Gossiper_Speech2(pUnit, event)
- pUnit:SendChatMessage(12, 0, "Nothing Here Will Be Handed To You. You Will Have To Earn Your Way To The Top.")
- pUnit:Emote(1, 100)
- pUnit:RegisterEvent(Cinema.Gossiper_Speech3, 4500, 1)
- end
- function Cinema.Gossiper_Speech3(pUnit, event)
- pUnit:SendChatMessage(12, 0, "You Will Encounter Many Obstacles, But You Must Overcome Those Obstacles To Achieve Your Goal To Be The Best.")
- pUnit:Emote(1, 100)
- pUnit:RegisterEvent(Cinema.Cinematic_Phase4, 6000, 1)
- end
- function Cinema.Cinematic_Phase4(pUnit, event)
- pUnit:SendChatMessage(14, 0, "KEEP TRAINING MEN !! STOP SLACKING YOU PEASANTS !")
- local x, y, z, o = pUnit:GetX(), pUnit:GetY(), pUnit:GetZ(), pUnit:GetO()
- pUnit:MoveTo(x - 50, y - 10, z - 5, o)
- pUnit:RegisterEvent(Cinema.Gossiper_Speech5, 5000, 1)
- end
- function Cinema.Gossiper_Speech5(pUnit, event)
- pUnit:SendChatMessage(12, 0, "To Your Right, You Will See The PVP Boat. If You Choose To Go With The Gladiator Path(PVP), Then You Must Go There...")
- pUnit:Emote(1, 100)
- pUnit:RegisterEvent(Cinema.Gossiper_Speech6, 6000, 1)
- end
- function Cinema.Gossiper_Speech6(pUnit, event)
- pUnit:SendChatMessage(12, 0, "To Your Left, You Will See The PVE Boat. If You Choose To Go With The Warrior Path(PVE), Then You Must Go There.")
- pUnit:Emote(1, 100)
- pUnit:RegisterEvent(Cinema.Gossiper_Speech7, 6000, 1)
- end
- function Cinema.Gossiper_Speech7(pUnit, event)
- pUnit:SendChatMessage(12, 0, "I Have Now Placed The Men You Need To Speak With On The Ships. You May Now Go And Choose Your Path.")
- pUnit:Emote(1, 100)
- pUnit:RegisterEvent(Cinema.Cinematic_Phase5, 5000, 1)
- end
- function Cinema.Cinematic_Phase5(pUnit, event)
- pUnit:SendChatMessage(12, 0, "Good Luck In Your Journies Soldier.")
- pUnit:SpawnCreature(Cinema.Nicolas, -11539.008789, -4567.151855, 9.302907, 4.762055, 35, 0)
- pUnit:SpawnCreature(Cinema.Dummy, -11582.299805, -4805.240234, 10.704400, 2.328890, 35, 0)
- pUnit:RegisterEvent(Cinema.Gossiper_Despawn, 3000, 1)
- end
- function Cinema.Gossiper_Despawn(pUnit, event)
- -- Not needed if Despawn has time pUnit:SpawnCreature(Cinema.Gossiper, -11459.845703, -4686.315918, 8.566786, 2.729703, 35, 0)
- --[[ I dont understand what this is for and the rest of the script wont work.
- Why despawn Nicolas couple seconds after spawning him??
- pUnit:RegisterEvent(Cinema.Nicolas_Despawn2, 4500, 1)
- ]]
- pUnit:RemoveEvents()
- pUnit:SetPhase(2) --Setting phase instead and desp resp later, so no need for spawn a new one on reset pUnit:Despawn(4500, 0)
- end
- --[[ Commented out couse of above
- function Cinema.Nicolas_Despawn2(pUnit, event)
- pUnit:SendChatMessage(14, 0, "Test to see if this works..")
- if(Nicolass ~= nil) then
- Nicolas:Despawn(4500, 0)
- Nicolas:RegisterEvent(Cinema.Dummy_OnGossipSubMenus, 1000, 1)
- else
- pUnit:SendChatMessage(12, 0, "Error! "..Cinema.Nicolas.." NPC not found near.")
- end
- end
- ]]
- function Cinema.Dummy_OnGossip(pUnit, event, player)
- pUnit:GossipCreateMenu(100, player, 0)
- pUnit:GossipMenuAddItem(0, "Dummy test item", 100, 0)
- pUnit:GossipSendMenu(player)
- end
- function Cinema.Dummy_OnGossipSubMenus(pUnit, event, player, id, intid, code)
- if (intid == 100) then
- pUnit:SetNPCFlags(2)
- pUnit:RegisterEvent(Cinema.Dummy_ScriptReset, 3000, 1)
- end
- player:GossipComplete()
- end
- function Cinema.Dummy_ScriptReset(pUnit, event)
- --What was this for? pUnit:SetNPCFlags(1)
- local x, y, z = pUnit:GetX(), pUnit:GetY(), pUnit:GetZ()
- local Nicolas = pUnit:GetCreatureNearestCoords(x, y, z, Cinema.Nicolas)
- if (Nicolas ~= nil) then
- Nicolas:Despawn(0, 0)
- else
- pUnit:SendChatMessage(14, 0, "Error! Nicolas was nil")
- end
- local Gossiper = pUnit:GetCreatureNearestCoords(x, y, z, Cinema.Gossiper)
- if (Gossiper ~= nil) then
- Gossiper:SetNPCFlags(1)
- Gossiper:Despawn(0, 1000)
- Gossiper:SetPhase(1)
- else
- pUnit:SendChatMessage(14, 0, "Error! Gossiper was nil")
- end
- pUnit:Despawn(0, 0)
- end
- RegisterUnitGossipEvent(Cinema.Dummy, 1, Cinema.Dummy_OnGossip)
- RegisterUnitGossipEvent(Cinema.Dummy, 2, Cinema.Dummy_OnGossipSubMenus)
- -- The registerevent wont work for the NPCs whithout these:
- RegisterUnitEvent(Cinema.Gossiper, 18, function() return; end)
- RegisterUnitEvent(Cinema.Nicolas, 18, function() return; end)
- RegisterUnitEvent(Cinema.Dummy, 18, function() return; end)
- --[[
- -- Old unused (removed) code. Made them all be declared in the script locally
- local Gossiper;
- local Nicolas;
- local Dummy;
- function Cinema.Gossiper_OnSpawn(pUnit, event)
- Gossiper = pUnit
- end
- function Cinema.Nicolas_OnSpawn(pUnit, event)
- Nicolas = pUnit
- end
- function Cinema.Dummy_OnSpawn(pUnit, event)
- Dummy = pUnit
- end
- RegisterUnitEvent(90091, 18, "Gossiper_OnSpawn")
- RegisterUnitEvent(99902, 18, "Nicolas_OnSpawn")
- RegisterUnitEvent(99903, 18, "Dummy_OnSpawn")
- ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement