Hello Ownedcore
so I was thinking of making a cinematic with a boss fight after it but one thing that I need for my idea is that an npc gives and item (lets say item ID 59000) to every player within 50 yards, currently I have this:
Item script:
Code:
local Item = 59000
local race = {}
race[1] = 1
race[2] = 2
race[3] = 1
race[4] = 1
race[5] = 2
race[6] = 2
race[7] = 1
race[8] = 2
race[10] = 2
race[11] = 1
function Item_Trigger(item, event, player)
Item_menu(item, player)
end
function Item_menu(item, player)
if (player:IsInCombat() == true) then
player:SendAreaTriggerMessage("You can't disguise yourself while in combat!")
else
Item:GossipCreateMenu(3543, player, 0)
Item:GossipMenuAddItem(4, "Morph me into a Necromancer!", 22222, 0)
Item:GossipSendMenu(player)
end
end
function OnSelect(item, event, player, id, intid, code )
if (intid == 22222) then
player:SetModel(11163)
player:GossipComplete()
end
end
RegisterItemGossipEvent(59000, 1, "Item_Trigger")
RegisterItemGossipEvent(59000, 2, "OnSelect")
Cinematic Script (giving the item to players):
Code:
function Cinematic1(pUnit, event)
Jaina:SetMoveRunFlag(1)
local x, y, z, o = Jaina:GetX(), Jaina:GetY(), Jaina:GetZ(), Jaina:GetO()
Jaina:MoveTo(-133.344, -386.428, 26.589, 0.0)
Jaina:RegisterEvent("Cinematic2", 7000, 1)
end
function Cinematic2(pUnit, event)
Jaina:SendChatMessage(12, 0, "Alright listen up, this is what we are going to do.")
Jaina:RegisterEvent("Cinematic3", 3000, 1)
end
function Cinematic3(pUnit, event)
Jaina:SendChatMessage(12, 0, "Use the necklace to disguise yourself into a Necromancer and stop their ceremony.")
Jaina:SetFacing(0.00)
Jaina:GetInRangePlayers()
Jaina:AddItem(59000)
Jaina:RegisterEvent("Cinematic4", 1, 1)
end
So what I have here doesnt work and I dont know how to give every player within 50 yards of boss the item they need for the boss fight, any suggestions?
Kind regards, DaynNight