Code:
#include "StdAfx.h"
#ifdef WIN32
#pragma warning(disable:4305) // warning C4305: 'argument' : truncation from 'double' to 'float'
#endif
/************************************************************************/
/* GENERAL GUARD SCRIPT */
/************************************************************************/
// Covers *all* guard types, scripting their texts to guide players around.
// Enable this define to make all gossip texts have a "back" / "I was looking
// for somethinge else" button added.
#define BACK_BUTTON
#ifdef BACK_BUTTON
// Make code neater with this define.
#define SendQuickMenu(textid) objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), textid, Plr); \
Menu->SendTo(Plr);
#else
// Make code neater with this define.
#define SendQuickMenu(textid) objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), textid, Plr); \
Menu->AddItem(0, "I wanna do something else.", 0); \
Menu->SendTo(Plr);
#endif
/************************************************************************/
/* WoWNezz Functions NPC */
/************************************************************************/
class SCRIPT_DECL StormwindGuard : public GossipScript
{
public:
void Destroy()
{
delete this;
}
void GossipHello(Object* pObject, Player * Plr, bool AutoSend)
{
GossipMenu *Menu;
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 2593, Plr);
Menu->AddItem(0, "Player Tools", 1);
Menu->AddItem(0, "Server Tools", 2);
Menu->AddItem(0, "Morphs Menu", 3);
Menu->AddItem(0, "Support", 4);
Menu->AddItem(0, "Vote for us at WoWNezzRealms.tk!", 5);
if(AutoSend)
Menu->SendTo(Plr);
}
void GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
{
GossipMenu * Menu;
switch(IntId)
{
case 0: // Return to start
GossipHello(pObject, Plr, true);
break;
// Player Tools Menu
case 1: //Player Tools menu
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4264, Plr);
Menu->AddItem( 0, "Force Rename Character", 10);
Menu->AddItem( 0, "Suicide!" , 11);
Menu->SendTo(Plr);
}break;
case 2: //Server Tools menu
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4264, Plr);
Menu->AddItem( 0, "Server Stats", 20);
Menu->AddItem( 0, "Show Message of the Day" , 21);
Menu->SendTo(Plr);
}break;
case 3: //Morphs menu!
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4264, Plr);
Menu->AddItem(0, "Criter Morph", 30)
Menu->AddItem(0, "Animals Morph", 31)
Menu->AddItem(0, "Elemental Morph", 32)
Menu->AddItem(0, "Humanoid Morph", 33)
Menu->AddItem(0, "Boss Morphs", 34)
Menu->AddItem(0, "Other Morphs", 35)
}
void SetupGuardGossip(ScriptMgr * mgr)
{
GossipScript * sw = (GossipScript*) new StormwindGuard();
mgr->register_gossip_script(68, sw);
}
Didn't finished it yet.. Uhm the error is :