Code:
#include "precompiled.h"
bool GossipHello_Penguino(Player *player, Creature *_Creature)
{
if ( player->GetTeam() == ALLIANCE ) //if alliance
{
player->ADD_GOSSIP_ITEM( 5, "Home Base" , GOSSIP_SENDER_MAIN, 1000);
player->ADD_GOSSIP_ITEM( 7, "Alliance Cities" , GOSSIP_SENDER_MAIN, 1001);
player->ADD_GOSSIP_ITEM( 7, "Custom 5-Mans (By Difficulty)" , GOSSIP_SENDER_MAIN, 1003);
}
else //if horde
{
player->ADD_GOSSIP_ITEM( 5, "Home Base" , GOSSIP_SENDER_MAIN, 1000);
player->ADD_GOSSIP_ITEM( 7, "Horde Cities" , GOSSIP_SENDER_MAIN, 1002);
player->ADD_GOSSIP_ITEM( 7, "Custom 5-Mans (By Difficulty)" , GOSSIP_SENDER_MAIN, 1003);
}
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID());
return true;
}
void SendDefaultMenu_Penguino(Player *player, Creature *_Creature, uint32 action )
{
switch(action)
{
case 1000: //Home Base
player->CLOSE_GOSSIP_MENU();
player->TeleportTo(530, -250.0467295f, 1033.512695f, 54.322f, 1.611220f);
break;
case 1001: //Alliance Cities
player->ADD_GOSSIP_ITEM( 5, "Stormwind" , GOSSIP_SENDER_MAIN, 1004);
player->ADD_GOSSIP_ITEM( 5, "Ironforge" , GOSSIP_SENDER_MAIN, 1005);
player->ADD_GOSSIP_ITEM( 5, "Darnassus" , GOSSIP_SENDER_MAIN, 1006);
player->ADD_GOSSIP_ITEM( 5, "Exodar" , GOSSIP_SENDER_MAIN, 1007);
player->ADD_GOSSIP_ITEM( 7, "<- [Main Menu]" , GOSSIP_SENDER_MAIN, 5000);
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID());
break;
case 1002: //Horde Cities
player->ADD_GOSSIP_ITEM( 5, "Orgrimmar" , GOSSIP_SENDER_MAIN, 1008);
player->ADD_GOSSIP_ITEM( 5, "Thunderbluff" , GOSSIP_SENDER_MAIN, 1009);
player->ADD_GOSSIP_ITEM( 5, "Undercity" , GOSSIP_SENDER_MAIN, 1010);
player->ADD_GOSSIP_ITEM( 5, "Silvermoon City" , GOSSIP_SENDER_MAIN, 1011);
player->ADD_GOSSIP_ITEM( 7, "<- [Main Menu]" , GOSSIP_SENDER_MAIN, 5000);
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID());
break;
case 1003: //Custom 5-Mans
player->ADD_GOSSIP_ITEM( 5, "Scarlet Monastary Instances" , GOSSIP_SENDER_MAIN, 1012);
player->ADD_GOSSIP_ITEM( 7, "<- [Main Menu]" , GOSSIP_SENDER_MAIN, 5000);
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID());
break;
case 1004: //Stormwind
player->CLOSE_GOSSIP_MENU();
player->TeleportTo(0, -8895.368164f, 567.118835f, 92.6534f, 0.694642f);
break;
case 1005: //Ironforge
player->CLOSE_GOSSIP_MENU();
player->TeleportTo(0, -8895.368164f, 567.118835f, 92.6534f, 0.694642f);
break;
}
}
bool GossipSelect_Penguino(Player *player, Creature *_Creature, uint32 sender, uint32 action)
{
// Main menu
if (sender == GOSSIP_SENDER_MAIN)
SendDefaultMenu_Penguino( player, _Creature, action );
return true;
}
void AddSC_Penguino()
{
Script *newscript;
newscript = new Script;
newscript->Name="Penguino";
newscript->pGossipHello = &GossipHello_Penguino;
newscript->pGossipSelect = &GossipSelect_Penguino;
newscript->pItemHello = NULL;
newscript->pGOHello = NULL;
newscript->pAreaTrigger = NULL;
newscript->pItemQuestAccept = NULL;
newscript->pGOQuestAccept = NULL;
newscript->pGOChooseReward = NULL;
newscript->RegisterSelf();
}
I didn't finish the cases, because I wanted to see if it worked first, which ofc it didn't...