[Help] Gossip Script NPC/PET

Hello,
I have create a Script for an NPC/PET
The Script has no Errors no Warnings!
Core is “898ecf7222fb+ 2014-11-17 12:35:06 +0000 (3.3.5 branch)”
DB is TDB 335.57

Here the Script:

#include “ScriptPCH.h”
/*
ORANGE “|cffFFA500”
DARKORANGE “|cffFF8C00”
RED “|cffFF0000”
LIGHTRED “|cffD63931”
ROYALBLUE “|cff4169E1”
LIGHTBLUE “|cffADD8E6”
YELLOW “|cffFFFF00”
GREEN “|cff008000”
PURPLE “|cffDA70D6”
WHITE “|cffffffff”
SUBWHITE “|cffbbbbbb”
*/
enum spells
{
POWER_WORD_FORTITUDE = 48162,
PRAYER_OF_SPRITE = 48074,
SHADOW_BUFF = 48170,
KINGS_BUFF = 43223,
ARCANE_BUFF = 36880,
MARK_OF_THE_WILD = 48469
};

///////////////////////////////////////////////
/////////////////GENERAL//////////////////////
#define GOSSIP_TEXT_NPC_TP_City “|cffFFA500City|r”
#define GOSSIP_TEXT_NPC_TP_DUNGEON “|cffFFFF00Dungeon|r”
#define GOSSIP_TEXT_NPC_TP_RAID “|cffDA70D6Raids|r”
#define GOSSIP_TEXT_NPC_TP_BUFF “|cff008000Buff me|r”
#define GOSSIP_TEXT_NPC_TP_BUFF_XP “|cff008000Give|r |cffDA70D6XP|r |cff008000Buff|r”
///////////////////////////////////////////////
////////////////HORDE//////////////////////////
#define GOSSIP_TEXT_NPC_CITY_ORGRIMMAR “|cffFF0000Orgrimmar|r”
#define GOSSIP_TEXT_NPC_CITY_THUNDER_BLUFF “|cffFF0000Thunder Bluff|r”
#define GOSSIP_TEXT_NPC_CITY_SILVERMOON “|cffFF0000Silvermoon|r”
#define GOSSIP_TEXT_NPC_CITY_UNDERCITY “|cffFF0000Undercity|r”
///////////////////////////////////////////////////////
////////////////ALLIANCE//////////////////////////////
#define GOSSIP_TEXT_NPC_CITY_IRONFORGE “|cffADD8E6Ironforge|r”
#define GOSSIP_TEXT_NPC_CITY_STORMWIND “|cffADD8E6Stormwind|r”
#define GOSSIP_TEXT_NPC_CITY_DARNASSUS “|cffADD8E6Darnassus|r”
#define GOSSIP_TEXT_NPC_CITY_EXODAR “|cffADD8E6Exodar|r”
////////////////////////////////////////////////////
///////////////NEUTRAL CITY////////////////////////
#define GOSSIP_TEXT_NPC_CITY_DALARAN “|cffFF8C00Dalaran|r”
#define GOSSIP_TEXT_NPC_CITY_SHATTRATH “|cffFF8C00Shattrath|r”
///////////////////////////////////////////////////
/////////////////DUNGEONS//////////////////////////
#define GOSSIP_TEXT_NPC_CITY_BURG_UTGARDE “Utgarde Keep”
#define GOSSIP_TEXT_NPC_CITY_AZJOL_NERUB “Azjol-Nerub”
#define GOSSIP_TEXT_NPC_CITY_AHNKAHET “Ahn’kahet”
#define GOSSIP_TEXT_NPC_CITY_FESTE_DARK_THARON “Drak’Tharon Keep”
#define GOSSIP_TEXT_NPC_CITY_VIOLETT “The Violet Fortress”
#define GOSSIP_TEXT_NPC_CITY_GUNDRAK “Gundrak”
#define GOSSIP_TEXT_NPC_CITY_HALLS_OF_STONE “Halls of Stone”
#define GOSSIP_TEXT_NPC_CITY_UTGARDE_TURM “Utgarde Pinnacle”
#define GOSSIP_TEXT_NPC_CITY_OCCULUS “The Oculus”
#define GOSSIP_TEXT_NPC_CITY_NEXUS “The Nexus”
#define GOSSIP_TEXT_NPC_CITY_STRATHOLME “Culling of Stratholme”
#define GOSSIP_TEXT_NPC_CITY_LIGHTNIG “Halls of Lightning”
#define GOSSIP_TEXT_NPC_CITY_TRIALS_OF_CHAMP “Trial of the Champion”
#define GOSSIP_TEXT_NPC_CITY_HALLS_OF_REFLECT “Halls of Reflection”
#define GOSSIP_TEXT_NPC_CITY_FORGE_SOULS “The Forge of Souls”
#define GOSSIP_TEXT_NPC_CITY_PIT_SARON “Pit of Saron”
///////////////////////////////////////////////////////
/////////////////////RAIDS////////////////////////////
#define GOSSIP_TEXT_NPC_CITY_NAXXRAMAS “Naxxramas”
#define GOSSIP_TEXT_NPC_CITY_OBSIDIAN_SANCTUM “The Obsidian Sanctum”
#define GOSSIP_TEXT_NPC_CITY_EYE_OF_ETERNitY “The Eye of Eternity”
#define GOSSIP_TEXT_NPC_CITY_ULDUAR “Ulduar”
#define GOSSIP_TEXT_NPC_CITY_CRUSADER “Trial of the Crusader”
#define GOSSIP_TEXT_NPC_CITY_ONYXIA “Onyxia’s Lair”
#define GOSSIP_TEXT_NPC_CITY_ICECROWN “Icecrown Citadel”
#define GOSSIP_TEXT_NPC_CITY_RUBY_SANCTUM “The Ruby Sanctum”

