I hear a lot people asking what the command is to create a lua portal and how to create a custum portal, here is a guide:
1. The SQL.
Code:
INSERT INTO `gameobject_names` VALUES (ID1,22,Displayid,'Name1',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
ID1: The ID of your object, this means, what do you want if you type .go spawn [ID1]. In the guide I will use 123451.
22: Do not edit this! Or your portal will not work.
Displayid: The look/display of the Object. Below a little list, I'll use 8196
Name1: The name of your portal, you will see this if you mouse over the portal. I'll use Mall
DisplayIDs:
Code:
4393 = Darnassus
4396 = Stormwind
4394 = Ironforge
4398 = Undercity
4395 = Orgrimmar
4397 = Thunder Bluff
6956 = Silvermoon
6955 = Exodar
7146 = Shattrath
8111 = Dalaran
1327 = Summoning portal(summoning stone/ritual of summoning)
8196 = Outland portal
So now I have
Code:
INSERT INTO `gameobject_names` VALUES (123451,22,8196 ,'Mall',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
I think you should directly save this in the database or save it in notepad as .sql and export into database later.
Lua:
Code:
function TELENAME1_onUse (pUnit, Event, pMisc)
pMisc:Teleport (MAPID, X, Y, Z)
end
RegisterGameObjectEvent (ID1 , 4, "TELENAME1_onUse")
We start with this script above.
TELENAME1: Nothing to explane just that, if you might create a 2nd one that you set the 1 to a 2 etc.
Now, go inside wow and typ .gps, something will pop insie your text log, like this:

Now fill MAPID in with the Map: (in this case 0), Fill X in with the X: (in this case -639.66). The Y with Y: (in this case -4717.7
and Z with the info listed after the Z: (in this case 5.43)
ID1: At this ID fill in the ID you chooce while creating the portal, the same ID You should paste here or you're portal will not work
For me the code will look like this:
Code:
function TELENAME1_onUse (pUnit, Event, pMisc)
pMisc:Teleport (0, -639.66, -4717.78, 5.43)
end
RegisterGameObjectEvent (12345, 4, "TELENAME1_onUse")
Copy the code to your notepad and save it as a .lua, and copy it to your scripts map
--------------------------------------------------------------------------
At the end I had 2 sort of scripts:
Code:
INSERT INTO `gameobject_names` VALUES (123451,22,8196 ,'Mall',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
Code:
function TELENAME1_onUse (pUnit, Event, pMisc)
pMisc:Teleport (0, -639.66, -4717.78, 5.43)
end
RegisterGameObjectEvent (12345, 4, "TELENAME1_onUse")
The first one(wich you saved as a .sql) you should open with heidi sql, navicat or any other database editing programme, The seccond you should add to your servers script folder. Restart your server so you're script will load and you can summon your portal, for me it looked like this:
[YT]<object width="445" height="364"><param name="movie" value="http://www.youtube.com/v/FrWOf_8bRtw&hl=nl&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/FrWOf_8bRtw&hl=nl&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="445" height="364"></embed></object>[/YT]
Thanks for reading my guide, if you have any questions please post them below Thanks
Kind Regards(and have fun with the guide) Brue