I believe that the locations are hardcoded in the client and to the best of my knowledge there is no relevant API to do what you are asking.
Actually, the telepoerter uses your basic questgiver dialog structures. My MultiTool addon has a "clone quest dialog choices" function that works fine. However, I never tried completely automating it.
I wonder if you could do something like the following pseudocode.
if self:imInUlduar() then
local gossipOptionsTable = self:getGossipOptionsTable())
for index,title in ipairs(gossipOptionsTable) do
-- not sure how you will determine the right place... suppose
-- there could be a small window with a dropdown list where you
-- select the auto-destination when you talk to a telepoerter
if title == "place you wanna go" then
-- do some test and return true if we're in ulduar, false if not
-- use GetGossipOptions() and GetGossipText(index) to build up a
-- list of all currently available gossip options and indexes,
-- and return it
This is really just roughed-out in my head... but I bet that it could be made to work.
I never played with reading all available items and then programmatically selecting one, but in MultiTool, I post-hooked the various choices, communicate those choices to others in the group with the addon, and they successfully copy the dialog actions quite faithfully... so long as they have the gossip dialog open as well.
here, you're watching for the gossip dialog to open and only bothering to do anything if youre in Ulduar, then having it try and pick the teleport option that matches your destination, Either making something that remembers your last location choice, or having something that you set it where you want to auto-port to could be possible.
Heck, you could get kinda sophisticated, and somehow figure out what bosses you've downed to have it determine the best location to send you unless you override it.
I dunno, maybe Ill take a crack at writing it... will need to stub something out to dump the available gossip dialog choices and keep track of it next time I'm healing ulduar. Unless someone else is into doing it.
Seems to me as a good way to do this is just to tie each subzone in Ulduar to a teleport location. When you die, catch the subzone and assign yourself a teleport. The only times this should fail are when people are being truly foolish (i.e. jumping off the cliff behind Razorscale).
At present it's only proof of concept, but if you do /uw and set the text to the exact dialog you want it to auto-do, it does work when you right-click the teleporter.
Gonna have to play around with best way to manage it.
I like the "hold alt to override"
I'm thinking either taking you back to the last zone you were in, or maybe make it remember the last one you selected.
I figure that I could make it so it only auto-warps you to the last location you manually warped to if you open the dialog at the zone-in teleporter. When you port from any orther teleport, or if you manually port using the alt override, it remembers the last one you picked... something like that.
one of my guildmates wrote an addon that does the automati telporting for you. it's a small databroker plugin that allows you to choose which location you wan't to be ported to or always use the furthest one. curse link would be