-
Notifications
You must be signed in to change notification settings - Fork 0
/
p3_bardtwist.inc
executable file
·55 lines (37 loc) · 1.17 KB
/
p3_bardtwist.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
53
54
SUB p3_bardtwist_init {
/if (${Me.Class.ShortName.NotEqual[BRD]}) /RETURN
/call p3RegisterCommand NEWTWIST bardtwistNewTwist 50
/declare p3TwistEnabled bool outer true
/declare notCastingTimer timer outer 30
/declare doTwist bool outer TRUE
/declare twistOrder string outer 1 2 3 4
/varset twistOrder ${getBotIniOption[Bard.TwistOrder,${twistOrder}]}
/varset p3TwistEnabled ${getBotIniOption[Bard.MacroControlledTwisting,${p3TwistEnabled}]}
/RETURN
}
SUB bardtwistMaintenance {
/if (${p3TwistEnabled}==FALSE) /RETURN
/if (${Me.Class.ShortName.NotEqual[BRD]}) /RETURN
/if (${Me.Casting.ID}!=NULL) /varset notCastingTimer 30
/if (${notCastingTimer}==0) {
/if (${Twist.Twisting}==FALSE && ${doTwist}==TRUE) {
/echo do ${twistOrder}
/twist ${twistOrder}
}
}
/RETURN
}
SUB bardtwistNewTwist(string cmd, string opts) {
/declare newOrder string local ${getStackCommandOpt[${opts},ORDER]}
/if (${Cast.Effect.ID}!=NULL) {
/twist off
/delay 3
/echo new twist start: ${newOrder}
/twist ${newOrder}
/delay 5
}
/varset twistOrder ${newOrder}
/call writeBotIniOption Bard.TwistOrder "${newOrder}"
/bc New twist: ${newOrder} (saved to ini)
/RETURN
}