Advertisement
Kaev

ItemScript Template

Jun 9th, 2015
482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. /*
  2. ItemScript Template by Kaev
  3. Made for MMONerds.com, Modcraft.io and MCore.cc
  4. */
  5.  
  6. class itemScriptTemplate : public ItemScript
  7. {
  8. public:
  9.     itemScriptTemplate() : ItemScript("itemScriptTemplate") { } // ItemScript("itemScriptTemplate") = Name of database entry
  10.  
  11.     // Called when the player will use (rightclick) the item
  12.     // IMPORTANT: Item spellid_1 has to be ID 33227 and spellcharges_1 has to be -1 in the database.
  13.     // You also have to set the item to usable (flags 64)
  14.     bool OnUse(Player* player, Item* item, SpellCastTargets const& targets) override
  15.     {
  16.  
  17.     }
  18. };
  19.  
  20. void AddSC_itemScriptTemplate() // Add this to the ScriptLoader
  21. {
  22.     new itemScriptTemplate();
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement