Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Script created by: Baynar
- Working: 100%
- Core: OregonCore
- */
- #include "ScriptMgr.h"
- #include "ScriptedCreature.h"
- #include "ScriptedGossip.h"
- #include <cstring>
- bool GossipHello_TeleporterNPC(Player* pPlayer, Creature* pCreature)
- {
- pPlayer->ADD_GOSSIP_ITEM(9, "1", GOSSIP_SENDER_MAIN, 1);
- pPlayer->ADD_GOSSIP_ITEM(8, "2", GOSSIP_SENDER_MAIN, 2);
- pPlayer->ADD_GOSSIP_ITEM(8, "2", GOSSIP_SENDER_MAIN, 3);
- pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
- return true;
- }
- bool GossipSelect_TeleporterNPC(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
- {
- // Not allow in combat
- if (pPlayer->IsInCombat())
- {
- pPlayer->CLOSE_GOSSIP_MENU();
- pCreature->MonsterSay("You are in combat!", LANG_UNIVERSAL, NULL);
- return false;
- }
- switch (uiAction)
- {
- case 1:
- pPlayer->PlayerTalkClass->CloseGossip();
- break;
- case 2:
- pPlayer->TeleportTo(1, -1655.874023, 3090.729736, 30.489744, 2.974260);
- pPlayer->PlayerTalkClass->CloseGossip();
- break;
- case 3:
- //Alliance Leveling zone locations
- pPlayer->ADD_GOSSIP_ITEM(3, "hi", GOSSIP_SENDER_MAIN, 4);
- pPlayer->ADD_GOSSIP_ITEM(7, "<- Main Menu", GOSSIP_SENDER_MAIN, 10000);
- pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
- break;
- case 4:
- //Alliance Leveling zone locations
- pPlayer->TeleportTo(1, -1655.874023, 3090.729736, 30.489744, 2.974260);
- pPlayer->PlayerTalkClass->CloseGossip();
- break;
- case 10000:
- pPlayer->PlayerTalkClass->ClearMenus();
- pPlayer->ADD_GOSSIP_ITEM(9, "1", GOSSIP_SENDER_MAIN, 1);
- pPlayer->ADD_GOSSIP_ITEM(8, "2", GOSSIP_SENDER_MAIN, 2);
- pPlayer->ADD_GOSSIP_ITEM(8, "2", GOSSIP_SENDER_MAIN, 3);
- pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
- return true;
- }
- return true;
- }
- void AddSC_TeleporterNPC()
- {
- Script* newscript;
- newscript = new Script;
- newscript->Name = "TeleporterNPC";
- newscript->pGossipHello = &GossipHello_TeleporterNPC;
- newscript->pGossipSelect = &GossipSelect_TeleporterNPC;
- newscript->RegisterSelf();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement