/* Copyright (C) 2006,2007 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA GM NPC Teleporter Script (base for Teleportation Masters) Biglad */ #include "../sc_defines.h" bool GossipHello_npc_teleport_allaince(Player *player, Creature *_Creature) { player->ADD_GOSSIP_ITEM( 5, "Travel to Menthil Harbor" , GOSSIP_SENDER_MAIN, 1206); player->ADD_GOSSIP_ITEM( 5, "Travel to Auberdine" , GOSSIP_SENDER_MAIN, 1207); player->ADD_GOSSIP_ITEM( 5, "Travel to Theramore Isle" , GOSSIP_SENDER_MAIN, 1208); player->ADD_GOSSIP_ITEM( 5, "Travel to Rut'theran Village" , GOSSIP_SENDER_MAIN, 1209); player->ADD_GOSSIP_ITEM( 5, "Travel to The Exodar" , GOSSIP_SENDER_MAIN, 1216); //player->SEND_GOSSIP_MENU(5,_Creature->GetGUID()); player->PlayerTalkClass->SendGossipMenu(5,_Creature->GetGUID()); return true; } /******************************************************* * Start of GOSSIP_MENU *******************************************************/ void SendDefaultMenu_npc_teleport_allaince(Player *player, Creature *_Creature, uint32 action ) { if(player->isAttacked()) { _Creature->Say("You are in combat!", LANG_UNIVERSAL, NULL); return; } if( player->getLevel() < 15 ) { _Creature->Say("You must be lvl 15+", LANG_UNIVERSAL, NULL); return; } switch(action) { case 1206://teleport player to Menthil Harbor player->CLOSE_GOSSIP_MENU(); player->TeleportTo(0, -3779.526611f,-734.663025f,8.09095f,0.0f); break; case 1207://teleport player to Auberdine player->CLOSE_GOSSIP_MENU(); player->TeleportTo(1, 6439.279785f,614.956970f,10.469187,0.0f); break; case 1208://teleport player to Theramore Isle player->CLOSE_GOSSIP_MENU(); player->TeleportTo(1, -3994.240967f,-4722.521484f,4.718028f,0.0f); break; case 1209://teleport player to Rut'theran Village player->CLOSE_GOSSIP_MENU(); player->TeleportTo(1, 8549.147461f,1020.227905f,5.824060f,0.0f); break; case 1216://teleport player to The Exodar player->CLOSE_GOSSIP_MENU(); player->TeleportTo(530, -4073.03f, -12020.4f, -1.47f, 0.0f); break; } } /******************************************************* * End of GOSSIP_MENU *******************************************************/ bool GossipSelect_npc_teleport_allaince(Player *player, Creature *_Creature, uint32 sender, uint32 action ) { // Main menu if (sender == GOSSIP_SENDER_MAIN) SendDefaultMenu_npc_teleport_allaince(player, _Creature, action ); return true; } void AddSC_npc_teleport_allaince() { Script *newscript; newscript = new Script; newscript->Name="npc_teleport_allaince"; newscript->pGossipHello = &GossipHello_npc_teleport_allaince; newscript->pGossipSelect = &GossipSelect_npc_teleport_allaince; newscript->pItemHello = NULL; newscript->pGOHello = NULL; newscript->pAreaTrigger = NULL; newscript->pItemQuestAccept = NULL; newscript->pGOQuestAccept = NULL; newscript->pGOChooseReward = NULL; m_scripts[nrscripts++] = newscript; }