Guest User

Untitled

a guest
Jul 19th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. public static int LootItems
  2. {
  3. get
  4. {
  5. try
  6. {
  7. return int.Parse(Lua.LuaGetReturnValue("return GetNumLootItems()", "hax.lua")[0]);
  8. }
  9. catch
  10. {
  11. return 0;
  12. }
  13. }
  14. }
  15.  
  16. public static void Loot(int slot)
  17. {
  18. Lua.DoString("LootSlot({0})", slot + 1);
  19. }
  20.  
  21. public static void LootAll()
  22. {
  23. for (int i = 0; i < LootItems; i++)
  24. {
  25. var info = new LootSlotInfo(i);
  26.  
  27. if (!info.Locked)
  28. {
  29. Logging.Write("Trying to loot #{0} of {1} Rarity:{2}",
  30. info.LootQuantity,
  31. info.LootName,
  32. info.LootRarity);
  33.  
  34. Loot(i);
  35. }
  36. }
  37.  
  38. InfoPanel.LootedMob();
  39. Close();
  40. }
Add Comment
Please, Sign In to add comment