uint32 tp_money = 150000;
uint32 buff_money = 250000;

class npc_pet_gossip_tele_buff : public CreatureScript
{
public: npc_pet_gossip_tele_buff() : CreatureScript(“npc_pet_gossip_tele_buff”) { }

	bool OnGossipHello(Player* pPlayer, Creature* pCreature)
	{
		pCreature->Whisper("A teleport cost 15g and a buff cost 25g.", LANG_UNIVERSAL, pPlayer);
		pPlayer->ADD_GOSSIP_ITEM(2, GOSSIP_TEXT_NPC_TP_City, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
		pPlayer->ADD_GOSSIP_ITEM(2, GOSSIP_TEXT_NPC_TP_DUNGEON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 30);
		pPlayer->ADD_GOSSIP_ITEM(2, GOSSIP_TEXT_NPC_TP_RAID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 50);
		pPlayer->ADD_GOSSIP_ITEM(10, GOSSIP_TEXT_NPC_TP_BUFF, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 70);
		pPlayer->ADD_GOSSIP_ITEM(10, GOSSIP_TEXT_NPC_TP_BUFF_XP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 90);
		pPlayer->SEND_GOSSIP_MENU(0, pCreature->GetGUID());
		return true;
	}

	void SendDefaultMenu_ACTION(Player* pPlayer, Creature* pCreature, uint32 uiAction)
	{
		uint32 money = pPlayer->GetMoney();
		switch (uiAction)
		{
		case GOSSIP_ACTION_INFO_DEF + 10:
			if (pPlayer->getFaction() == 0){ // If player Ally
				pPlayer->ADD_GOSSIP_ITEM(2, GOSSIP_TEXT_NPC_CITY_IRONFORGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
				pPlayer->ADD_GOSSIP_ITEM(2, GOSSIP_TEXT_NPC_CITY_STORMWIND, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
				pPlayer->ADD_GOSSIP_ITEM(2, GOSSIP_TEXT_NPC_CITY_DARNASSUS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
				pPlayer->ADD_GOSSIP_ITEM(2, GOSSIP_TEXT_NPC_CITY_EXODAR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14);
				pPlayer->ADD_GOSSIP_ITEM(2, GOSSIP_TEXT_NPC_CITY_DALARAN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
				pPlayer->ADD_GOSSIP_ITEM(2, GOSSIP_TEXT_NPC_CITY_SHATTRATH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
				pPlayer->SEND_GOSSIP_MENU(0, pCreature->GetGUID());
			}
			if (pPlayer->getFaction() == 1){ // if the player Horde
				pPlayer->ADD_GOSSIP_ITEM(2, GOSSIP_TEXT_NPC_CITY_ORGRIMMAR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 17);
				pPlayer->ADD_GOSSIP_ITEM(2, GOSSIP_TEXT_NPC_CITY_THUNDER_BLUFF, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 18);
				pPlayer->ADD_GOSSIP_ITEM(2, GOSSIP_TEXT_NPC_CITY_SILVERMOON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 19);
				pPlayer->ADD_GOSSIP_ITEM(2, GOSSIP_TEXT_NPC_CITY_UNDERCITY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 20);
				pPlayer->ADD_GOSSIP_ITEM(2, GOSSIP_TEXT_NPC_CITY_DALARAN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
				pPlayer->ADD_GOSSIP_ITEM(2, GOSSIP_TEXT_NPC_CITY_SHATTRATH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
				pPlayer->SEND_GOSSIP_MENU(0, pCreature->GetGUID());
			}
			break;

		case GOSSIP_ACTION_INFO_DEF + 11: //IRONFORGE
			if (pPlayer->GetMoney() > tp_money && !pPlayer->IsInCombat()){
				pPlayer->TeleportTo(0, 4918.879883f, -940.406006f, 501.563995f, 0);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else{
				pCreature->Whisper("You have not enough Money or you're in combat!", LANG_UNIVERSAL, pPlayer);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;
		case GOSSIP_ACTION_INFO_DEF + 12: //STORMWIND
			if (pPlayer->GetMoney() > tp_money && !pPlayer->IsInCombat()){
				pPlayer->TeleportTo(0, -8833.379883f, 628.627991f, 94.006599f, 0);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else{
				pCreature->Whisper("You have not enough Money or you're in combat!", LANG_UNIVERSAL, pPlayer);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;
		case GOSSIP_ACTION_INFO_DEF + 13: //DARNASSUS
			if (pPlayer->GetMoney() > tp_money && !pPlayer->IsInCombat()){
				pPlayer->TeleportTo(1, 9921.219727f, 2346.780029f, 1330.780029f, 0);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else{
				pCreature->Whisper("You have not enough Money or you're in combat!", LANG_UNIVERSAL, pPlayer);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;
		case GOSSIP_ACTION_INFO_DEF + 14: //EXODAR
			if (pPlayer->GetMoney() > tp_money && !pPlayer->IsInCombat()){
				pPlayer->TeleportTo(530, -3965.699951f, -11663.599609f, -138.843994f, 0);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else{
				pCreature->Whisper("You have not enough Money or you're in combat!", LANG_UNIVERSAL, pPlayer);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;
		case GOSSIP_ACTION_INFO_DEF + 17: //ORGRIMMAR
			if (pPlayer->GetMoney() > tp_money && !pPlayer->IsInCombat()){
				pPlayer->TeleportTo(1, 1630.208496f, -4373.613281f, 31.481052f, 0);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else{
				pCreature->Whisper("You have not enough Money or you're in combat!", LANG_UNIVERSAL, pPlayer);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;
		case GOSSIP_ACTION_INFO_DEF + 18: //THUNDER BLUFF
			if (pPlayer->GetMoney() > tp_money && !pPlayer->IsInCombat()){
				pPlayer->TeleportTo(1, -1277.369995f, 124.804001f, 131.286911f, 0);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else{
				pCreature->Whisper("You have not enough Money or you're in combat!", LANG_UNIVERSAL, pPlayer);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;
		case GOSSIP_ACTION_INFO_DEF + 19: //SILVERMOON
			if (pPlayer->GetMoney() > tp_money && !pPlayer->IsInCombat()){
				pPlayer->TeleportTo(530, 9487.690430f, -7279.200195f, 14.286690f, 0);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else{
				pCreature->Whisper("You have not enough Money or you're in combat!", LANG_UNIVERSAL, pPlayer);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;
		case GOSSIP_ACTION_INFO_DEF + 20: //UNDERCITY
			if (pPlayer->GetMoney() > tp_money && !pPlayer->IsInCombat()){
				pPlayer->TeleportTo(0, 1584.069946f, 241.987000f, -52.153400f, 0);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else{
				pCreature->Whisper("You have not enough Money or you're in combat!", LANG_UNIVERSAL, pPlayer);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;
		case GOSSIP_ACTION_INFO_DEF + 21: //DALARAN 
			if (pPlayer->GetMoney() > tp_money && !pPlayer->IsInCombat()){
				pPlayer->TeleportTo(571, 5804.149902f, 624.770996f, 647.767029f, 0);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else{
				pCreature->Whisper("You have not enough Money or you're in combat!", LANG_UNIVERSAL, pPlayer);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;
		case GOSSIP_ACTION_INFO_DEF + 22: //SHARATTRATH
			if (pPlayer->GetMoney() > tp_money && !pPlayer->IsInCombat()){
				pPlayer->TeleportTo(530, -1838.160034f, 5301.790039f, -12.428000f, 0);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else{
				pCreature->Whisper("You have not enough Money or you're in combat!", LANG_UNIVERSAL, pPlayer);
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case GOSSIP_ACTION_INFO_DEF + 30: // Dungeons
			pCreature->Whisper("Listed are only Dungeons from WOTLK", LANG_UNIVERSAL, pPlayer);
			break;
		case GOSSIP_ACTION_INFO_DEF + 50: // Raids
			pCreature->Whisper("Listed are only Raids from WOTLK", LANG_UNIVERSAL, pPlayer);
			break;
		case GOSSIP_ACTION_INFO_DEF + 70: // Buffs
			if (pPlayer->GetMoney() > buff_money){
				pPlayer->CastSpell(pPlayer, POWER_WORD_FORTITUDE, true);
				pPlayer->CastSpell(pPlayer, KINGS_BUFF, true);
				pPlayer->CastSpell(pPlayer, MARK_OF_THE_WILD, true);
				pPlayer->CastSpell(pPlayer, PRAYER_OF_SPRITE, true);
				pPlayer->CastSpell(pPlayer, ARCANE_BUFF, true);
				pPlayer->CastSpell(pPlayer, SHADOW_BUFF, true);
				pCreature->Whisper("You are now buffed!", LANG_UNIVERSAL, pPlayer);
			}
			else{
				pCreature->Whisper("You have not enough Money!",LANG_UNIVERSAL, pPlayer);
			}
			pPlayer->CLOSE_GOSSIP_MENU();
			break;
		case GOSSIP_ACTION_INFO_DEF + 90: // XP BUFF
			const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(29175);
			pPlayer->ModSpellDuration(spellInfo, pPlayer, 60, true, AURA_SCRIPT_HOOK_EFFECT_CALC_SPELLMOD);
			break;
		}
	}

	bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
	{
		if (uiSender == GOSSIP_SENDER_MAIN)
		{
			SendDefaultMenu_ACTION(pPlayer, pCreature, uiAction);
		}
		return true;
	}

};

void AddSC_npc_pet_gossip_tele_buff()
{
new npc_pet_gossip_tele_buff();

};
but if i click on the NPC he whisper to me but show not the Gossip Menu and i don’t know why

NPC has the npcFlag “1” and ScriptName “npc_pet_gossip_tele_buff”

another question:
How can i change the duration of a buff/Spell
http://wowhead.com/spell=29175/
is the buff/Spell i will change the 3min. to 60min but how?

dunno about script, but you dont need to change duration of this spell since it stacks up to 20 stacks, so you can get 60 mins in total

Nop thats wrong the buff is not stackable! so you need to do
i have changed the Buff to stack 10 but the Duration was ever 3min

Aura * aura = pPlayer->AddAura(29175, pPlayer); // set the Buff to the Player and create the aura
if (!aura){ // if the aura not set
return;
}
aura->SetDuration(3600000); // Set th XP buff to 60min

that problem was fixxed but i don’t know why the Gossip Npc don’t show me the Gossip Menu
yes it works now but i don’t know why script and Database was not changed…