Code:
local id = 4
function Taxi_Talk(unit, event, player)
unit:GossipCreateMenu(50, player, 0)
unit:GossipMenuAddItem(0, "Take me on a flight!", 1, 1)
unit:GossipMenuAddItem(0, "[Exit]", 2, 0)
unit:GossipSendMenu(player)
end
function Taxi_Select (unit, event, player, id, intid, code)
if (intid == 1) then
function flight_path_reality_system(event, plr, message, type, language)
local Taxi = LuaTaxi:CreateTaxi()
Taxi:AddPathNode(1, 16201, 16210, 4)
Taxi:AddPathNode(1, 16247, 16161, 83)
Taxi:AddPathNode(1, 16375, 16159, 66)
Taxi:AddPathNode(1, 16376, 16337, 16)
Taxi:AddPathNode(1, 16267, 16311, 46)
Taxi:AddPathNode(1, 16249, 16304, 44)
plr:StartTaxi(Taxi, 17697)
player:GossipComplete()
end
if (intid == 2) then
player:GossipComplete()
end
end
end
RegisterServerHook(16, "flight_path_reality_system")
RegisterUnitGossipEvent(id, 1, "Taxi_Talk")
RegisterUnitGossipEvent(id, 2, "Taxi_Select")
current code.