This guide will tell you how to make LUA scripted portals.
This is updated for 3.0.3.
1) Open Notepad or Notepad++
2) Copy this LUA code into Notepad
3) The parts highlighted in red, are the parts you change.Code:function TELENAME_onUse (pUnit, Event, pMisc) pMisc:Teleport (MapID, X, Y, Z) end RegisterGameObjectEvent (GameObjectID ,4, "TELENAME_onUse")
TELENAME: name your portal, no spaces, underscores are allowed. (Note: Everywhere where it says TELENAME, must be exactly the same for this to work.)
MapID: get this by doing .gps where you want your portal to take people to.
X/Y/Z: get these by doing .gps where you want your portal to take people to.
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
Code:INSERT INTO gameobject_names (entry, Type, DisplayID, Name, spellfocus, sound1, sound2, sound3, sound4, sound5, sound6, sound7, sound8, sound9, unknown1, unknown2, unknown3, unknown4, unknown5, unknown6, unknown7, unknown8, unknown9, unknown10, unknown11, unknown12, unknown13, unknown14) VALUES (ENTRY, 22, DISPLAYID, "NAME", 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.
DISPLAYID: this is the display ID of your portal. [This can be any gameobject's displayId]
"NAME": Name your gameobject eg. "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 or what ever program you use, and execute the sql file you just made and saved.
11) Go on your server, spawn your gameobject by typing .go spawn ##### (your GameObjectID) and putting a 1 after it. [.go spawn ##### 1]
12) Restart your server
13) Congratulations you have made a new LUA portal!
If you find anything wrong with this guide or need any help feel free to reply to this or send me a PM. I will not help on MSN.