Code:
//Custom Vendor Script for XinuX
//Made by Classic/Jotox
#include "StdAfx.h"
#include "Setup.h"
//Change this.
#DEFINE NPC_ID 0
//Change this if u wanna make him say sumthin different.
#DEFINE MOB_MSG "Hello!"
class SCRIPT_DECL CustomVendor : public GossipScript
{
public:
void GossipHello(Object * pObject, Player * plr, bool AutoSend)
{
plr->GetSession()->SendInventoryList( static_cast< Creature* >( pObject ) );
static_cast<Unit*>(pObject)->SendChatMessageToPlayer(CHAT_MSG_MONSTER_SAY, 0, MOB_MSG, plr);
}
void Destroy()
{
delete this;
}
};
void SetupVendorScript(ScriptMgr * mgr)
{
mgr->register_gossip_script(NPC_ID, &CustomVendor);
}
Here ya go.