-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRunbookCloner.uos
127 lines (127 loc) · 3.39 KB
/
RunbookCloner.uos
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// Author: Hawt
// Description: Automatic Runebook Cloner.
// You need to insert the names of each rune on the "Names" List. IT will run over and over if a location is blocked untill it makes it passed too the rune.
//===========================================================
if counter 'runes' < 16
headmsg 'You need at least 16 runes!' 38
stop
endif
// we need at least 33 bp/bm/mr, take more in case of blocked spots
if counter 'bp' < 45
headmsg 'Please make sure you have at least 45 black pearl' 38
stop
endif
if counter 'bm' < 45
stop
headmsg 'Please make sure you have at least 45 bloodmoss' 38
endif
if counter 'mr' < 45
stop
headmsg 'Please make sure you have at least 45 mandrake root' 38
endif
//Select runebook to be cloned
headmsg 'Select original rune book' 38
promptalias 'ToBeCloned'
//Select a blank book
headmsg 'Select empty rune book' 38
promptalias 'Blank Runebook'
//Lists
if not listexists 'Names'
createlist 'Names'
pushlist 'Names' '1'
pushlist 'Names' '2'
pushlist 'Names' '3'
pushlist 'Names' '4'
pushlist 'Names' '5'
pushlist 'Names' '6'
pushlist 'Names' '7'
pushlist 'Names' '8'
pushlist 'Names' '9'
pushlist 'Names' '10'
pushlist 'Names' '11'
pushlist 'Names' '12'
pushlist 'Names' '13'
pushlist 'Names' '14'
pushlist 'Names' '15'
pushlist 'Names' '16'
endif
if not listexists 'Runes'
createlist 'Runes'
pushlist 'Runes' 5
pushlist 'Runes' 11
pushlist 'Runes' 17
pushlist 'Runes' 23
pushlist 'Runes' 29
pushlist 'Runes' 35
pushlist 'Runes' 41
pushlist 'Runes' 47
pushlist 'Runes' 53
pushlist 'Runes' 59
pushlist 'Runes' 65
pushlist 'Runes' 71
pushlist 'Runes' 77
pushlist 'Runes' 83
pushlist 'Runes' 89
pushlist 'Runes' 95
endif
clearjournal
// just makes life easier
cast "Protection"
pause 1500
for 0 to 'Runes'
if mana <= 30
useskill 'Meditation'
while not mana == maxmana
endwhile
endif
pause 1500
// This makes sure the recall worked. If not, you have 15 seconds
// to fix things (e.g. kill whatever is making you fizzle)
// or if the spot is blocked you can recall to a safe spot
// and just let it try over and over again
while not @findalias 'recallsuccessful'
useobject! 'ToBeCloned'
waitforgump 0x554b87f3 15000
replygump 0x554b87f3 Runes[0]
pause 3000
if @injournal 'blocked' 'system' or @injournal 'disturbed' 'system'
headmsg 'Spot blocked or spell fizzled, retrying in 15 seconds...'
pause 5000
headmsg 'Retrying in 10 seconds...'
pause 5000
headmsg 'Retrying in 5 seconds...'
pause 5000
else
setalias 'recallsuccessful' 'self'
endif
endwhile
unsetalias 'recallsuccessful'
// find a rune, mark it, rename it and put it in the book
@findtype 0x1f14 0 'backpack' 1 2
autotargetobject 'found'
cast 'Mark'
pause 3500
useobject! 'found'
waitforprompt 1500
promptmsg Names[0]
pause 2000
moveitem 'found' 'Blank Runebook'
pause 1000
if @injournal 'Names[0]' 'system'
@poplist 'Names' 'front'
@poplist 'Runes' 'front'
else
// marking failed for some reason, wait a bit and recall back in again
headmsg 'Marking failed, retrying in 15 seconds' 38
pause 5000
headmsg 'Retrying in 10 seconds...'
pause 5000
headmsg 'Retrying in 5 seconds...'
pause 5000
endif
clearjournal
endfor
// remove lists and go back home
removelist 'Runes'
removelist 'Names'
playmacro 'Emergency Recall'