/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * 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 *//* ScriptDataSDName: Wailing_CavernsSD%Complete: 10SDComment: Make the Disciple of Naralex buff player who are talking to him. Disciple's path is done, menu either but doesn't show up. pInstance is false, maybe we have to setInstanceData() somewhere. TODO: the disciple's path when 4 serpent bosses are down, to wake up Naralex.SDCategory: Wailing CavernsEndScriptData *//* ContentDatanpc_disciple_of_naralexEndContentData */#include "precompiled.h"#include <stdlib.h>#include "../../npc/npc_escortAI.h"#include "def_wailing_caverns.h"/*#### npc_disciple_of_naralex####*/#define SPELL_MARK_WILD 5232struct TRINITY_DLL_DECL npc_disciple_naralexAI : public npc_escortAI{ npc_disciple_naralexAI(Creature *c) : npc_escortAI(c) { pInstance = ((ScriptedInstance*)c->GetInstanceData()); } ScriptedInstance *pInstance; void WaypointReached(uint32 i) { if( pInstance ) { DoSay("Reached Waypoint.", LANG_UNIVERSAL, NULL); } } void Reset() { //if group wipes } void Aggro(Unit *who) { //when disciple is under attack }};CreatureAI *GetAI_npc_disciple_naralex(Creature *_Creature){ npc_disciple_naralexAI *discipleAI = new npc_disciple_naralexAI(_Creature); discipleAI->AddWaypoint(0, -139.67, 127.55, -77.73); discipleAI->AddWaypoint(1, -121.71, 138.00, -78.85); discipleAI->AddWaypoint(2, -112.07, 147.54, -80.94); discipleAI->AddWaypoint(3, -106.81, 196.24, -80.28); discipleAI->AddWaypoint(4, -106.83, 232.32, -91.01); discipleAI->AddWaypoint(5, -92.30, 228.41, -90.51); discipleAI->AddWaypoint(6, -83.70, 223.17, -93.50); discipleAI->AddWaypoint(7, -62.34, 206.17, -93.59); discipleAI->AddWaypoint(8, -53.97, 206.62, -95.64); discipleAI->AddWaypoint(9, -44.44, 210.10, -96.21); discipleAI->AddWaypoint(10, -34.03, 238.71, -93.48); discipleAI->AddWaypoint(11, -55.46, 285.63, -91.45); discipleAI->AddWaypoint(12, -63.64, 277.54, -91.87); discipleAI->AddWaypoint(12, -42.07, 278.23, -92.48); discipleAI->AddWaypoint(13, 36.22, 243.76, -87.42); discipleAI->AddWaypoint(14, 54.65, 213.13, -89.42); discipleAI->AddWaypoint(15, 70.62, 205.94, -93.05); discipleAI->AddWaypoint(16, 96.48, 236.45, -95.59); discipleAI->AddWaypoint(17, 114.15, 235.19, -96.13); discipleAI->AddWaypoint(18, 114.64, 237.32, -96.03); return (CreatureAI*)discipleAI;}bool GossipHello_npc_disciple_naralex(Player *player, Creature *_Creature) { ScriptedInstance* pInstance = ((ScriptedInstance*)_Creature->GetInstanceData()); //if( !pInstance ) // return false; //cast _Creature->CastSpell(player, 5232, true); //must do a "if pInstance->GetData(BOSS_SERPENTIS) == DONE" (that's the idea) //but for now, just test the path, so... player->ADD_GOSSIP_ITEM(3, "Show me your path, noob !", GOSSIP_SENDER_MAIN, 1200); player->SEND_GOSSIP_MENU(1, _Creature->GetGUID()); return true;}bool GossipSelect_npc_disciple_naralex(Player *player, Creature *_Creature, uint32 sender, uint32 action){ if( action == 1200 ) { player->CLOSE_GOSSIP_MENU(); ((npc_escortAI*)(_Creature->AI()))->Start(false, false, false); } return true;}/*######## AddSC######*/void AddSC_wailing_caverns(){ Script *newscript; newscript = new Script; newscript->Name = "npc_disciple_naralex"; newscript->pGossipHello = &GossipHello_npc_disciple_naralex; newscript->pGossipSelect = &GossipSelect_npc_disciple_naralex; newscript->GetAI = &GetAI_npc_disciple_naralex; newscript->RegisterSelf();}