kusanagy

Item Level 80 > level 1

Nov 8th, 2019
418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. //made by EmuServers Credit 2019
  2.  
  3. #include "ScriptMgr.h"
  4. #include "Chat.h"
  5. #include "WorldSession.h"
  6.  
  7. class item_level : public ItemScript
  8.  
  9. {
  10. public: item_level() : ItemScript("item_level") { }
  11.  
  12.     bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/)
  13.     {
  14.         if(player->getLevel() < 80)
  15.         {
  16.         player->GetSession()->SendAreaTriggerMessage("no cumples con los requisitos");
  17.         return false;
  18.         }
  19.         else
  20.         {
  21.         player->PlayDirectSound(30);
  22.         player->GiveLevel(1);
  23.         player->GetSession()->SendAreaTriggerMessage("tu eres level 1");
  24.         player->DestroyItemCount(111113, 1, true);
  25.         return true;
  26.         }
  27.     }
  28. };
  29.  
  30. void AddSC_npc_promo()
  31. {
  32.     new item_level();
  33. }
Advertisement
Add Comment
Please, Sign In to add comment