Guest User

Untitled

a guest
May 25th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. BOOL MercHealth()
  2. {
  3. LPUNITANY Item = NULL;
  4. DWORD ItemCodes[5] = {591, 590, 589, 588, 587};
  5.  
  6. if (!ClientReady(TRUE) || InTown(Me) || GetUnitState(Me, AFFECT_WHIRLWIND) || Me->pInventory->pCursorItem)
  7. return FALSE;
  8.  
  9. for (INT i = 0; i < ArraySize(ItemCodes); i++)
  10. {
  11. Item = FindItem(ItemCodes[i], STORAGE_BELT);
  12. if (!Item) continue;
  13.  
  14. UseBeltItem(Item->dwUnitId, 1);
  15. return TRUE;
  16. }
  17.  
  18. return FALSE;
  19. }
  20.  
  21. BOOL MercRejuvenation()
  22. {
  23. LPUNITANY Item = NULL;
  24. DWORD ItemCodes[2] = {516, 515};
  25.  
  26. if (!ClientReady(TRUE) || InTown(Me) || GetUnitState(Me, AFFECT_WHIRLWIND) || Me->pInventory->pCursorItem)
  27. return FALSE;
  28.  
  29. for (INT i = 0; i < ArraySize(ItemCodes); i++)
  30. {
  31. Item = FindItem(ItemCodes[i], STORAGE_BELT);
  32. if (!Item) continue;
  33.  
  34. UseBeltItem(Item->dwUnitId, 1);
  35. return TRUE;
  36. }
  37.  
  38. return FALSE;
  39. }
Add Comment
Please, Sign In to add comment