Advertisement
randy336

[Trinity] VIP gear

Mar 31st, 2013
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.73 KB | None | 0 0
  1. /*
  2.   _____                        ____              
  3.  |  ___| __ ___ _______ _ __  / ___|___  _ __ ___
  4.  | |_ | '__/ _ \_  / _ \ '_ \| |   / _ \| '__/ _ \
  5.  |  _|| | | (_) / /  __/ | | | |__| (_) | | |  __/
  6.  |_|  |_|  \___/___\___|_| |_|\____\___/|_|  \___|
  7.      Lightning speed and strength
  8.          conjured directly from the depths of logic!  
  9.             Infusion-WoW 2011 - 2013 (C)
  10. <--------------------------------------------------------------------------->
  11.  - Developer(s): Ghostcrawler336
  12.  - Complete: 100%
  13.  - ScriptName: 'VIP gossip vendor'
  14.  - Comment: Untested
  15. <--------------------------------------------------------------------------->
  16. */
  17. #include "ScriptPCH.h"
  18.  
  19. enum defines
  20. {
  21.    // VIP gear
  22. VIP_HEAD = 2586,
  23. VIP_CHEST = 11508,
  24. VIP_FEET = 12064,
  25. VIP_WEAPONS = 100,
  26. };
  27.  
  28. class npc_vip : public CreatureScript
  29. {
  30.     public:
  31.         npc_vip() : CreatureScript("npc_vip"){}
  32.  
  33.         bool OnGossipHello(Player * pPlayer, Creature * pCreature)
  34.         {
  35.                 if(pPlayer->GetSession()->GetSecurity() >= SEC_MODERATOR) {
  36.                pPlayer->ADD_GOSSIP_ITEM(4, "VIP Gear", GOSSIP_SENDER_MAIN, 0);
  37.                pPlayer->ADD_GOSSIP_ITEM(4, "Character Rename", GOSSIP_SENDER_MAIN, 1);
  38.                pPlayer->ADD_GOSSIP_ITEM(4, "Teleport", GOSSIP_SENDER_MAIN, 2);
  39.                pPlayer->PlayerTalkClass->SendGossipMenu(9425, pCreature->GetGUID());
  40.                   }else
  41.                pCreature->MonsterWhisper("You're not a VIP member!", pPlayer->GetGUID(), true);
  42.                pPlayer->PlayerTalkClass->SendCloseGossip();
  43.                   return true;
  44.         }
  45.  
  46.         bool OnGossipSelect(Player * pPlayer, Creature * pCreature, uint32 /*uiSender*/, uint32 uiAction)
  47.         {
  48.             if(!pPlayer)
  49.                 return true;
  50.            
  51.             switch(uiAction)
  52.             {
  53.                 case 0: // VIP gear
  54.                     {
  55.                         pPlayer->AddItem(VIP_HEAD, 1);
  56.                         pPlayer->AddItem(VIP_CHEST, 1);
  57.                         pPlayer->AddItem(VIP_FEET, 1 );
  58.                         pPlayer->AddItem(VIP_WEAPONS, 1 );
  59.                         pCreature->MonsterWhisper("Enjoy your VIP gear!", pPlayer->GetGUID(), true);
  60.                         pPlayer->PlayerTalkClass->SendCloseGossip();
  61.                     }; break;
  62.  
  63.                 case 1: // Character Rename
  64.                     {
  65.                         pPlayer->SetAtLoginFlag(AT_LOGIN_CUSTOMIZE);
  66.                         pPlayer->GetSession()->SendNotification("Relog. To rename your character!");
  67.                     } break;
  68.  
  69.  
  70.                 case 2: // Teleport Locations
  71.                     {
  72.                         pPlayer->ADD_GOSSIP_ITEM(4, "VIP location 1", GOSSIP_SENDER_MAIN, 10);
  73.                         pPlayer->ADD_GOSSIP_ITEM(4, "VIP location 2", GOSSIP_SENDER_MAIN, 11);
  74.                         pPlayer->ADD_GOSSIP_ITEM(4, "VIP location 3", GOSSIP_SENDER_MAIN, 12);
  75.                         pPlayer->ADD_GOSSIP_ITEM(4, "VIP location 4", GOSSIP_SENDER_MAIN, 13);
  76.                         pPlayer->PlayerTalkClass->SendCloseGossip();
  77.                     }; break;
  78.  
  79.                 case 10: // VIP location 1
  80.                     {                   // Map      X        Y           Z          O  
  81.                         pPlayer->TeleportTo(230, 990.414f, -218.775f, -61.7892f, 5.49272f);
  82.                         pPlayer->PlayerTalkClass->SendCloseGossip();
  83.                     } break;
  84.  
  85.                 case 11: // VIP location 2
  86.                     {                      // Map      X        Y           Z         O  
  87.                         pPlayer->TeleportTo(230, 990.414f, -218.775f, -61.7892f, 5.49272f);
  88.                         pPlayer->PlayerTalkClass->SendCloseGossip();
  89.                     } break;
  90.                 case 12: // VIP location 3
  91.                     {                     // Map      X        Y           Z         O  
  92.                         pPlayer->TeleportTo(230, 990.414f, -218.775f, -61.7892f, 5.49272f);
  93.                         pPlayer->PlayerTalkClass->SendCloseGossip();
  94.                     }break;
  95.                 case 13:  // VIP location 4
  96.                     {                      // Map      X        Y           Z         O  
  97.                         pPlayer->TeleportTo(230, 990.414f, -218.775f, -61.7892f, 5.49272f);
  98.                         pPlayer->PlayerTalkClass->SendCloseGossip();
  99.                     }break;
  100.  
  101.  
  102.             }
  103.             return true;
  104.         }
  105.  
  106. };
  107.  
  108. void AddSC_npc_vip()
  109. {
  110.     new npc_vip();
  111. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement