-
Notifications
You must be signed in to change notification settings - Fork 0
/
p3_retreat.inc
executable file
·52 lines (41 loc) · 1.34 KB
/
p3_retreat.inc
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
SUB p3_retreat_init() {
/call p3RegisterCommand RETREATON retreatOn 50
/call p3RegisterCommand RETREATOFF retreatOff 50
/declare meleeRetreat bool outer FALSE
/declare meleeRetreatPercent int outer 40
/declare meleeRetreatResumePercent int outer 75
/declare meleeRetreatLoc string outer -
/declare amMeleeRetreating bool outer FALSE
/varset meleeRetreatPercent ${getBotIniOption[Assist.RetreatPercent,${meleeRetreatPercent}]}
/varset meleeRetreatResumePercent ${getBotIniOption[Assist.RetreatResumePercent,${meleeRetreatResumePercent}]}
/RETURN
}
SUB retreatMaintenance() {
/if (${meleeRetreat}==TRUE) /call checkMeleeRetreat
/RETURN
}
SUB retreatOn(string cmd, string opts) {
/varset meleeRetreat TRUE
/varset meleeRetreatLoc ${getStackCommandOpt[${opts},LOCXYZ]}
/bc Retreating at ${meleeRetreatLoc}.
/RETURN
}
SUB retreatOff(string cmd, string opts) {
/varset meleeRetreat FALSE
/varset meleeRetreatLoc -
/bc Retreat mode is now off.
/RETURN
}
SUB checkMeleeRetreat() {
/if (${Me.PctHPs} < ${meleeRetreatPercent} && ${amMeleeRetreating}==FALSE) {
/varset amMeleeRetreating TRUE
/invoke (${cq.Append[DROPANCHOR;LOCXYZ=${meleeRetreatLoc};]})
/RETURN
}
/if (${Me.PctHPs} >= ${meleeRetreatResumePercent} && ${amMeleeRetreating}==TRUE) {
/varset amMeleeRetreating FALSE
/invoke (${cq.Append[RAISEANCHOR;]})
/RETURN
}
/RETURN
}