Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GossipHello(pUnit, pMisc, plr)
- pUnit:GossipCreateMenu(40002, plr, 0)
- if(plr:HasGMPermissions()) then
- pUnit:GossipMenuAddItem( 0, "Start The Event", 1 )
- pUnit:GossipMenuAddItem( 0, "Close The Event", 2)
- pUnit:GossipSendMenu(plr)
- else
- pUnit:GossipMenuAddItem( 0, "Ho Ho Ho, Merry Christmas",3)
- pUnit:GossipSendMenu(plr)
- end
- end
- function GossipSelectOption(pUnit, pMisc, plr, Id, IntId, Code)
- if IntId == 1 then
- -- mass spawning
- plr:GossipComplete()
- end
- if IntId == 2 then
- plr:GossipComplete()
- end
- end
- function Hellper(pUnit, Event)
- pUnit:SetAllowedToEnterCombat(false)
- pUnit:Root()
- pUnit:DisableMelee()
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- pUnit:RegisterEvent("SendMessages", 20000, 0)
- end
- function SendMessages(pUnit)
- pUnit:SendChatMessage(15, 0, "Merry Christmas Everyone!")
- pUnit:Emote(4, 2000)
- end
- function Deda(pUnit, Event)
- pUnit:SetUInt64Value(UNIT_FIELD_BYTES_1, 4)
- end
- function Snowball(pUnit, Event)
- pUnit:SetAllowedToEnterCombat(false)
- pUnit:Root()
- pUnit:DisableMelee()
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- pUnit:RegisterEvent("Gnome_CastSpells", 10000, 0)
- end
- function Gnome_CastSpells(pUnit)
- local gnome = pUnit:GetCreatureNearestCoords(16279.0f,16273.8f,17.3148f, 15835)
- pUnit:FullCastSpellOnTarget(21343, gnome)
- end
- function Snowber(pUnit, Event)
- pUnit:SetAllowedToEnterCombat(false)
- pUnit:Root()
- pUnit:DisableMelee()
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- pUnit:RegisterEvent("Gnome_CastSpells", 15000, 0)
- end
- function Firework(pUnit, Event)
- pUnit:SetAllowedToEnterCombat(false)
- pUnit:Root()
- pUnit:DisableMelee()
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- pUnit:RegisterEvent("CastFirework", 5000, 0)
- end
- function CastFirework(pUnit)
- pUnit:FullCastSpell(11543)
- end
- function Firework2(pUnit)
- pUnit:SetAllowedToEnterCombat(false)
- pUnit:Root()
- pUnit:DisableMelee()
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- pUnit:RegisterEvent("CastFirework2", 6000, 0)
- end
- function CastFirework2(pUnit)
- pUnit:FullCastSpell(11540)
- end
- function Firework3(pUnit)
- pUnit:SetAllowedToEnterCombat(false)
- pUnit:Root()
- pUnit:DisableMelee()
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- pUnit:RegisterEvent("CastFirework3", 7000, 0)
- end
- function CastFirework3(pUnit)
- pUnit:FullCastSpell(11542)
- end
- function Firework4(pUnit)
- pUnit:SetAllowedToEnterCombat(false)
- pUnit:Root()
- pUnit:DisableMelee()
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- pUnit:RegisterEvent("CastFirework4", 9000, 0)
- end
- function CastFirework4(pUnit)
- pUnit:FullCastSpell(11543)
- end
- function Firework5(pUnit)
- pUnit:SetAllowedToEnterCombat(false)
- pUnit:Root()
- pUnit:DisableMelee()
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- pUnit:RegisterEvent("CastFirework5", 8000, 0)
- end
- function CastFirework5(pUnit)
- pUnit:FullCastSpell(11541)
- end
- function Firework6(pUnit)
- pUnit:SetAllowedToEnterCombat(false)
- pUnit:Root()
- pUnit:DisableMelee()
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- pUnit:RegisterEvent("CastFirework6", 10000, 0)
- end
- function CastFirework6(pUnit)
- pUnit:FullCastSpell(11543)
- end
- function TalkingNpc(pUnit, Event)
- pUnit:SetAllowedToEnterCombat(false)
- pUnit:Root()
- pUnit:DisableMelee()
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- pUnit:RegisterEvent("EmoteTalk", 10000, 0)
- end
- function EmoteTalk(pUnit)
- pUnit:Emote(1, 4000)
- end
- function AgentAtDoor(pUnit, Event)
- if Event == 18 then
- pUnit:RegisterEvent("CheckEveryFive", 5000, 0)
- elseif Event == 4 then
- pUnit:RemoveEvents()
- end
- end
- function CheckEveryFive(pUnit)
- for k,plrs in pairs(pUnit:GetPlayersInRange()) do
- if plrs:HasItemEquipped(34085) and plrs:HasItemEquipped(21254) and plrs:HasItemEquipped(34086) then
- else
- plrs:AddItemToSlot(34085, 1, CHEST)
- plrs:AddItemToSlot(34086, 1, FEET)
- plrs:AddItemToSlot(21254, 1, HEAD)
- end
- end
- end
- function Snowman(pUnit, Event)
- if Event == 18 then
- pUnit:RegisterEvent("Dance_Emote", 5000, 0)
- elseif Event == 4 then
- pUnit:RemoveEvents()
- end
- end
- function Dance_Emote(pUnit)
- for k,plrs in pairs(pUnit:GetInRangePlayers()) do
- plrs:Emote(10, 5000)
- end
- end
- function OnGmIsland(plr)
- plr:PlaySoundToSet(22522)
- local Type = 8
- local grade = 1
- local pack = LuaPack:CreatePacket(SMSG_WEATHER, 9)
- if Type == 0
- pack:WriteUInt(0)
- pack:WriteUInt(0)
- pack:WriteUInt(0)
- pack:WriteUInt(0)
- elseif Type == 1 then
- pack:WriteUInt(Type)
- pack:WriteUInt(0)
- pack:WriteUInt(0)
- pack:WriteUInt(0)
- else
- pack:WriteUInt(Type)
- pack:WriteUInt(0)
- pack:WriteUInt(0)
- end
- plr:SendPacket(pack)
- plr:SendChatMessage(42,0,"Enjoy this christmas party")
- end
- function Reindeer(pUnit, pMisc, plr)
- pUnit:GossipCreateMenu(40002, plr, 0)
- pUnit:GossipMenuAddItem( 0, "I want to transcend back to the chield", 1 )
- pUnit:GossipMenuAddItem( 0, "Nevermind", 2)
- pUnit:GossipSendMenu(plr)
- end
- function GossipSelectOption(pUnit, pMisc, plr, Id, IntId, Code)
- if IntId == 1 then
- local Taxi = LuaTaxi:GetTaxiPath(1985)
- plr:StartTaxi(Taxi, 22724)
- plr:PlaySoundToSet(22523)
- end
- if IntId == 2 then
- plr:GossipComplete()
- end
- end
- function SantaClause(pUnit, pMisc, plr)
- pUnit:GossipCreateMenu(40002, plr, 0)
- pUnit:GossipMenuAddItem( 0, "Tell me what is your wish?", 1 );
- pUnit:GossipMenuAddItem( 0, "1.I wish for a new toy", 2);
- pUnit:GossipMenuAddItem( 0, "2.I wish for a new mount", 3);
- pUnit:GossipMenuAddItem( 0, "3.I wish for a lot of money", 4);
- pUnit:GossipMenuAddItem( 0, "4.I wish to be smart", 5);
- pUnit:GossipMenuAddItem( 0, "5.I wish to be your helper", 6);
- pUnit:GossipSendMenu(plr)
- end
- function GossipSelectOption(pUnit, pMisc, plr, Id, IntId, Code)
- if IntId == 1 then
- plr:RemoveItem(1179, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:AddItem(44606, 1)
- plr:GossipComplete()
- end
- if IntId == 3 then
- plr:RemoveItem(1179, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:CastSpell(25859)
- plr:GossipComplete()
- if IntId == 4 then
- plr:RemoveItem(1179, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:AddCoinage(500000000)
- end
- if IntId == 5 then
- plr:RemoveItem(1179, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:CastSpell(42259)
- plr:GossipComplete()
- end
- if IntId == 6 then
- plr:RemoveItem(1179, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:RemoveItem(17197, 1)
- plr:SetUInt32Value(UNIT_FIELD_DISPLAYID, 15698)
- plr:GossipComplete()
- end
- if IntId == 7 then
- plr:GossipComplete()
- end
- end
- RegisterGossipEvent(55913, 1, "xmas")
- RegisterGossipEvent(55913, 1, "GossipSelectOption")
- RegisterGossipEvent(24906, 1, "reindeer")
- RegisterGossipEvent(24906, 1, "GossipSelectOption")
- RegisterGossipEvent(13444, 1, "santa"
- RegisterGossipEvent(13444, 1, "GossipSelectOption")
- RegisterUnitEvent(13444, 18, "Deda")
- RegisterUnitEvent(15746, 18, "Hellper")
- RegisterUnitEvent(15838, 18, "Snowball")
- RegisterUnitEvent(15835, 18, "Snowber")
- RegisterUnitEvent(55915, 18, "AgentAtDoor")
- RegisterServerHook(SERVER_HOOK_EVENT_ON_ENTER_WORLD, "OnGMIsland")
- RegisterUnitEvent(55916, 18, "Firework")
- RegisterUnitEvent(55917, 18, "Firework2")
- RegisterUnitEvent(55918, 18, "Firework3")
- RegisterUnitEvent(55919, 18, "Firework4")
- RegisterUnitEvent(55920, 18, "Firework5")
- RegisterUnitEvent(55921, 18, "Firework6")
- RegisterUnitEvent(13636, 18, "Snowman")
- RegisterUnitEvent(15780, 18, "TalkingNpc")
- RegisterUnitEvent(15788, 18, "TalkingNpc")
- RegisterUnitEvent(15787, 18, "TalkingNpc")
Advertisement
Add Comment
Please, Sign In to add comment