Advertisement
Guest User

Ahune by Pandemonius

a guest
Jun 21st, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.89 KB | None | 0 0
  1. class go_ahune_ice_stone : public GameObjectScript
  2. {
  3. public:
  4.     go_ahune_ice_stone() : GameObjectScript("go_ahune_ice_stone") { }
  5.  
  6.     bool OnGossipHello(Player* player, GameObject* go)
  7.     {
  8.         if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
  9.         {
  10.             player->PrepareQuestMenu(go->GetGUID());
  11.             player->SendPreparedQuest(go->GetGUID());
  12.         }
  13.  
  14.         player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_STONE_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
  15.         player->SEND_GOSSIP_MENU(player->GetGossipTextId(go), go->GetGUID());
  16.         return true;
  17.     }
  18.  
  19.     bool OnGossipSelect(Player* player, GameObject* go, uint32 sender, uint32 action)
  20.     {
  21.         player->PlayerTalkClass->ClearMenus();
  22.  
  23.         if (action == GOSSIP_ACTION_INFO_DEF)
  24.         {
  25.             if (Creature* ahune = go->FindNearestCreature(25740, 100.0f, true))
  26.             {
  27.                 ahune->AI()->DoAction(ACTION_START_EVENT);
  28.                 go->Delete();
  29.             }
  30.         }
  31.         return true;
  32.     }
  33. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement