Advertisement
Guest User

Untitled

a guest
Jun 26th, 2016
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. /*
  2. Script created by: Baynar
  3. Working: 100%
  4. Core: OregonCore
  5. */
  6.  
  7. #include "ScriptMgr.h"
  8. #include "ScriptedCreature.h"
  9. #include "ScriptedGossip.h"
  10. #include <cstring>
  11.  
  12. bool GossipHello_TeleporterNPC(Player* pPlayer, Creature* pCreature)
  13. {
  14. pPlayer->ADD_GOSSIP_ITEM(9, "1", GOSSIP_SENDER_MAIN, 1);
  15. pPlayer->ADD_GOSSIP_ITEM(8, "2", GOSSIP_SENDER_MAIN, 2);
  16. pPlayer->ADD_GOSSIP_ITEM(8, "2", GOSSIP_SENDER_MAIN, 3);
  17.  
  18. pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
  19. return true;
  20. }
  21.  
  22. bool GossipSelect_TeleporterNPC(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
  23. {
  24. // Not allow in combat
  25. if (pPlayer->IsInCombat())
  26. {
  27. pPlayer->CLOSE_GOSSIP_MENU();
  28. pCreature->MonsterSay("You are in combat!", LANG_UNIVERSAL, NULL);
  29. return false;
  30. }
  31.  
  32. switch (uiAction)
  33. {
  34. case 1:
  35. pPlayer->PlayerTalkClass->CloseGossip();
  36. break;
  37. case 2:
  38. pPlayer->TeleportTo(1, -1655.874023, 3090.729736, 30.489744, 2.974260);
  39. pPlayer->PlayerTalkClass->CloseGossip();
  40. break;
  41. case 3:
  42. //Alliance Leveling zone locations
  43. pPlayer->ADD_GOSSIP_ITEM(3, "hi", GOSSIP_SENDER_MAIN, 4);
  44. pPlayer->ADD_GOSSIP_ITEM(7, "<- Main Menu", GOSSIP_SENDER_MAIN, 10000);
  45. pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
  46. break;
  47. case 4:
  48. //Alliance Leveling zone locations
  49. pPlayer->TeleportTo(1, -1655.874023, 3090.729736, 30.489744, 2.974260);
  50. pPlayer->PlayerTalkClass->CloseGossip();
  51. break;
  52.  
  53. case 10000:
  54. pPlayer->PlayerTalkClass->ClearMenus();
  55. pPlayer->ADD_GOSSIP_ITEM(9, "1", GOSSIP_SENDER_MAIN, 1);
  56. pPlayer->ADD_GOSSIP_ITEM(8, "2", GOSSIP_SENDER_MAIN, 2);
  57. pPlayer->ADD_GOSSIP_ITEM(8, "2", GOSSIP_SENDER_MAIN, 3);
  58. pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
  59. return true;
  60. }
  61. return true;
  62. }
  63.  
  64. void AddSC_TeleporterNPC()
  65. {
  66. Script* newscript;
  67.  
  68. newscript = new Script;
  69. newscript->Name = "TeleporterNPC";
  70. newscript->pGossipHello = &GossipHello_TeleporterNPC;
  71. newscript->pGossipSelect = &GossipSelect_TeleporterNPC;
  72. newscript->RegisterSelf();
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement