Advertisement
TheNewKid

ItemADD

Jul 26th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. int32_t Functions::getFirstInvADD(const uint16_t client, const SlotType slot, const uint16_t itemId, const uint16_t ef1, const uint16_t efv1)
  2. {
  3.     auto mob = NativeFunctions::getMobFromIndex(client);
  4.  
  5.     if (slot == SlotType::Inventory)
  6.     {
  7.         short MAXINVENTORY = 30;
  8.  
  9.         if (mob->Mob.Inventory[60].Index == 3467) MAXINVENTORY += 15;
  10.         if (mob->Mob.Inventory[61].Index == 3467) MAXINVENTORY += 15;
  11.  
  12.         for (auto i = 0; i < MAXINVENTORY; i++)
  13.         {
  14.             if (mob->Mob.Inventory[i].Index == itemId)
  15.                 return i;
  16.             if (mob->Mob.Inventory[itemId].EF1 == ef1)
  17.                 return i;
  18.             if (mob->Mob.Inventory[itemId].EFV1 == efv1)
  19.                 return i;
  20.         }
  21.     }
  22.     return -1;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement