Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Made by: SymboliXDEV
- Edited by: Rochet2
- Work %: 100%
- Compile: Success
- */
- //SymbolixDEV - Start
- #include "ScriptPCH.h"
- #include "ScriptMgr.h"
- #include "ScriptedCreature.h"
- #include "ScriptedGossip.h"
- static const uint32 buffIdstools[] = { 48162, 48074, 48170, 43223, 36880, 48469, 53307, 25898, 25899, 48932, 48161 };
- class symbolixdev_npc : public CreatureScript
- {
- public:
- symbolixdev_npc() : CreatureScript("symbolixdev_npc") { }
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (player->IsInCombat())
- if (player->IsInFlight())
- {
- player->GetSession()->SendNotification("You are in Combat");
- return true;
- }
- // Placeholders for teleports
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cffFF0000 Teleporter", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+110);
- // Player Service Menu
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cffFF0000 Player Tools", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+136);
- // Exchanger Service Menu
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cffFF0000 Exchanger Service", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- // Morph Service Menu
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cffFF0000 Morph Service", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
- //script info
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cffFF0000 Script by : SymbolixDEV", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+22222);
- player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
- return true;
- }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 actions)
- {
- player->PlayerTalkClass->ClearMenus();
- if (sender != GOSSIP_SENDER_MAIN || actions <= GOSSIP_ACTION_INFO_DEF)
- {
- player->CLOSE_GOSSIP_MENU();
- return true;
- }
- switch (sender,actions)
- {
- case GOSSIP_ACTION_INFO_DEF+110:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Teleport me to Mall", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+111);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Teleport me to Duel Zone", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+112);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Teleport me to Profession Place", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+113);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Teleport me to Arena Que Zone", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+114);
- player->PlayerTalkClass->SendGossipMenu(1, creature->GetGUID());
- }else{
- case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff 100 Arena points --> 10000 Honor Points", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+10);
- //player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "10000 Honor Points --> 100 Arena points", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+11);
- player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+136:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Buff me", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Reset my Talents", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Remove my Sickness", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Reset my Cooldowns", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Repair Items", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Clear Combat", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Reset Instances", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Change my Faction", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+233);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Change my Race", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+234);
- player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Gnome - Male", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+12);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Gnome - Female", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+13);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Human - Male", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+14);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Human - Female", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+15);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Tauren - Male", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+16);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Tauren - Female", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+17);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Blood Elf - Male", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+18);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Blood Elf - Female", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+19);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Pirate - Male", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+20);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|cff0000ff Remove my morph", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+20);
- player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,creature->GetGUID());
- break;
- return false;
- case GOSSIP_ACTION_INFO_DEF+3:
- for (int i = 0; i < sizeof(buffIdstools) / sizeof(*buffIdstools); ++i)
- player->CastSpell(player, buffIdstools[i]);
- break;
- case GOSSIP_ACTION_INFO_DEF+4: // Reset Talents
- player->resetTalents(true);
- player->SendTalentsInfoData(false);
- break;
- case GOSSIP_ACTION_INFO_DEF+5: //Remove my siccness
- if (player->HasAura(15007))
- player->RemoveAura(15007);
- break;
- case GOSSIP_ACTION_INFO_DEF+6: // reset my CD'S
- player->RemoveAllSpellCooldown();
- break;
- case GOSSIP_ACTION_INFO_DEF+7: // repair my items
- player->DurabilityRepairAll(false, 0, false);
- break;
- case GOSSIP_ACTION_INFO_DEF+8: // Clear Combat
- player->CombatStop();
- break;
- case GOSSIP_ACTION_INFO_DEF+9: // Reset all Instances For PvE
- for (uint8 i = 0; i < MAX_DIFFICULTY; ++i)
- {
- Player::BoundInstancesMap &binds = player->GetBoundInstances(Difficulty(i));
- for (Player::BoundInstancesMap::iterator itr = binds.begin(); itr != binds.end();)
- {
- player->UnbindInstance(itr, Difficulty(i));
- }
- }
- break;
- case GOSSIP_ACTION_INFO_DEF+10:
- if (player->GetArenaPoints () >= 100)
- {
- player->CLOSE_GOSSIP_MENU();
- player->ModifyArenaPoints(-100);
- player->ModifyHonorPoints(+10000);
- }
- break;
- case GOSSIP_ACTION_INFO_DEF+12://Gnome - Male
- player->CLOSE_GOSSIP_MENU();
- player->SetDisplayId(20580);
- break;
- case GOSSIP_ACTION_INFO_DEF+13://Gnome - Female
- player->CLOSE_GOSSIP_MENU();
- player->SetDisplayId(20581);
- break;
- case GOSSIP_ACTION_INFO_DEF+14://Human - Male
- player->CLOSE_GOSSIP_MENU();
- player->SetDisplayId(19723);
- break;
- case GOSSIP_ACTION_INFO_DEF+15://Tauren - Male
- player->CLOSE_GOSSIP_MENU();
- player->SetDisplayId(20585);
- break;
- case GOSSIP_ACTION_INFO_DEF+16://Tauren - Female
- player->CLOSE_GOSSIP_MENU();
- player->SetDisplayId(20584);
- break;
- case GOSSIP_ACTION_INFO_DEF+17://Blood Elf - Male
- player->CLOSE_GOSSIP_MENU();
- player->SetDisplayId(20578);
- break;
- case GOSSIP_ACTION_INFO_DEF+18://Blood Elf - Female
- player->CLOSE_GOSSIP_MENU();
- player->SetDisplayId(20579);
- break;
- case GOSSIP_ACTION_INFO_DEF+19://Pirate - Male
- player->CLOSE_GOSSIP_MENU();
- player->SetDisplayId(4620);
- break;
- case GOSSIP_ACTION_INFO_DEF+20://Demorph
- player->CLOSE_GOSSIP_MENU();
- player->DeMorph();
- break;
- case GOSSIP_ACTION_INFO_DEF+233:
- {
- player->SetAtLoginFlag(AT_LOGIN_CHANGE_RACE);
- player->PlayerTalkClass->SendCloseGossip();
- }
- break;
- case GOSSIP_ACTION_INFO_DEF+234:
- {
- player->SetAtLoginFlag(AT_LOGIN_CHANGE_FACTION);
- player->PlayerTalkClass->SendCloseGossip();
- }
- break;
- case GOSSIP_ACTION_INFO_DEF+111:
- player->TeleportTo(571, 5804.149902f, 624.770996f,648.747009f, 1.640000f);
- player->PlayerTalkClass->SendCloseGossip();
- break;
- case GOSSIP_ACTION_INFO_DEF+112:
- player->TeleportTo(0, -4248.310059f, -3325.095459f, 231.959869f, 4.653796f);
- player->PlayerTalkClass->SendCloseGossip();
- break;
- case GOSSIP_ACTION_INFO_DEF+113:
- player->TeleportTo(1, -6933.288086f, -4915.037598f, 0.714902f, 4.708452f);
- player->PlayerTalkClass->SendCloseGossip();
- break;
- case GOSSIP_ACTION_INFO_DEF+114:
- player->TeleportTo(530, -855.770020f, 6997.636230f, 34.994953f, 1.067743f);
- player->PlayerTalkClass->SendCloseGossip();
- break;
- default: // Close
- player->CLOSE_GOSSIP_MENU();
- return true;
- }
- OnGossipHello(player, creature);
- return true; //SymboliXDEV - END
- }
- };
- void AddSC_symbolixdev_npc()
- {
- new symbolixdev_npc;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement