Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class LoveBoat_Gossip : public CreatureScript
- {
- public:
- LoveBoat_Gossip() : CreatureScript("LoveBoat_Gossip") { }
- bool OnGossipHello(Player* player, Creature* creature)
- {
- player->ADD_GOSSIP_ITEM(0, "Fly to the Chimaera spot", GOSSIP_SENDER_MAIN, 1); // See http://www.trinitycore.org/f/topic/6320-single-gossip-item/#entry46494 on how to make single gossip menu item work
- player->ADD_GOSSIP_ITEM(0, "asd", GOSSIP_SENDER_MAIN, 0); // using 2 for now.
- player->SEND_GOSSIP_MENU(40002, creature->GetGUID()); // 40002 was textID right?
- return true;
- }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- player->PlayerTalkClass->ClearMenus();
- switch(action)
- {
- case 0:
- player->CLOSE_GOSSIP_MENU(); break;
- case 1:
- {
- if (player->getClass() != CLASS_WARRIOR) // Gets the class WARRIOR
- player->ADD_GOSSIP_ITEM(2, "You must be a Warrior to learn Warrior spells.", GOSSIP_SENDER_MAIN, 0);
- else
- player->ADD_GOSSIP_ITEM(0, "Teach me my spells!", GOSSIP_SENDER_MAIN, 2); // Warrior Spells Only
- player->ADD_GOSSIP_ITEM(0, "asd", GOSSIP_SENDER_MAIN, 0); // using 2 for now.
- player->SEND_GOSSIP_MENU(1, creature->GetGUID());
- }break;
- }
- return true;
- }
- };
- void AddSC_YourScript()
- {
- new LoveBoat_Gossip();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement