Advertisement
randy336

[Trinity] Staff Outfit

Mar 22nd, 2013
1,362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.84 KB | None | 0 0
  1. /*
  2. <--------------------------------------------------------------------------->
  3.  - Developer(s): Ghostcrawler336
  4.  - Complete: 100%
  5.  - ScriptName: 'Staff Outfit Vendor'
  6.  - Comment: Untested
  7. <--------------------------------------------------------------------------->
  8. */
  9. #include "ScriptPCH.h"
  10.  
  11. enum defines
  12. {
  13.     // Game Master Outfit
  14.     ADMIN_HEAD = 2586,
  15.     ADMIN_CHEST = 11508,
  16.     ADMIN_FEET = 12064,
  17.     ADMIN_WEAPONS = 100,
  18.     // Admin Outfit
  19.     GM_HEAD = 2586,
  20.     GM_CHEST = 11508,
  21.     GM_FEET = 12064,
  22.     GM_WEAPONS = 100
  23. };
  24.  
  25. class npc_staff : public CreatureScript
  26. {
  27.     public:
  28.         npc_staff() : CreatureScript("npc_staff"){}
  29.  
  30.         bool OnGossipHello(Player * pPlayer, Creature * pCreature)
  31.         {
  32.             if(pPlayer->GetSession()->GetSecurity() >= 1) {
  33.                 pCreature->MonsterWhisper("You're not a staff member!", pPlayer->GetGUID(), true);
  34.                 pPlayer->PlayerTalkClass->SendCloseGossip();
  35.             }else
  36.             pPlayer->ADD_GOSSIP_ITEM(4, "Game Master Outfit", GOSSIP_SENDER_MAIN, 0);
  37.             pPlayer->ADD_GOSSIP_ITEM(4, "Admin Outfit", GOSSIP_SENDER_MAIN, 1);
  38.             pPlayer->PlayerTalkClass->SendGossipMenu(9425, pCreature->GetGUID());
  39.             return true;
  40.         }
  41.  
  42.         bool OnGossipSelect(Player * pPlayer, Creature * pCreature, uint32 /*uiSender*/, uint32 Action)
  43.         {
  44.             if (Action == 0)
  45.             {
  46.                 pPlayer->AddItem(GM_HEAD, 1);
  47.                 pPlayer->AddItem(GM_CHEST, 1);
  48.                 pPlayer->AddItem(GM_FEET, 1 );
  49.                 pPlayer->AddItem(GM_WEAPONS, 1 );
  50.                 pCreature->MonsterWhisper("Enjoy your game master outfit!", pPlayer->GetGUID(), true);
  51.             }
  52.             else if (Action == 1)
  53.             {
  54.                 pPlayer->AddItem(GM_HEAD, 1);
  55.                 pPlayer->AddItem(GM_CHEST, 1);
  56.                 pPlayer->AddItem(GM_FEET, 1 );
  57.                 pPlayer->AddItem(GM_WEAPONS, 1 );
  58.                 pCreature->MonsterWhisper("Enjoy your game master outfit!", pPlayer->GetGUID(), true);
  59.             }
  60.             return true;
  61.         }
  62.  
  63. };
  64.  
  65. void AddSC_npc_staff()
  66. {
  67.     new npc_staff();
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement