1 (edited by Baynar 2016-05-28 00:31:27)

Hello there i just made a npc i needed for my server and though some of you might need the script for it so here you go
What does the script do ?
If you have want to have a npc give or reward a quest but also have gossip menu in it or enable the gossip menu in the script after the quest is completed this is the script to use

Script created by: Baynar
Working: 100%
Core: OregonCore

#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include <cstring>

#define QUESTS 20000

bool GossipHello_nameofscript(Player* pPlayer, Creature* pCreature)
    uint32 PlayerClass = pPlayer->getClass();

    if (pPlayer->GetQuestStatus(QUESTS) == QUEST_STATUS_COMPLETE && pPlayer->GetQuestRewardStatus(QUESTS))
               /*If you have completed the Quest and taken the reward it will show the menus inside here + non taken quests from the
               npc */
    else if (pPlayer->GetQuestStatus(QUESTS) == QUEST_STATUS_COMPLETE){
              //If the quest is completed but the reward was not taken it will show u only quests
              /*If you don't have any quests or haven't completed the quest it will show u menus inside here or nothing or non taken quests */
    return true;

bool GossipSelect_nameofscript(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
    return true;

void AddSC_nameofscript()
    Script* newscript;

    newscript = new Script;
    newscript->Name = "nameofscript";
    newscript->pGossipHello = &GossipHello_nameofscript;
    newscript->pGossipSelect = &GossipSelect_nameofscript;