shepher

FindInv - Shepher & The Rev' [Your Destiny Project.dll]

Jun 26th, 2011
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. // Função buscar no inventário todo.
  2. // Retorna -1 se não achou
  3. // Retorna o slot se achou
  4. // Shepher & The Rev'
  5. int FindInv(int clientid, int item)
  6. {
  7. MOB *player = (MOB*)GetMobFromIndex(clientid);
  8. int SlotA;
  9. int slot = -1; // -1 porque o index inicial é 0;
  10. for(int i = 0; i < 64; i++) // Verifica os 64 slots do inventário
  11. {
  12. SlotA = player->Inventory[i].Index;
  13. if(SlotA == item)
  14. {
  15. slot = i;
  16. break;
  17. }
  18. }
  19. return slot;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment