Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.06 KB | None | 0 0
  1. /* npc_ranshalla Escort quest by Joseph*/
  2.  
  3. #include "precompiled.h"
  4. #include "escort_ai.h"
  5.  
  6. enum
  7. {
  8.     QUEST_GUARDIANS     = 5,
  9.     SAY_ASD             = -1999958
  10. };
  11.  
  12. struct MANGOS_DLL_DECL npc_ranshallaAI : public npc_escortAI
  13. {
  14.         npc_ranshallAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();}
  15.  
  16.         void WaypointReached(uint32 uiPointId)
  17.     {
  18.         switch(uiPointId)
  19.         {
  20.                     case 100: DoScriptText(SAY_ASD, m_creature, pPlayer); break;
  21.         }
  22.         }
  23. };
  24.  
  25. bool QuestAccept_npc_ranshalla(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
  26. {
  27.     if (pQuest->GetQuestId() == QUEST_GUARDIANS)
  28.     {
  29.         pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE);
  30.     }
  31.    
  32.     return true;
  33. }
  34.  
  35. CreatureAI* GetAI_npc_ranshalla(Creature* pCreature)
  36. {
  37.     return new npc_ranshallaAI(pCreature);
  38. }
  39.  
  40. void AddSC_npc_ranshalla()
  41. {
  42.     Script * newscript;
  43.  
  44.     newscript = new Script;
  45.     newscript->Name = "npc_ranshalla";
  46.     newscript->GetAI = &GetAI_npc_ranshalla;
  47.     newscript->pQuestAccept = &QuestAccept_npc_ranshalla;
  48.     newscript->RegisterSelf();
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement