-
Notifications
You must be signed in to change notification settings - Fork 0
/
iots.cmd
116 lines (88 loc) · 2.57 KB
/
iots.cmd
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
include libmaster.cmd
####### CONFIG #######
var ritualFocus $char.ritualFocus
var isFocusWorn $char.wornFocus
var defaultMana $char.cast.iots.prep
######################
var stat %1
if_2 {
var mana %2
} else {
var mana %defaultMana
}
var cha Durgaulda|Yoakena|Ismenia|Er'qutra
var wis %cha
var dis Estrilda|Penhetia|Morleena|Amlothi
var int %dis
var ref Verena|Szeldia|Dawgolesh|Merewalda
var agi %ref
var stats cha|wis|dis|int|ref|agi
var isFullyPrepped 0
var isPlanetUp 0
var planetName
action var isFullyPrepped 1 when ^You feel fully prepared to cast your spell.
action var isPlanetUp 0 when ^checkPlanetUpFalse ^Your search for the planet (\S+) turns up fruitless\.$
action var isPlanetUp 1 when ^The planet (\S+) is too faint for you to pick out with your naked eye.
action var isPlanetUp 1 when ^You focus your enhanced sight
action var isPlanetUp 1 when ^You learned something useful from your observation.
action var isPlanetUp 1 when ^You are unable to make use of this latest observation.
action var isPlanetUp 1 when ^You see nothing regarding the future.
action var isPlanetUp 1 when ^Clouds obscure the sky
action var isPlanetUp 1 when ^Too many futures cloud your mind
if (!contains("%stats", "%stat")) then {
put #echo #FF0000 [.iots] ERROR: `%stat` not a valid option, must be one of: %stats
exit
}
gosub stowing
if (0) then {
if ($SpellTimer.AuraSight.active != 1) then {
put .cast aus
waitforre ^CAST DONE
}
if ($SpellTimer.PiercingGaze.active != 1) then {
put .cast pg
waitforre ^CAST DONE
}
}
echo %%stat
#action echo $1 when (%%stat)
var planets %%stat
eval length count("%planets", "|")
var index 0
gosub findPlanet
gosub iotsCast
iotsCast:
gosub prep iots %mana
if (%isFocusWorn = 1) then {
gosub remove my %ritualFocus
} else {
gosub get my %ritualFocus
}
gosub invoke my %ritualFocus
if (%isFullyPrepped != 1) then gosub waitPrep
gosub cast %planetName
if (%isFocusWorn = 1) then {
gosub wear my %ritualFocus
gosub sort auto head
} else {
gosub stow my %ritualFocus
}
pause
put invoke circle
put #parse IOTS DONE
exit
waitPrep:
pause 1
if (%isFullyPrepped = 1) then return
goto waitPrep
findPlanet:
var planetName %planets(%index)
gosub observe %planetName in sky
if (%isPlanetUp = 1) then return
math index add 1
if (%index > %length) then goto noPlanet
goto findPlanet
noPlanet:
put #echo #BB7700 No planets are up for %stat (%planets)
put #parse IOTS DONE
exit