Code:
local GetDisplay = 17699
local NPCID = 90000
local item1id = 49623
local MyFlightPath = {
{1, 16218.30, 16277.84, 25},
{1, 16206.73, 16251.14, 32},
{1, 16228.76, 16230.82, 42},
{1, 16266.93, 16246.27, 63},
{1, 16275.62, 16281.19, 66},
{1, 16250.80, 16298.93, 51},
{1, 16224.79, 16301.91, 49},
{1, 16206.46, 16313.54, 39},
{1, 16189.04, 16307.65, 34},
{1, 16214.10, 16285.48, 26},
{1, 16218.45, 16281.15, 21}
}
local GMIslandTest = {
{1, 16218.30, 16277.84, 25},
{1, 16206.73, 16251.14, 32},
{1, 16228.76, 16230.82, 42},
{1, 16266.93, 16246.27, 63},
{1, 16275.62, 16281.19, 66},
{1, 16250.80, 16298.93, 51},
{1, 16224.79, 16301.91, 49},
{1, 16206.46, 16313.54, 39},
{1, 16189.04, 16307.65, 34},
{1, 16214.10, 16285.48, 26},
{1, 16218.45, 16281.15, 21}
}
function Flight_Master_OnGossipTalk(pUnit, event, player, pMisc)
pUnit:GossipCreateMenu(50, player, 0)
pUnit:GossipMenuAddItem(9, "Show Me Where I Can fly.", 1, 0)
pUnit:GossipMenuAddItem(4, "Show Me What Else You Have To Offer.", 5, 0)
pUnit:GossipMenuAddItem(9, "Never Mind", 2, 0)
pUnit:GossipSendMenu(player)
end
function Flight_Master_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
if (intid == 1) then
pUnit:GossipCreateMenu(50, player, 0)
pUnit:GossipMenuAddItem(9, "Custom Location", 3, 0, "The Cost: 1 Shadowmourne")
pUnit:GossipMenuAddItem(9, "GM Island Joy Ride", 4, 0, "The Cost: 1 Shadowmourne", 100)
pUnit:GossipMenuAddItem(9, "Never Mind", 2, 0)
pUnit:GossipSendMenu(player)
end
if (intid == 2) then
player:GossipComplete()
end
if (intid == 3) then
if (player:IsInCombat()==true) then
player:SendAreaTriggerMessage("You are in combat!")
else
if (player:GetItemCount(item1id) > 0 then
CustomFlightPath = LuaTaxi:CreateTaxi()
for I, MyFP in ipairs(MyFlightPath) do
CustomFlightPath:AddPathNode(MyFP[1], MyFP[2], MyFP[3], MyFP[4])
end
player:RemoveItem(item1id, 1)
player:StartTaxi(CustomFlightPath, GetDisplay)
else
player:SendAreaTriggerMessage("You do not have the required item in your inventory!")
end
end
player:GossipComplete()
end
if (intid == 4) then
GMIslandJoy = LuaTaxi:CreateTaxi()
for I, MyFP in ipairs(GMIslandTest) do
GMIslandJoy:AddPathNode(MyFP[1], MyFP[2], MyFP[3], MyFP[4])
end
player:DealGoldCost(100)
player:StartTaxi(GMIslandJoy, GetDisplay)
player:GossipComplete()
end
if (intid == 5) then
pUnit:GossipCreateMenu(50, player, 0)
pUnit:GossipMenuAddItem(4, "Weather", 6, 0)
pUnit:GossipMenuAddItem(5, "Queue Me For A Battleground!", 7, 0)
pUnit:GossipMenuAddItem(5, "Show Me The Money!", 8, 0)
pUnit:GossipMenuAddItem(5, "Screw the Battlegrounds, give me honor! (200 honor)", 9, 0, "The Cost:", 2000000)
pUnit:GossipMenuAddItem(9, "Never Mind", 2, 0)
pUnit:GossipSendMenu(player)
end
if (intid == 6) then
pUnit:GossipCreateMenu(50, player, 0)
pUnit:GossipMenuAddItem(6, "Sunny", 10, 0)
pUnit:GossipMenuAddItem(6, "Foggy", 11, 0, "The Cost:", 20000)
pUnit:GossipMenuAddItem(6, "Rainy", 12, 0, "The Cost:", 23000)
pUnit:GossipMenuAddItem(6, "Monsoon", 13, 0, "The Cost:", 25000)
pUnit:GossipMenuAddItem(6, "Snowy", 14, 0 , "The Cost:", 34000)
pUnit:GossipMenuAddItem(6, "Sandstorm", 15, 0, "The Cost:", 22000)
pUnit:GossipMenuAddItem(9, "Never Mind", 2, 0)
pUnit:GossipSendMenu(player)
end
if (intid == 9) then
player:DealGoldCost(2000000)
player:GiveHonor(200)
player:GossipComplete()
end
if (intid == 10) then
player:SetPlayerWeather(0, 1)
player:GossipComplete()
end
if (intid == 11) then
player:DealGoldCost(20000)
player:SetPlayerWeather(1, 1)
player:GossipComplete()
end
if (intid == 12) then
player:DealGoldCost(23000)
player:SetPlayerWeather(2, 1)
player:GossipComplete()
end
if (intid == 13) then
player:DealGoldCost(25000)
player:SetPlayerWeather(4, 1)
player:GossipComplete()
end
if (intid == 14) then
player:DealGoldCost(34000)
player:SetPlayerWeather(8, 1)
player:GossipComplete()
end
if (intid == 15) then
player:DealGoldCost(22000)
player:SetPlayerWeather(16, 1)
player:GossipComplete()
end
if (intid == 8) then
player:SendBankWindow(player)
player:GossipComplete()
end
end
RegisterUnitGossipEvent(90000, 1, "Flight_Master_OnGossipTalk")
RegisterUnitGossipEvent(90000, 2, "Flight_Master_OnGossipSelect")
Thanks for reading, I will keep trying to figure out why that particular part of the code is not working in the meantime.