This guide will tell you how to make LUA scripted portals.
This is updated for 3.3.3a.
1) Open Notepad or Notepad++
2) Copy this LUA code into Notepad
_onUse (pUnit, Event, pMisc)
3) The parts highlighted in red
, are the parts you change.TELENAME
: name your portal, no spaces, underscores are allowed. (Note: Everywhere where it says TELENAME, must be exactly the same for this to work.) ie. Portal_DalaranMapID
: go in-game and go to where you want the portal to go. Type .gps and this will show.X/Y/Z
: go in-game and go to where you want the portal to go. Type .gps and this will show.GameObjectID
: This is the ID of the gameobject for your portal
4) Save the file as: "yourportalname.lua
" [make sure it's .lua]
5) Put the LUA file in the "scripts" folder in your server's core
6) Open a new Notepad document.
7) Paste this code into it
INSERT INTO gameobject_names
(entry, Type, DisplayID, Name, Category, CastBarText, Unkstr, spellfocus, sound1, sound2, sound3, sound4, sound5, sound6, sound7, sound8, sound9, unknown1, unknown2, unknown3, unknown4, unknown5, unknown6, unknown7, unknown8, unknown9, unknown10, unknown11, unknown12, unknown13, unknown14)
(900000, 22, 7849, "Mall Portal", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
The parts in red
are the parts you change.ENTRY
: this is your GameObjectID (Note: This must be the same as the ID you put in your LUA file. ie. 99990 etc..DISPLAYID
: this is the display ID of your portal. [This can be any gameobject's displayId]"NAME"
: Name your gameobject. ie. "Portal to Mall" (Note: Make sure you leave the "Quotation" marks around the name)
9) Save the file as "yourportalnameGO.sql
" [Make sure it is .sql]
10) Open your database in Navicat, SQLYog, etc. Double click your connection to open it, then double click world to open the database. Right click world and click execute sql file, then point to the directory of yourportalnameGO.sql.
11) Go on your server, spawn your gameobject by typing .go spawn ##### (your GameObjectID) and putting a 1 after it. [.go spawn ##### 1] you must put the 1 after or it will not stay after a restart.
12) Restart your server
13) Congratulations you have made a new LUA portal!