Advertisement
MichaelCrow

[Trinity] Scroll Genie

Sep 7th, 2012
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2.  
  3. class Scrollofwhatever : public ItemScript
  4. {
  5.     public:
  6.         Scrollofwhatever() : ItemScript("Scrollofwhatever"){}
  7.  
  8.         bool OnUse(Player* pPlayer, Item* pItem, SpellCastTargets const& /*targets*/)
  9.         {
  10.             if(!pPlayer)
  11.                 return false;
  12.  
  13.             if(!pItem)
  14.                 return false;
  15.  
  16.             pPlayer->DestroyItemCount(pItem->GetEntry(), 1, true); 
  17.             pPlayer->SummonCreature(123123, pPlayer->GetPositionX(), pPlayer->GetPositionY()+2, pPlayer->GetPositionZ(), pPlayer->GetOrientation(),TEMPSUMMON_MANUAL_DESPAWN, 20000);
  18.             return true;
  19.         }
  20.    
  21. };
  22.  
  23. void Scrollofwhatever()
  24. {
  25.     new Scrollofwhatever();
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement