Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* _____ _ _ _ _____ ______ _____ ___ */
- /*| ____|| | | | | || | | | |*/
- /*| | | | | | | ||_____ | |_____ |___|*/
- /*| |___ | |___ | |___| | | | | | */
- /*|_____||_____| |_______| _____| | |_____ | __ */
- #include "ScriptPCH.h"
- class solo_instance_teleport : public PlayerScript
- {
- public:
- solo_instance_teleport() : PlayerScript("solo_instance_teleport") {}
- void OnLevelChanged(Player* player, uint8 newLevel)
- {
- if (newLevel == 80)
- {
- WorldPacket data(SMSG_GOSSIP_MESSAGE, 100); // guess size
- data << uint64(player->GetGUID());
- data << uint32(1); // new 2.4.0
- data << uint32(1);
- data << uint32(1); // max count 0x10
- data << uint32(1);
- data << uint8(1);
- data << uint8(0); // makes pop up box password
- data << uint32(1); // money required to open menu, 2.0.3
- data << "HI"; // text for gossip item
- data << "HI"; // accept text (related to money) pop up box, 2.0.3
- player->GetSession()->SendPacket(&data);
- }
- }
- void OnGossipSelect(Player* player, uint32 menu_id, uint32 sender, uint32 action)
- {
- player->PlayerTalkClass->ClearMenus();
- if (action == 1 || sender == 1 || menu_id == 1)
- {
- player->AddItem(100001, 10);
- }
- player->AddItem(100001, 11);
- player->CLOSE_GOSSIP_MENU();
- }
- };
- void AddSC_solo_instance_teleport()
- {
- new solo_instance_teleport();
- }
Advertisement
Add Comment
Please, Sign In to add comment