Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class npc_gossip_main : public CreatureScript
- {
- public:
- npc_gossip_main() : CreatureScript("npc_gossip_main") { }
- bool OnGossipHello(Player* player, Creature* creature)
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Next Menu", GOSSIP_SENDER_MAIN, 1);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Nevermind..", GOSSIP_SENDER_MAIN, 99);
- player->SEND_GOSSIP_MENU(1, creature->GetGUID());
- return true;
- }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /* sender */, uint32 actions)
- {
- player->PlayerTalkClass->ClearMenus();
- if (actions == 1)
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Next Menu 2", GOSSIP_SENDER_MAIN, 2);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Next Menu 3", GOSSIP_SENDER_MAIN, 3);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "<- Back <-", GOSSIP_SENDER_MAIN, 1000);
- player->SEND_GOSSIP_MENU(1, creature->GetGUID());
- player->CLOSE_GOSSIP_MENU();
- }
- else if (actions == 99)
- player->CLOSE_GOSSIP_MENU();
- else if (actions == 1000)
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Next Menu", GOSSIP_SENDER_MAIN, 1);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Nevermind..", GOSSIP_SENDER_MAIN, 99);
- player->SEND_GOSSIP_MENU(1, creature->GetGUID());
- }
- return true;
- }
- };
- void AddSC_gossip_port()
- {
- new npc_gossip_main;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement