Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- CreatureScript Gossip Template by Kaev
- Made for MMONerds.com, Modcraft.io and MCore.cc
- */
- class gossipTemplate : public CreatureScript
- {
- public:
- gossipTemplate() : CreatureScript("gossipTemplate") { } // CreatureScript("gossipTemplate") = Name of database entry
- bool OnGossipHello(Player* player, Creature* creature) override
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "First entry", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- player->SEND_GOSSIP_MENU(1, creature->GetGUID());
- return true;
- }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 actions) override
- {
- if (actions == GOSSIP_ACTION_INFO_DEF+1)
- {
- player->CLOSE_GOSSIP_MENU();
- }
- return true;
- }
- };
- void AddSC_gossipTemplate() // Add this to the ScriptLoader
- {
- new gossipTemplate();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement