Vendor Scavenger by AreYouKidden🐲
Description: Used with 1-5 pack animals, to scavenge items off the ground, and move items in backpack, to the pack animals, for when shopping for bulk amounts. Just run the script, it'll identify animals for you.
1@setvar 'PauseTime' 750
2if not listexists 'ScavItems'
3 createlist 'ScavItems'
4endif
5clearlist 'ScavItems'
6//Reagents
7pushlist 'ScavItems' '0xf7b' 'back'
8pushlist 'ScavItems' '0xf7a' 'back'
9pushlist 'ScavItems' '0xf86' 'back'
10pushlist 'ScavItems' '0xf8c' 'back'
11pushlist 'ScavItems' '0xf85' 'back'
12pushlist 'ScavItems' '0xf84' 'back'
13pushlist 'ScavItems' '0xf8d' 'back'
14pushlist 'ScavItems' '0xf88' 'back'
15//Bottles, Scrolls, Arrows, Bolts
16pushlist 'ScavItems' '0xf0e' 'back'
17pushlist 'ScavItems' '0xef3' 'back'
18pushlist 'ScavItems' '0xf3f' 'back'
19pushlist 'ScavItems' '0x1bfb' 'back'
20//Bolts of Cloth
21pushlist 'ScavItems' '0xf95' 'back'
22if not listexists 'ScavAnimals'
23 createlist 'ScavAnimals'
24endif
25foreach x in 'ScavAnimals'
26 if not find 'x'
27 overhead 'ScavAnimal List cleared'
28 clearlist 'ScavAnimals'
29 endif
30endfor
31pause 250
32if list 'ScavAnimals' < 1
33 overhead 'Scanning for PackAnimals'
34 while findtype 0x0123|0x0124 'ground' 'any' 'any' 2 as 'found'
35 pushlist 'ScavAnimals' 'found' front
36 ignore 'found'
37 endwhile
38 clearignore
39endif
40foreach 'x' in 'ScavItems'
41 while findtype 'x' ground any any 2 as groundItem
42 foreach 'y' in 'ScavAnimals'
43 @setvar 'CurrPacky' 'y'
44 break
45 endfor
46 @poplist 'ScavAnimals' 'CurrPacky'
47 @pushlist 'ScavAnimals' 'CurrPacky' 'back'
48
49 lift groundItem 9999
50 overhead 'CurrPacky'
51 drop 'CurrPacky' -1 -1 0
52 wait 'PauseTime'
53 endwhile
54endfor
55foreach 'x' in 'ScavItems'
56 while findtype 'x' backpack any any 1 as groundItem
57 foreach 'y' in 'ScavAnimals'
58 @setvar 'CurrPacky' 'y'
59 break
60 endfor
61 @poplist 'ScavAnimals' 'CurrPacky'
62 @pushlist 'ScavAnimals' 'CurrPacky' 'back'
63
64 lift groundItem 9999
65 overhead 'CurrPacky'
66 drop 'CurrPacky' -1 -1 0
67 wait 'PauseTime'
68 endwhile
69endfor