Advertisement
Emulation

Untitled

Oct 19th, 2013
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2.  
  3. class crafting_table_item : public ItemScript
  4. {
  5.     crafting_table_item : ItemScript("crafting_table_item") { }
  6.    
  7.     bool OnUse(Player* player, Item* item, const SpellCastTargets &)
  8.     {
  9.         if(player->IsInCombat())
  10.         {
  11.             player->GetSession()->SendNotification("You cannot summon your crafting table while in combat!");
  12.             return false;
  13.         }
  14.         player->SummonGameObject(180698, player->GetX() + 5, player->GetY(), player->GetZ(), 0, 0, 0, 0, 0, 1000);
  15.         return true;
  16.     }
  17. };
  18.  
  19. void AddSC_crafting_table_item()
  20. {
  21.     new crafting_table_item();
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement