Advertisement
julienanid

[Trinity] Buff Master

Sep 17th, 2013
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 6.69 KB | None | 0 0
  1. /*
  2. <--------------------------------------------------------------------------->
  3.  - Developer(s): Ghostcrawler336
  4.  - Edited: Synth
  5.  - Complete: %100
  6.  - ScriptName: 'Buff Master'
  7.  - Comment: untested.
  8.  - Shared for: Emudevs
  9. <--------------------------------------------------------------------------->
  10. */
  11.  
  12. #include "ScriptPCH.h"
  13.      
  14. enum spells
  15. {
  16.     POWER_WORD_FORTITUDE = 48162,
  17.     PRAYER_OF_SPRITE = 48074,
  18.     SHADOW_BUFF = 48170,
  19.     KINGS_BUFF = 43223,
  20.     ARCANE_BUFF = 36880,
  21.     MARK_OF_THE_WILD = 48469
  22. };
  23.      
  24. class buff_npc : public CreatureScript
  25. {
  26.         public:
  27.                 buff_npc() : CreatureScript("buff_npc"){}
  28.      
  29.                 bool OnGossipHello(Player * player, Creature * pCreature)
  30.                 {
  31.                         player->ADD_GOSSIP_ITEM(4, "Buff me!", GOSSIP_SENDER_MAIN, 1);
  32.                         player->ADD_GOSSIP_ITEM(4, "Nevermind", GOSSIP_SENDER_MAIN, 100);
  33.                         player->PlayerTalkClass->SendGossipMenu(9425, pCreature->GetGUID());
  34.                                    
  35.                         return true;
  36.                 }
  37.      
  38.                 bool OnGossipSelect(Player * player, Creature * pCreature, uint32 /*uiSender*/, uint32 uiAction)
  39.                 {
  40.                     player->PlayerTalkClass->ClearMenus();
  41.                 if (player->IsInCombat())
  42.               {
  43.             ChatHandler(player->GetSession()).PSendSysMessage("|cffffffff[|r|cFFFF4500Combat Check|r|cffffffff]:|r |cffffffffYou're in combat!|r");
  44.             return false;
  45.              }
  46.                    
  47.                         switch(player->getClass())
  48.                         {
  49.                                 case CLASS_WARRIOR:
  50.                                     {
  51.                                         player->CastSpell(player, POWER_WORD_FORTITUDE, true);
  52.                                         player->CastSpell(player, KINGS_BUFF, true);
  53.                                         player->CastSpell(player, MARK_OF_THE_WILD, true);
  54.                                         player->CastSpell(player, PRAYER_OF_SPRITE, true);
  55.                                         player->CastSpell(player, SHADOW_BUFF, true);
  56.                                         pCreature->MonsterWhisper("You are now buffed!", player->GetGUID(), true);
  57.                                     }break;
  58.  
  59.                                 case CLASS_PALADIN:
  60.                                     {
  61.                                          player->CastSpell(player, POWER_WORD_FORTITUDE, true);
  62.                                          player->CastSpell(player, KINGS_BUFF, true);
  63.                                          player->CastSpell(player, MARK_OF_THE_WILD, true);
  64.                                          player->CastSpell(player, PRAYER_OF_SPRITE, true);
  65.                                          player->CastSpell(player, ARCANE_BUFF, true);
  66.                                          player->CastSpell(player, SHADOW_BUFF, true);
  67.                                          pCreature->MonsterWhisper("You are now buffed!", player->GetGUID(), true);
  68.                                     }break;
  69.  
  70.                                 case CLASS_HUNTER:
  71.                                         {
  72.                                              player->CastSpell(player, POWER_WORD_FORTITUDE, true);
  73.                                              player->CastSpell(player, KINGS_BUFF, true);
  74.                                              player->CastSpell(player, MARK_OF_THE_WILD, true);
  75.                                              player->CastSpell(player, PRAYER_OF_SPRITE, true);
  76.                                              player->CastSpell(player, ARCANE_BUFF, true);
  77.                                              player->CastSpell(player, SHADOW_BUFF, true);
  78.                                              pCreature->MonsterWhisper("You are now buffed!", player->GetGUID(), true);
  79.                                         }break;
  80.  
  81.                                 case CLASS_ROGUE:
  82.                                     {
  83.                                          player->CastSpell(player, POWER_WORD_FORTITUDE, true);
  84.                                          player->CastSpell(player, KINGS_BUFF, true);
  85.                                          player->CastSpell(player, MARK_OF_THE_WILD, true);
  86.                                          player->CastSpell(player, PRAYER_OF_SPRITE, true);
  87.                                          player->CastSpell(player, SHADOW_BUFF, true);
  88.                                          pCreature->MonsterWhisper("You are now buffed!", player->GetGUID(), true);
  89.                                     }break;
  90.  
  91.                                 case CLASS_PRIEST:
  92.                                     {
  93.                                          player->CastSpell(player, POWER_WORD_FORTITUDE, true);
  94.                                          player->CastSpell(player, KINGS_BUFF, true);
  95.                                          player->CastSpell(player, MARK_OF_THE_WILD, true);
  96.                                          player->CastSpell(player, PRAYER_OF_SPRITE, true);
  97.                                          player->CastSpell(player, ARCANE_BUFF, true);
  98.                                          player->CastSpell(player, SHADOW_BUFF, true);
  99.                                          pCreature->MonsterWhisper("You are now buffed!", player->GetGUID(), true);
  100.                                     }break;
  101.  
  102.                                 case CLASS_DEATH_KNIGHT:
  103.                                     {
  104.                                          player->CastSpell(player, POWER_WORD_FORTITUDE, true);
  105.                                          player->CastSpell(player, KINGS_BUFF, true);
  106.                                          player->CastSpell(player, MARK_OF_THE_WILD, true);
  107.                                          player->CastSpell(player, PRAYER_OF_SPRITE, true);
  108.                                          player->CastSpell(player, SHADOW_BUFF, true);
  109.                                          pCreature->MonsterWhisper("You are now buffed!", player->GetGUID(), true);
  110.                                     }break;
  111.  
  112.                                 case CLASS_SHAMAN:
  113.                                     {
  114.                                          player->CastSpell(player, POWER_WORD_FORTITUDE, true);
  115.                                          player->CastSpell(player, KINGS_BUFF, true);
  116.                                          player->CastSpell(player, MARK_OF_THE_WILD, true);
  117.                                          player->CastSpell(player, PRAYER_OF_SPRITE, true);
  118.                                          player->CastSpell(player, ARCANE_BUFF, true);
  119.                                          player->CastSpell(player, SHADOW_BUFF, true);
  120.                                          pCreature->MonsterWhisper("You are now buffed!", player->GetGUID(), true);
  121.                                     }break;
  122.  
  123.                                 case CLASS_MAGE:
  124.                                     {
  125.                                          player->CastSpell(player, POWER_WORD_FORTITUDE, true);
  126.                                          player->CastSpell(player, KINGS_BUFF, true);
  127.                                          player->CastSpell(player, MARK_OF_THE_WILD, true);
  128.                                          player->CastSpell(player, PRAYER_OF_SPRITE, true);
  129.                                          player->CastSpell(player, ARCANE_BUFF, true);
  130.                                          player->CastSpell(player, SHADOW_BUFF, true);
  131.                                          pCreature->MonsterWhisper("You are now buffed!", player->GetGUID(), true);
  132.                                     }break;
  133.  
  134.                                 case CLASS_WARLOCK:
  135.                                     {
  136.                                          player->CastSpell(player, POWER_WORD_FORTITUDE, true);
  137.                                          player->CastSpell(player, KINGS_BUFF, true);
  138.                                          player->CastSpell(player, MARK_OF_THE_WILD, true);
  139.                                          player->CastSpell(player, PRAYER_OF_SPRITE, true);
  140.                                          player->CastSpell(player, ARCANE_BUFF, true);
  141.                                          player->CastSpell(player, SHADOW_BUFF, true);
  142.                                          pCreature->MonsterWhisper("You are now buffed!", player->GetGUID(), true);
  143.                                     }break;
  144.  
  145.                                 case CLASS_DRUID:
  146.                                     {
  147.                                          player->CastSpell(player, POWER_WORD_FORTITUDE, true);
  148.                                          player->CastSpell(player, KINGS_BUFF, true);
  149.                                          player->CastSpell(player, MARK_OF_THE_WILD, true);
  150.                                          player->CastSpell(player, PRAYER_OF_SPRITE, true);
  151.                                          player->CastSpell(player, ARCANE_BUFF, true);
  152.                                          player->CastSpell(player, SHADOW_BUFF, true);
  153.                                          pCreature->MonsterWhisper("You are now buffed!", player->GetGUID(), true);
  154.                                     }break;
  155.  
  156.                                 case 100:
  157.                                 {
  158.                                         player->CLOSE_GOSSIP_MENU();
  159.                                 }break;
  160.                                      
  161.                         }
  162.                         return true;
  163.                 }
  164. };
  165.      
  166. void AddSC_buff_npc()
  167. {
  168.         new buff_npc();
  169. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement