rendered paste bodyfunction My_Teleporter_GossipHello(player,_Creature)
player:ADD_GOSSIP_ITEM( 6, "Travel to Stormwind" , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +1)
...
function My_Teleporter_GossipSelect(LuaAI, player, _Creature, sender, action)
if sender == GOSSIP_SENDER_MAIN then
...
if action == GOSSIP_ACTION_INFO_DEF + 1 then
-- teleport player to Stormwind
query = "SELECT `position_x` , `position_y` , `position_z` , `orientation` , `map` FROM `game_tele` WHERE `name`= `SW`";
tele1 = sDatabase:Query(query)
tele2 = tele1:Fetch()
player:TeleportTo(tele1[4]:GetInt32(), tele1[0]:GetInt32(), tele1[1]:GetInt32(), tele1[2]:GetInt32(), tele1[3]:GetInt32(), false, true );