Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function FastLootRPG()
- {
- while (true)
- {
- //1 - loot all; 0 - loot prioritized items
- var all = 0;
- //1 - ignore list, 0 - do not ignore
- var clear = 1;
- //1 - use skinning
- var useSkining = 0;
- FastLoot('Loot', all, clear, useSkining);
- Orion.Wait(500);
- }
- }
- function FastLootPVP()
- {
- var all = 0;
- var clear = 1;
- var useSkining = 1;
- FastLoot('Loot2', all, clear, useSkining);
- }
- function FastLoot(listName, all, clear, useSkining)
- {
- var corpse = FindCorpse();
- if (corpse == null)
- {
- Orion.ResetIgnoreList();
- Orion.IgnoreReset();
- // Orion.Print('-1', 'No more corpses found. Reseting list.');
- // Orion.Print('-1', 'No more corpses found. Reseting list.');
- // Orion.Print('-1', 'No more corpses found. Reseting list.');
- }
- else
- {
- Orion.AddObject('corpse', corpse.Serial());
- if (useSkining == 1)
- Skining();
- Orion.UseObject('corpse');
- Orion.Wait('200');
- LootLag();
- Loot(listName, all, clear, useSkining);
- }
- }
- function FindCorpse()
- {
- var list = Orion.FindType('0x0ECD|0x2006|0x0ECA|0x0ECC|0x0E40|0x0E41|0x0ECE', '-1', ground, 'fast', '2');
- if (list.length)
- {
- return Orion.FindObject(list[0]);
- }
- return null;
- }
- function LootLag()
- {
- var timer = Orion.Now() + 300;
- while (!Orion.FindType('-1', '-1', 'corpse').length && timer > Orion.Now())
- Orion.Wait(50);
- }
- function Loot(listName, all, clear, useSkining)
- {
- var bag = '0x0E75';
- var lootBagList = Orion.FindType(bag);
- if (lootBagList.length)
- Orion.AddObject('lootpack', lootBagList[0]);
- else
- Orion.AddObject('lootpack', Orion.GetSerial(backpack));
- LootByFindList(listName);
- if (all == 1)
- {
- if (clear == 1)
- Orion.UseIgnoreList('ignoreLoot');
- else
- Orion.ResetIgnoreList();
- LootAll();
- Orion.ResetIgnoreList();
- }
- }
- function Skining()
- {
- Orion.WaitTargetObject('corpse');
- Orion.UseType('0x0F52');
- Orion.Wait(600);
- }
- function LootItems(list)
- {
- if (!list.length)
- return false;
- for (var i = 0; i < list.length; i++)
- {
- if (Orion.GetDistance('corpse') > 2)
- return false;
- Orion.MoveItem(list[i], 0, 'lootpack');
- Orion.Wait(100);
- }
- return true;
- }
- function LootByFindList(listName)
- {
- while (LootItems(Orion.FindList(listName, 'corpse')))
- Orion.Wait(50);
- Orion.Ignore('corpse');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement