-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCutAndLoot
67 lines (67 loc) · 1.69 KB
/
CutAndLoot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// UO Excelsior-specific Cut, Loot, and Warehouse Script
// This script will detect nearby corpses, and automatically
// use dagger, loot hides/feathers/wool, cut hides, do a UOEX
// "[claim" and target the corpse, and then run the Warehouse
// sorter macro.
if not listexists 'cutloot'
createlist 'cutloot'
pushlist 'cutloot' '0x1079' //leather
pushlist 'cutloot' '0xdf8' //wool
pushlist 'cutloot' '0x1bd1' //feather
endif
//setup aliases
if not @findobject 'LootBag'
headmsg 'Select a bag to store the loot'
promptalias 'LootBag'
endif
if not @findalias 'blade'
headmsg 'Which blade will you use?'
promptalias 'blade'
endif
if not @findalias 'scissors'
headmsg 'Which scissors do you wish to use?'
promptalias 'scissors'
endif
//look for corpses
if not @findtype '0x2006' 'any' 'ground' '1' '2'
sysmsg ' **** No Corpse Found - Exiting ****' '28'
stop
else
@setalias! 'o' 'found'
endif
//cut corpse
@useobject 'blade'
waitfortarget '1000'
@target! 'o'
pause 500
//find loot from loot array
sysmsg ' **** Looking for loot ****' '20'
for 0 to 'cutloot'
while @findtype! cutloot[] 'any' 'o' 'any' '2'
sysmsg ' **** Loot found - Moving ****' '20'
if @injournal 'cannot hold more'
sysmsg ' !!! WARNING: Your bag is full. Exiting script !!!' '28'
clearjournal
stop
else
moveitem 'found' 'LootBag'
pause 1000
endif
endwhile
endfor
//cut hides
while @findtype! '0x1079' 'any' 'LootBag'
sysmsg ' **** Hides found - Cutting ****' '20'
@useobject 'scissors'
waitfortarget '1500'
target! 'found'
pause 500
endwhile
//claim corpse
msg '[claim'
waitfortarget 500
target! 'o'
pause '500'
//cancel claim target
@canceltarget!
playmacro 'Warehouse Sorter'