/* 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" #define Lore_Mark 31808 bool GossipHello_sc_mob_q9785_1(Player *player, Creature *_Creature ) { player->ADD_GOSSIP_ITEM( 7, "Buff Mark of Lore", GOSSIP_SENDER_MAIN, 1203); player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); return true; } void SendDefaultMenu_sc_mob_q9785_1(Player *player, Creature *_Creature, uint32 action ) { if(player->isAttacked()) { _Creature->Say("You are in combat!", LANG_UNIVERSAL, NULL); return; } if( player->getLevel() < 58 ) { _Creature->Say("You should not be in outlands", LANG_UNIVERSAL, NULL); return; } switch(action) { case 1203: // Cast Mark or Lore 31808 player->CLOSE_GOSSIP_MENU(); player->CastSpell(player, 31808, NULL, NULL, NULL, NULL); break; } } bool GossipSelect_sc_mob_q9785_1(Player *player, Creature *_Creature, uint32 sender, uint32 action ) { // Main menu if (sender == GOSSIP_SENDER_MAIN) SendDefaultMenu_sc_mob_q9785_1(player, _Creature, action ); return true; } void AddSC_sc_mob_q9785_1() { Script *newscript; newscript = new Script; newscript->Name="sc_mob_q9785_1"; newscript->pGossipHello = &GossipHello_sc_mob_q9785_1; newscript->pGossipSelect = &GossipSelect_sc_mob_q9785_1; newscript->pItemHello = NULL; newscript->pGOHello = NULL; newscript->pAreaTrigger = NULL; newscript->pItemQuestAccept = NULL; newscript->pGOQuestAccept = NULL; newscript->pGOChooseReward = NULL; m_scripts[nrscripts++] = newscript; }