Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* _____ _ _ _ _____ ______ _____ ___ */
- /*| ____|| | | | | || | | | |*/
- /*| | | | | | | ||_____ | |_____ |___|*/
- /*| |___ | |___ | |___| | | | | | */
- /*|_____||_____| |_______| _____| | |_____ | __ */
- #include "ScriptPCH.h"
- #define MENU_ID 123
- class solo_instance_teleport : public PlayerScript
- {
- public:
- solo_instance_teleport(): PlayerScript("solo_instance_teleport") {}
- void OnLevelChanged(Player* player, uint8 newLevel)
- {
- if (newLevel == 80)
- {
- player->PlayerTalkClass->ClearMenus();
- player->PlayerTalkClass->GetGossipMenu().SetMenuId(MENU_ID);
- WorldPacket data(SMSG_GOSSIP_MESSAGE, 100); // guess size
- data << uint64(player->GetGUID());
- data << uint32(MENU_ID); // menu_id
- data << uint32(1); // npc_text
- 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 (menu_id != MENU_ID)
- return;
- if (sender == GOSSIP_SENDER_MAIN && action == GOSSIP_ACTION_INFO_DEF + 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
Advertisement