Guest User

Untitled

a guest
May 14th, 2014
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. /* _____ _ _ _ _____ ______ _____ ___ */
  2. /*| ____|| | | | | || | | | |*/
  3. /*| | | | | | | ||_____ | |_____ |___|*/
  4. /*| |___ | |___ | |___| | | | | | */
  5. /*|_____||_____| |_______| _____| | |_____ | __ */
  6. #include "ScriptPCH.h"
  7.  
  8.  
  9. class solo_instance_teleport : public PlayerScript
  10. {
  11. public:
  12. solo_instance_teleport() : PlayerScript("solo_instance_teleport") {}
  13.  
  14.  
  15. void OnLevelChanged(Player* player, uint8 newLevel)
  16. {
  17. if (newLevel == 80)
  18. {
  19. WorldPacket data(SMSG_GOSSIP_MESSAGE, 100); // guess size
  20. data << uint64(player->GetGUID());
  21. data << uint32(1); // new 2.4.0
  22. data << uint32(1);
  23. data << uint32(1); // max count 0x10
  24. data << uint32(1);
  25. data << uint8(1);
  26. data << uint8(0); // makes pop up box password
  27. data << uint32(1); // money required to open menu, 2.0.3
  28. data << "HI"; // text for gossip item
  29. data << "HI"; // accept text (related to money) pop up box, 2.0.3
  30.  
  31. player->GetSession()->SendPacket(&data);
  32. }
  33. }
  34.  
  35. void OnGossipSelect(Player* player, uint32 menu_id, uint32 sender, uint32 action)
  36. {
  37. player->PlayerTalkClass->ClearMenus();
  38. if (action == 1 || sender == 1 || menu_id == 1)
  39. {
  40. player->AddItem(100001, 10);
  41. }
  42. player->AddItem(100001, 11);
  43. player->CLOSE_GOSSIP_MENU();
  44. }
  45.  
  46. };
  47.  
  48.  
  49.  
  50. void AddSC_solo_instance_teleport()
  51. {
  52. new solo_instance_teleport();
  53. }
Advertisement
Add Comment
Please, Sign In to add comment