View Full Version : Advanced Flight MAster

04-07-2015, 09:34 AM
This script is a configurable flight master supporting multiple flight destinations.


Choose mount display per faction
Multiple flight paths
Conditional flight paths

View or download script here (https://github.com/RStijn/Eluna-Lua-Scripts/blob/master/npc_advanced_flightmaster.lua)


04-07-2015, 12:14 PM
Though a few notes about the path functions:

AddTaxiPath should be used only once for each path.
It would be recommended to choose a static flight path ID of your own and use that in the script.
However doing as you do is fine, the next free flight path ID will be used.
These paths created WILL be written into memory and can be reused for the full duration of server uptime. (until restart)

In your current code a new copy of the path is always saved when someone tries to fly.

Thus I suggest following changes:
Have the path and option data at the top (like you have in the function, but without the function, just on the script body)
and then if you dont want to add the condition checks to the gossip code, maybe you could make predicate function lists that is executed and when one returns false, simply dont show the option.
I created a quick example of what I had in mind here (expires in 1 month):

ps. its a draft, did not test it or run it.

04-08-2015, 10:13 PM
Thanks! Tested it, had to make a change but works and is certainly an improvement.
Updated on GitHub.

04-08-2015, 10:59 PM
Very nice :) Good job!

12-09-2015, 06:10 PM
great, you could do it with C ++ please