View Full Version : Eluna SQL Teleporter

10-07-2015, 10:49 PM
Was slightly bored yesterday so figured I'd create a new teleporter. However, instead of the Lua table teleporters I have made before, this has all of its locations stored in an SQL table, and cached on script load. This one, compared to my old tabled teleporter, also supports an "infinite" amount of teleport locations.

- Preview:



- Script & Queries:

The only thing you need to change within the script itself is the unit entry at the top of the script. Change this to the entry of your teleporter creature.
If the eluna_teleporter table for some reason is missing, the script will automatically insert the table to your world database without any gossip options.

Eluna SQL Teleporter Script - GitHub (https://github.com/ElunaLuaEngine/Scripts/blob/master/Custom/SQL%20Teleporter/Eluna%20SQL%20Teleporter.lua)

The SQL query contains the database structure as well as a few preset menus and teleport locations. If you do not wish any preset teleport locations, either run the script without executing the SQL query, or empty the table records after executing the SQL query.

Eluna SQL Teleporter Query - GitHub (https://github.com/ElunaLuaEngine/Scripts/blob/master/Custom/SQL%20Teleporter/eluna_teleporter.sql)

- Database structure and columns explained:

The full database structure is as follows: (id, parent, type, faction, icon, name, map, x, y, z, o)


This is the gossip option id. This automatically increments, so you do not need to fill this in yourself.


This is the Id of the gossip options' parent. If parent is 0 (default), it will be on the main gossip menu of the teleporter. If not, it will be the child of the specified id.


This is the gossip options' type. Current types are 1 (default) and 2.

1 = Gossip menu/submenu. This specifies that the gossip option is a menu/submenu. This option does not require map or coordinate fields to be filled.

2 = Teleport option. This specifies that the gossip option is a teleport location. On click, this gossip option will teleport the player to the map and coordinates specified.


This specifies whether the gossip option is available to Everyone (default), only Horde or only Alliance.

-1 = Everyone

0 = Alliance

1 = Horde


This is the gossip options icon. Please see your emulator source/documentation for a list of icons your emulator supports. 0 by default.


This is the name of the gossip option, which will be displayed in the gossip menu.

Map, x, y, z, o:

These are the map and coordinate values. Coordinates support up to 3 decimal values.

- ToDo:

Add gossip option paging
Add faction override for GM's if this is even needed/wanted

- Changelog:

- First upload.

- Feedback:

Feedback, ideas and suggestions are always welcome. Please leave a post below.

Thanks to Rochet for the brainstorming.

10-07-2015, 11:50 PM

Nice job :D

10-08-2015, 05:01 AM
Nice job.

10-09-2015, 02:56 AM
Awesome, definitely useful!

10-09-2015, 04:56 AM
Nice one