Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. function FastLootRPG()
  2. {
  3. while (true)
  4. {
  5. //1 - loot all; 0 - loot prioritized items
  6. var all = 0;
  7.  
  8. //1 - ignore list, 0 - do not ignore
  9. var clear = 1;
  10.  
  11. //1 - use skinning
  12. var useSkining = 0;
  13.  
  14. FastLoot('Loot', all, clear, useSkining);
  15. Orion.Wait(500);
  16. }
  17. }
  18. function FastLootPVP()
  19. {
  20.  
  21. var all = 0;
  22.  
  23.  
  24. var clear = 1;
  25.  
  26.  
  27. var useSkining = 1;
  28.  
  29. FastLoot('Loot2', all, clear, useSkining);
  30. }
  31.  
  32. function FastLoot(listName, all, clear, useSkining)
  33. {
  34. var corpse = FindCorpse();
  35.  
  36. if (corpse == null)
  37. {
  38. Orion.ResetIgnoreList();
  39. Orion.IgnoreReset();
  40. // Orion.Print('-1', 'No more corpses found. Reseting list.');
  41. // Orion.Print('-1', 'No more corpses found. Reseting list.');
  42. // Orion.Print('-1', 'No more corpses found. Reseting list.');
  43. }
  44. else
  45. {
  46. Orion.AddObject('corpse', corpse.Serial());
  47. if (useSkining == 1)
  48. Skining();
  49. Orion.UseObject('corpse');
  50. Orion.Wait('200');
  51. LootLag();
  52. Loot(listName, all, clear, useSkining);
  53. }
  54. }
  55.  
  56. function FindCorpse()
  57. {
  58. var list = Orion.FindType('0x0ECD|0x2006|0x0ECA|0x0ECC|0x0E40|0x0E41|0x0ECE', '-1', ground, 'fast', '2');
  59.  
  60. if (list.length)
  61. {
  62. return Orion.FindObject(list[0]);
  63. }
  64. return null;
  65. }
  66.  
  67. function LootLag()
  68. {
  69. var timer = Orion.Now() + 300;
  70.  
  71. while (!Orion.FindType('-1', '-1', 'corpse').length && timer > Orion.Now())
  72. Orion.Wait(50);
  73. }
  74.  
  75. function Loot(listName, all, clear, useSkining)
  76. {
  77. var bag = '0x0E75';
  78.  
  79. var lootBagList = Orion.FindType(bag);
  80.  
  81. if (lootBagList.length)
  82. Orion.AddObject('lootpack', lootBagList[0]);
  83. else
  84. Orion.AddObject('lootpack', Orion.GetSerial(backpack));
  85.  
  86. LootByFindList(listName);
  87.  
  88. if (all == 1)
  89. {
  90. if (clear == 1)
  91. Orion.UseIgnoreList('ignoreLoot');
  92. else
  93. Orion.ResetIgnoreList();
  94.  
  95. LootAll();
  96.  
  97. Orion.ResetIgnoreList();
  98. }
  99. }
  100.  
  101. function Skining()
  102. {
  103. Orion.WaitTargetObject('corpse');
  104. Orion.UseType('0x0F52');
  105. Orion.Wait(600);
  106. }
  107.  
  108. function LootItems(list)
  109. {
  110. if (!list.length)
  111. return false;
  112.  
  113. for (var i = 0; i < list.length; i++)
  114. {
  115. if (Orion.GetDistance('corpse') > 2)
  116. return false;
  117.  
  118. Orion.MoveItem(list[i], 0, 'lootpack');
  119. Orion.Wait(100);
  120. }
  121.  
  122. return true;
  123. }
  124.  
  125. function LootByFindList(listName)
  126. {
  127. while (LootItems(Orion.FindList(listName, 'corpse')))
  128. Orion.Wait(50);
  129. Orion.Ignore('corpse');
  130. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement