I followed a scripting guide and successfully have a mob that heals you, when spoken to (which is cool but I don’t want it).
#include “ScriptMgr.h”
class marryann : public CreatureScript
{
public:
marryann() : CreatureScript(“marryann”) { }
bool OnGossipHello(Player* plr, Creature* npc)
{
plr->ADD_GOSSIP_ITEM(0, "Heal me, quickly", GOSSIP_SENDER_MAIN, 1);
plr->ADD_GOSSIP_ITEM(3, "Close", GOSSIP_SENDER_MAIN, 2);
plr->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, npc->GetGUID());
return true;
}
bool OnGossipSelect(Player* plr, Creature* npc, uint32 sender, uint32 uiAction)
{
if (!plr)
return false;
plr->PlayerTalkClass->ClearMenus();
switch(uiAction)
{
case 1:
{
uint32 MaxHealth = plr->GetMaxHealth();
plr->SetHealth(MaxHealth);
plr->GetSession()->SendAreaTriggerMessage("There you go sweetie");
plr->CLOSE_GOSSIP_MENU();
}
case 2:
{
plr->CLOSE_GOSSIP_MENU();
}
}
return true;
}
};
void AddSC_marryann()
{
new marryann();
}
How can I edit this so the gossip menu has an option to ask about more information, so I can put in a few paragraphs of text. Instead of the heal option I just want some text.
Thanks for your time.