Greetings Boys and Girls! This is my first Custom Teleporter I've ever made, it took me some time, but here it is. I will explain a bit further bellow how to make it port you to the exact point you want it to.
Red = Cords
Blue = MapID
Yellow = Name of the buttons and cities on the menu when you press the NPC
Green = Different pages, for each section
Pink = Entry ID
The script above, is the script for the Teleporter. In order to get this file into you're server you just make a new file in notepad, save the file as nameyouwant.luafunction On_Gossip(pUnit, event, player)
pUnit:GossipCreateMenu(3544, player, 0)
pUnit:GossipMenuAddItem(2, "Alliance_and_Horde_Cities", 1, 0)
pUnit:GossipMenuAddItem(2, "The_Good_Side", 2, 0)
pUnit:GossipMenuAddItem(2, "The_Evil_Side", 3, 0)
pUnit:GossipSendMenu(player)
end
function Gossip_Submenus(pUnit, event, player, id, intid, code)
if(intid == 999) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(2, "Alliance_and_Horde_Cities", 1, 0)
pUnit:GossipMenuAddItem(2, "The_Good_Side", 2, 0)
pUnit:GossipMenuAddItem(2, "The_Evil_Side", 3, 0)
pUnit:GossipSendMenu(player)
end
if(intid == 1) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(1, "Dalaran", 300, 0)
pUnit:GossipMenuAddItem(1, "Shattrath", 309, 0)
pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
pUnit:GossipSendMenu(player)
end
if(intid == 2) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(1, "Stormwind", 301, 0)
pUnit:GossipMenuAddItem(1, "Ironforge", 302, 0)
pUnit:GossipMenuAddItem(1, "Darnassus", 303, 0)
pUnit:GossipMenuAddItem(1, "Exodar", 304, 0)
pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
pUnit:GossipSendMenu(player)
end
if(intid == 3) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(1, "Orgrimmar", 305, 0)
pUnit:GossipMenuAddItem(1, "Undercity", 306, 0)
pUnit:GossipMenuAddItem(1, "Thunder_Bluff", 307, 0)
pUnit:GossipMenuAddItem(1, "Silvermoon", 308, 0)
pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
pUnit:GossipSendMenu(player)
end
if(intid == 300) then
player:Teleport(571, 5807.821289, 587.875366, 660.938782)
unit:GossipComplete(player)
end
if(intid == 301) then
player:Teleport(0, -8932.045898, 538.432983, 94.355003)
unit:GossipComplete(player)
end
if(intid == 302) then
player:Teleport(0, -4910.066406, -954.944641, 501.485260)
unit:GossipComplete(player)
end
if(intid == 303) then
player:Teleport(1, 9946.203125, 2614.886230, 1316.321777)
unit:GossipComplete(player)
end
if(intid == 304) then
player:Teleport(530, -4044.313477, -11908.476563, -2.447248)
unit:GossipComplete(player)
end
if(intid == 305) then
player:Teleport(1, 1492.897095, -4415.085449, 23.071123)
unit:GossipComplete(player)
end
if(intid == 306) then
player:Teleport(0, 1735.158936, 238.984070, 62.853424)
unit:GossipComplete(player)
end
if(intid == 307) then
player:Teleport(1, -1290.126099, 148.322083, 129.706223)
unit:GossipComplete(player)
end
if(intid == 30 then
player:Teleport(530, 9483.235352, -7290.837891, 14.293912)
unit:GossipComplete(player)
end
if(intid == 309) then
player:Teleport(530, -1866.214478, 5410.462402, -12.427251)
unit:GossipComplete(player)
end
end
RegisterUnitGossipEvent(222334, 1, "On_Gossip")
RegisterUnitGossipEvent(222334, 2,"Gossip_Submenus")
Okey, I will now explain a bit about the different stuff you might need to know in order to make a Teleporter yourself. I will first start explaining what cords and MapID's are for. Cords is the numbers of a spot in a area you want the players to be ported to when they press a certain area on the NPC. MapID is the number of the area, for example Orgrimmar's MapID is 1, and MapID's are totally different from each area. In order to find the MapID's of areas you can type .gps, which is a command every [a] or [az] flagged player should be able to use in-game. This command will show you the MapID first, than the numbers following is the cords.
Entry ID's are the numbers you type in to spawn your creature, no matter if it's a Teleporter or any other kind of NPC. Entry ID's can be everything between 100000 - 600000 (Maybe higher), but you need to make sure your entry ID is not already taken by something else in your database.
You can change name of the different sections to what ever you want, but I would recommend that you don't change the name of the cities! They should have the same name as they have in-game.
PS: I use forward slash instead of space because some servers doesn't handle space. Forward slash and space has the same effect.
Now to the SQL for the NPC. The SQL is the file / script for the NPC, and in the SQL file you can modify how much health, mana and other stats you want it to have. You can also mod his display ID from here, and if he's gonna be friendly for both factions.
Pink = Entry ID
Red = Faction ID
Blue = Display ID
The entry ID has to be the same as in the LUA script. This is very important, else they will not co-work, and they will not find each other. If they don't find each other you, when you spawn the NPC you will just have a empty NPC saying "Greetings <name>! Is there anything I can help you with?". So these need to be the same!!!insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`)
values ('222334', "Teleporter", "Teleporter Services", '', '0', '7', '0', '3', '0', '0', '27545', '27545', '27545', '27545', '1', '1', '1', '0');
insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`)
values ('222334', '90', '90', '7', '9000000', '9000000', '100000', '1', '1', '1000', '0', '99999', '99999', '0', '0', '0', '0', '3600', '20000', '9999', '9999', '9999', '9999', '9999', '9999', '0', '0', "0", '1', '0', '0', '0', '2.50', '8.00', '14.00', '0', '0', '0', '0', '0', '0', '0');
The faction is the ID that will depend if both factions (Alliance and Horde) should be able to use it, or only one of the factions. 7 is the ID which will make the NPC neutral to all factions, and that means all factions are able to use it. 2 is the ID for the NPC to be horde, which means alliance can't use him, and 1 is the ID for the NPC to be Alliance, which means Horde can't use him.
Display ID is the ID you want the NPC to look like. For example if you want the NPC to look like The Lich King you just go in-game and spawn him, than you use the command .npc info on The Lich King and you will get the display ID of him.
Remember guys, this is my first Teleporter I've ever made! Please give me responds and comments on it! I'm thankful for any comments! And if the Teleporter doesn't work please give a comment below, and I will try to fix it.
+Rep would also be nice!
- Buffy