-
Notifications
You must be signed in to change notification settings - Fork 1
/
magic.cmd
194 lines (160 loc) · 3.77 KB
/
magic.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
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
#[Magic]: Casting spells
# debug 5
## customizable variables
var cambItem $camb_item
var spellPrep With tense movements you|You begin chanting|With rigid movements|You raise your palms skyward|motes of sanguine light swirl briefly about your fingertips
var spellCast gesture|place your hands|You whisper|backfires
##########################################
## main script
##########################################
ECHO *******************************
ECHO **
ECHO ** Train magic with cambrinth. Set the global variable "camb_item"
ECHO **
ECHO ** #var camb_item ring
ECHO **
ECHO ** When starting the script, type .magic <spell> <spell prep amount> <charge cambrinth amount> <skill>
ECHO **
ECHO ** ex: .magic ease 2 3 Augmentation
ECHO **
ECHO ** Optional arguments: .magic ease 2 3 Agumentation maxexp
ECHO ** "maxexp" will run until the skill is locked
ECHO **
ECHO ** Change var cambItem for your cambrinth
ECHO ** Change var spellPrep for your spell preparation
ECHO **
ECHO *******************************
var magicToTrain %4
var snapCast OFF
var manaCheck 20
var manaWaitLevel 60
var fully_prepared NO
action var fully_prepared YES when You feel fully prepared
if_5 then
{
goto begin
}
if_4 then
{
goto begin
}
goto syntax
begin:
var maxexp $%magicToTrain.LearningRate
math maxexp add 15
if %maxexp >= 34 then
{
var maxexp 34
}
goto Start
snap:
var snapCast ON
return
maxexp:
var maxexp 34
return
Start:
IF_5 then
{
gosub %5
}
goto Prep
Charge:
match Charge2 Roundtime
match HoldArmband Try though you may
matchre Wait \.\.\.|may only type ahead
match WaitCharge1 You strain, but lack the mental stamina
put charge my %cambItem %3
matchwait
WaitCharge1:
waiteval $mana > 20
goto Charge
HoldArmband:
put remove %cambItem
goto Charge
Charge2:
pause 0.5
match WaitCharge2 You strain, but lack the mental stamina
match Focus Roundtime
matchre Wait2 \.\.\.|may only type ahead
put charge my %cambItem %3
matchwait
WaitCharge2:
waiteval $mana >= 20
goto Charge2
Wait:
pause 1
goto Charge
Wait2:
pause 1
goto Charge2
Prep:
pause 0.5
matchre Cast.Do You have already fully prepared
matchre Charge %spellPrep
match StopPlay stop playing
put prep %1 %2
matchwait 3
goto Prep
StopPlay:
put stop play
goto Prep
Focus:
match Concentrate Roundtime
match Wait3 ...
put invoke my %cambItem spell
matchwait
Wait3:
pause 1
goto Focus
Concentrate:
match Cast Roundtime
match Cast ...
send power
matchwait 2
goto Cast
Cast:
if "%fully_prepared" = "YES" then goto Cast.Do
if ("%snapCast" = "OFF") then
{
waitfor fully prepared
}
else
{
pause 3
}
Cast.Do:
matchre ManaCheck You strain
matchre ExpCheck %spellCast
match ExpCheck have a spell prepared
put cast
matchwait 2
goto Cast.Do
ExpCheck:
var fully_prepared NO
pause 1
if ($%magicToTrain.LearningRate >= %maxexp) then goto END
goto ManaCheck
ManaCheck:
var fully_prepared NO
if ($mana < %manaCheck) then {
echo
echo Waiting on mana - $mana/%manaWaitLevel %
echo
waiteval $mana >= %manaWaitLevel
}
goto Prep
syntax:
echo
echo
echo *************************************
echo *** Not enough arguments provided ***
echo *************************************
echo
echo
goto end
End:
pause
put wear my %cambItem
put #parse MAGIC DONE
# send hide