Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- <--------------------------------------------------------------------------->
- - Developer(s): Ghostcrawler336
- - Complete: 100%
- - ScriptName: 'Staff Outfit Vendor'
- - Comment: Untested
- <--------------------------------------------------------------------------->
- */
- #include "ScriptPCH.h"
- enum defines
- {
- // Game Master Outfit
- ADMIN_HEAD = 2586,
- ADMIN_CHEST = 11508,
- ADMIN_FEET = 12064,
- ADMIN_WEAPONS = 100,
- // Admin Outfit
- GM_HEAD = 2586,
- GM_CHEST = 11508,
- GM_FEET = 12064,
- GM_WEAPONS = 100
- };
- class npc_staff : public CreatureScript
- {
- public:
- npc_staff() : CreatureScript("npc_staff"){}
- bool OnGossipHello(Player * pPlayer, Creature * pCreature)
- {
- if(pPlayer->GetSession()->GetSecurity() >= 1) {
- pCreature->MonsterWhisper("You're not a staff member!", pPlayer->GetGUID(), true);
- pPlayer->PlayerTalkClass->SendCloseGossip();
- }else
- pPlayer->ADD_GOSSIP_ITEM(4, "Game Master Outfit", GOSSIP_SENDER_MAIN, 0);
- pPlayer->ADD_GOSSIP_ITEM(4, "Admin Outfit", GOSSIP_SENDER_MAIN, 1);
- pPlayer->PlayerTalkClass->SendGossipMenu(9425, pCreature->GetGUID());
- return true;
- }
- bool OnGossipSelect(Player * pPlayer, Creature * pCreature, uint32 /*uiSender*/, uint32 Action)
- {
- if (Action == 0)
- {
- pPlayer->AddItem(GM_HEAD, 1);
- pPlayer->AddItem(GM_CHEST, 1);
- pPlayer->AddItem(GM_FEET, 1 );
- pPlayer->AddItem(GM_WEAPONS, 1 );
- pCreature->MonsterWhisper("Enjoy your game master outfit!", pPlayer->GetGUID(), true);
- }
- else if (Action == 1)
- {
- pPlayer->AddItem(GM_HEAD, 1);
- pPlayer->AddItem(GM_CHEST, 1);
- pPlayer->AddItem(GM_FEET, 1 );
- pPlayer->AddItem(GM_WEAPONS, 1 );
- pCreature->MonsterWhisper("Enjoy your game master outfit!", pPlayer->GetGUID(), true);
- }
- return true;
- }
- };
- void AddSC_npc_staff()
- {
- new npc_staff();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement