This tutorial assumes you know absolutely NOTHING about importing information into MySQL, and that you simply went ahead and used the NCDB program to setup your World database. Before we begin, a word of caution.
ALWAYS BACKUP YOUR DATABASE BEFORE MAKING ANY CHANGES!!
Now that we have that out of the way, open notepad. Save the blank notepad as
C:\temp.sql
Easy enough? Don't close the notepad cause we'll need it! Ok, let's continue.
Open your MySQL prompt. You should be able to find it under your START menu, go to ALL PROGRAMS, and look for MySQL. Somewhere in there should be the "Command Line Client". Run that!
Now it should be asking you for a password. Simple enough, that's your MySQL password. Type it in and hit enter. You should now have a prompt like this;
mysql>
Next we need to get ourselves into the WORLD database. If you just ran NCDB and didn't do any advanced changes in your MySQL then the command you want to use is simple;
\u world
If it worked right you should have gotten the message "Database Changed". If you did, let's continue. If not, you screwed around with your database, probably calling it MYWOW or something like that. You should know what you're doing, in that case, so use the \u command to get to wherever the WORLD table is located.
We're going to leave the MySQL window alone for a minute and go back to the notepad we left open. Copy the following "Quote" into your notepad;
INSERT INTO `teleport_coords` VALUES (11409, 'Teleport to Booty Bay', 0, -14319.3, 442.7, 22.94, 0);
INSERT INTO `gameobject_names` VALUES (300001, 22, 4396, 'Teleport to Booty Bay', 11409, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
PAUSE HERE and skip down to the Portal tutorial below, it will tell you how to properly adjust the information in order to setup your portal.
:busted_co
Done? Ok, then go ahead and save the notepad file. Don't forget, it's supposed to be saved as "C:\temp.sql".
Now that the stage is set, the band is ready to play, we can let er rip! Go back to your MySQL window and type in the following command.
source c:\temp.sql
If it worked right you should have gotten three Query success entries.
That's it! You can repeat this tutorial for all the portals you want to make. Just make sure you always have a different identifier number (Red) and a different object number (Orange) for each.
Enjoy!
PORTAL TUTORIAL
I created this portal tutorial because none of the ones I found actually worked, or had all of the information you really need. This tutorial assumes your a complete idiot, so anyone should be able to follow along.
First thing you need to know is that a portal is created using 2 different tables in the WORLD database. The "Teleport_Coords" table is what holds the actual coordinates for our destination. The "Gameobject_Names" table, is where the actual portal is found. With that being said, let's begin with our first little bit of info.
INSERT INTO `teleport_coords` VALUES (11409, 'Teleport to Booty Bay', 0, -14319.3, 442.7, 22.94, 0);
First, change the "11409" number to some unique number. I like starting at 50000 and working my way up with each different portal. Second you need to change the "Teleport to Booty Bay" to wherever you intend on porting to. For the ease of editing just put in whatever you intend to call the portal. The next number, in this case 0, is the map number of the DESTINATION. If you intend on making portals you should know how to find out what the map number is. Finally, the next three numbers are the X, Y, and Z coordinates of the DESTINATION. As with the map numbers, you should know how to get this information before even considering to make a portal. Don't worry about the last number, just leave it as a 0. We can now move onto the second database entry;
INSERT INTO `gameobject_names` VALUES (300001, 22, 4396, 'Teleport to Booty Bay', 11409, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
First thing we need to do is come up with a unique object number. This is the number you'll use when you actually do the ".gobject spawn" command in-game. I like to start my custom objects around 98000 and go up (98001, 98002, etc) from there. The number you come up with will replace the part that says "300001" (Orange). Next you need to change the entry "Teleport to Booty Bay" to match whatever you called the portal (Blue) in the first entry. This is important since this name is REALLY what people will see in-game. Last, you need to change the number "11409" and make it IDENTICAL to the number that you used in the first SQL entry (Red).
That's it! You can now go back up to where we paused (just look for the police man) and continue.