Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- _____ ____
- | ___| __ ___ _______ _ __ / ___|___ _ __ ___
- | |_ | '__/ _ \_ / _ \ '_ \| | / _ \| '__/ _ \
- | _|| | | (_) / / __/ | | | |__| (_) | | | __/
- |_| |_| \___/___\___|_| |_|\____\___/|_| \___|
- Lightning speed and strength
- conjured directly from the depths of logic!
- Infusion-WoW 2011 - 2013 (C)
- <--------------------------------------------------------------------------->
- - Developer(s): Ghostcrawler336
- - Complete: 100%
- - ScriptName: 'VIP gossip vendor'
- - Comment: Untested
- <--------------------------------------------------------------------------->
- */
- #include "ScriptPCH.h"
- enum defines
- {
- // VIP gear
- VIP_HEAD = 2586,
- VIP_CHEST = 11508,
- VIP_FEET = 12064,
- VIP_WEAPONS = 100,
- };
- class npc_vip : public CreatureScript
- {
- public:
- npc_vip() : CreatureScript("npc_vip"){}
- bool OnGossipHello(Player * pPlayer, Creature * pCreature)
- {
- if(pPlayer->GetSession()->GetSecurity() >= SEC_MODERATOR) {
- pPlayer->ADD_GOSSIP_ITEM(4, "VIP Gear", GOSSIP_SENDER_MAIN, 0);
- pPlayer->ADD_GOSSIP_ITEM(4, "Character Rename", GOSSIP_SENDER_MAIN, 1);
- pPlayer->ADD_GOSSIP_ITEM(4, "Teleport", GOSSIP_SENDER_MAIN, 2);
- pPlayer->PlayerTalkClass->SendGossipMenu(9425, pCreature->GetGUID());
- }else
- pCreature->MonsterWhisper("You're not a VIP member!", pPlayer->GetGUID(), true);
- pPlayer->PlayerTalkClass->SendCloseGossip();
- return true;
- }
- bool OnGossipSelect(Player * pPlayer, Creature * pCreature, uint32 /*uiSender*/, uint32 uiAction)
- {
- if(!pPlayer)
- return true;
- switch(uiAction)
- {
- case 0: // VIP gear
- {
- pPlayer->AddItem(VIP_HEAD, 1);
- pPlayer->AddItem(VIP_CHEST, 1);
- pPlayer->AddItem(VIP_FEET, 1 );
- pPlayer->AddItem(VIP_WEAPONS, 1 );
- pCreature->MonsterWhisper("Enjoy your VIP gear!", pPlayer->GetGUID(), true);
- pPlayer->PlayerTalkClass->SendCloseGossip();
- }; break;
- case 1: // Character Rename
- {
- pPlayer->SetAtLoginFlag(AT_LOGIN_CUSTOMIZE);
- pPlayer->GetSession()->SendNotification("Relog. To rename your character!");
- } break;
- case 2: // Teleport Locations
- {
- pPlayer->ADD_GOSSIP_ITEM(4, "VIP location 1", GOSSIP_SENDER_MAIN, 10);
- pPlayer->ADD_GOSSIP_ITEM(4, "VIP location 2", GOSSIP_SENDER_MAIN, 11);
- pPlayer->ADD_GOSSIP_ITEM(4, "VIP location 3", GOSSIP_SENDER_MAIN, 12);
- pPlayer->ADD_GOSSIP_ITEM(4, "VIP location 4", GOSSIP_SENDER_MAIN, 13);
- pPlayer->PlayerTalkClass->SendCloseGossip();
- }; break;
- case 10: // VIP location 1
- { // Map X Y Z O
- pPlayer->TeleportTo(230, 990.414f, -218.775f, -61.7892f, 5.49272f);
- pPlayer->PlayerTalkClass->SendCloseGossip();
- } break;
- case 11: // VIP location 2
- { // Map X Y Z O
- pPlayer->TeleportTo(230, 990.414f, -218.775f, -61.7892f, 5.49272f);
- pPlayer->PlayerTalkClass->SendCloseGossip();
- } break;
- case 12: // VIP location 3
- { // Map X Y Z O
- pPlayer->TeleportTo(230, 990.414f, -218.775f, -61.7892f, 5.49272f);
- pPlayer->PlayerTalkClass->SendCloseGossip();
- }break;
- case 13: // VIP location 4
- { // Map X Y Z O
- pPlayer->TeleportTo(230, 990.414f, -218.775f, -61.7892f, 5.49272f);
- pPlayer->PlayerTalkClass->SendCloseGossip();
- }break;
- }
- return true;
- }
- };
- void AddSC_npc_vip()
- {
- new npc_vip();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement