Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*######
- ## citywizardzx_npc "CITY Wizard Zx"
- ## Written by Minervaxcel
- ## For Elysium.
- ######*/
- #include "ScriptMgr.h"
- #include "ScriptedCreature.h"
- #include "ScriptedGossip.h"
- #include "Player.h"
- #include "WorldSession.h"
- #define GOSSIP_HELLO "'Alright, i'm holding onto it, what now?'"
- class citywizardzx_npc : public CreatureScript
- {
- public:
- citywizardzx_npc() : CreatureScript("citywizardzx_npc") { }
- bool OnGossipSelect(Player *player, Creature *creature, uint32, uint32 action) override
- {
- player->PlayerTalkClass->ClearMenus();
- switch (action)
- {
- case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO, GOSSIP_SENDER_MAIN, 101);
- player->SEND_GOSSIP_MENU(44002, creature->GetGUID());
- break;
- case 100:
- player->AreaExploredOrEventHappens(27002);
- player->TeleportTo(1, 787.660217f, -4756.238281f, 38.345642f, 0.072252f);
- player->PlayerTalkClass->SendCloseGossip();
- break;
- }
- return true;
- }
- bool OnGossipHello(Player* player, Creature* creature) override
- {
- if (creature->IsQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
- if (player->GetQuestStatus(27002) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO, GOSSIP_SENDER_MAIN, 100);
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
- return true;
- }
- };
- void AddSC_citywizardzx_npc()
- {
- new citywizardzx_npc();
- }
Advertisement
Add Comment
Please, Sign In to add comment