-
Notifications
You must be signed in to change notification settings - Fork 2
/
quickchain.macro
197 lines (182 loc) · 4.58 KB
/
quickchain.macro
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
setglobal quickchainfilerevision "20210225-0100-0001"
//------------------------------------------------
// quickchain.macro
//------------------------------------------------
// Noivad's v3.1 9-18-06
// Debug helpers Chmee, Xenos, Zaerion
// NOTE: right-click is not used for actions, instead see Default for key assignment of click-action.
// Use: right-cick on self: equips (woc)
// right-click on fallen exile: chains fallen
// right-click on chain exile: pulls exile
// right-click on standing exile: pulls exile + re-equips weapon*
// right-click on ground: equips (woc)
// Edit woc text to match your favorite weapon.
// *If you are chaining and you right-click the ground or a standing or chained
// exile exile within 15 seconds after your last chain, the weapon will not be
// re-equiped to avoid accidental dechaining.
set quickc 0
set chainlock 0
// 20081004-inu: Moved to character file:
// setglobal chaintype "chain" // Used by Quickchain.mac.
f5 call flybychain // Quickchain.mac
//begin chain macros
//The QuickChain
// f5 call flybychain -- Moved to AlternateDefault to prevent conflicts if redefined there.
flybychain
{
message "** quickchain.macro / flybychain **"
if @my.right_item != chaintype
setglobal rsaveitem @my.right_item
"/equip " chaintype "\r"
end if
pause 1
"/use \r"
setglobal chainlock + 15
if debug == 1
msg "chainlock: " chainlock
end if
call chaincountdown
}
click-action
{
message "** quickchain.macro / click-action **"
$any_click
if @click.simple_name == @my.simple_name
"/select " @my.simple_name "\r"
if debug == 1
message "clickplayer" @click.simple_name
message "*It's you!"
end if
if chainlock < 1
if @my.right_item != woc
"/equip " woc "\r"
if woc == "caduceus"
"/equip cad\r"
else if woc == "merc"
"/equip merc\r"
else if woc == "moonstone"
"/equip moonstone\r"
"/use 3\r"
call burster
end if
end if
end if
else if @click.simple_name == ""
if debug == 1
message "clickplayer:" @click.simple_name
message "*Ground detected."
end if
if chainlock < 1
if @my.right_item != woc
"/equip " woc "\r"
else
if debug == 1
message "*Weapon of choice: " weapon of choice
message "*To change Weapon of choice, Edit quickchain.txt"
message "*line 15: 'set woc' <weapon name>'"
end if
end if
end if
else if @click.simple_name != ""
"/select "@click.simple_name "\r"
setglobal quickc 1
if debug == 1
// pause 1
message "*Exile detected!"
message ":clickplayer:" @clickplayer
end if
call quickchain
else
if debug == 1
message "*Macro Error in control-click section of quickchain.txt"
end if
end if
}
quickchain
{
message "** quickchain.macro / quickchain **"
if quickc == 1
if @my.right_item != "chain"
setglobal rsaveitem @my.right_item
"/equip " chaintype "\r"
pause 1
end if
"/use " @selplayer.simple_name "\r"
pause 1
if @env.textlog < "You start dragging"
setglobal chainlock + 15
setglobal quickc 0
call chaincountdown
else if @env.textlog < "You must specify a fallen exile."
goto pullexile
else if @env.textlog < "is already on a chain."
goto pullexile
else if @env.textLog < "There is no target for your chain."
goto pullexile
else if @env.textlog < "You cannot drag sleeping exiles."
goto pullexile
else if @env.textlog < "You are still fatigued"
setglobal chainlock + 9
setglobal quickc 0
call chaincountdown
else if @env.textlog < "is too far away for you to reach."
if chainlock < 1
if woc == "caduceus"
"/equip cad\r"
"/use " @selplayer.simple_name "\r"
else if woc == "merc"
"/equip merc\r"
"/use " @selplayer.simple_name "\r"
end if
end if
else
message "*No known textlog event found."
goto msgend
end if
label pullexile
// pause 1
"/pull " @selplayer.simple_name "\r"
if chainlock < 1
"/equip " rsaveitem "\r"
else
message "A Chaining Limiter is on! Unable to equip " rsaveitem " for " chainlock " seconds."
end if
label msgend
if debug == 1
message "*QuiC End Reached"
setglobal quickc 0
end if
}
chaincountdown
{
message "** quickchain.macro / chaincountdown **"
set fps 4
set seconds chainlock
set frames 1
set frames * seconds
set frames * fps
if debug == 1
message "*frames:" frames "seconds:" seconds
message "fps " fps
message loop start
end if
label chaindelay
if frames > 0
set frames - 4
setglobal chainlock - 1
pause fps
goto chaindelay
else
goto end
end if
label end
if debug == 1
message "*CCD End reached"
end if
}
"testqchain"
{
setglobal chainlock + 10
message "chainlock" chainlock
}
message "===> Loaded quickchain.macro"