Advertisement
nevadies

Untitled

Sep 17th, 2014
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2.  
  3. class Morph_npc : public CreatureScript
  4. {
  5. public:
  6. Morph_npc() : CreatureScript("Morph_npc") { }
  7.  
  8.  
  9. bool OnGossipHello(Player* player, Creature* creature)
  10. {
  11. if (player->isInCombat())
  12. {
  13. player->GetSession()->SendNotification(" You are in combat!");
  14. player->CLOSE_GOSSIP_MENU();
  15. return false;
  16. }
  17.  
  18. player->ADD_GOSSIP_ITEM(6, "Broken", GOSSIP_SENDER_MAIN, 1);
  19. player->ADD_GOSSIP_ITEM(6, "Fel Orc", GOSSIP_SENDER_MAIN, 2);
  20. player->ADD_GOSSIP_ITEM(6, "Goblin", GOSSIP_SENDER_MAIN, 3);
  21. player->ADD_GOSSIP_ITEM(6, "Pandaren", GOSSIP_SENDER_MAIN, 4);
  22. player->ADD_GOSSIP_ITEM(6, "Worgen", GOSSIP_SENDER_MAIN, 5);
  23. player->ADD_GOSSIP_ITEM(6, "Halfus Wyrmbreaker", GOSSIP_SENDER_MAIN, 6);
  24. player->ADD_GOSSIP_ITEM(6, "DeMorph", GOSSIP_SENDER_MAIN, 50);
  25.  
  26. player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,creature->GetGUID());
  27. return true;
  28. }
  29.  
  30. bool OnGossipSelect(Player* player, Creature* creature, uint32 uiSender, uint32 action)
  31. {
  32.  
  33. switch (action)
  34. {
  35. case 1:
  36. player->CLOSE_GOSSIP_MENU();
  37. player->SetDisplayId(21105);
  38. break;
  39. case 2:
  40. player->CLOSE_GOSSIP_MENU();
  41. player->SetDisplayId(21267);
  42. break;
  43. case 3:
  44. player->CLOSE_GOSSIP_MENU();
  45. player->SetDisplayId(20582);
  46. break;
  47. case 4:
  48. player->CLOSE_GOSSIP_MENU();
  49. player->SetDisplayId(30414);
  50. break;
  51. case 5:
  52. player->CLOSE_GOSSIP_MENU();
  53. player->SetDisplayId(26788);
  54. break;
  55. case 6:
  56. player->CLOSE_GOSSIP_MENU();
  57. player->SetDisplayId(34816);
  58. break;
  59. case 50:
  60. player->CLOSE_GOSSIP_MENU();
  61. player->DeMorph();
  62. break;
  63. }
  64. return true;
  65. }
  66. };
  67.  
  68. void AddSC_Morph_npc()
  69. {
  70. new Morph_npc();
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement