forked from quisquous/cactbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
145 lines (144 loc) · 3.78 KB
/
test.js
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
'use strict';
[{
zoneRegex: /^Middle La Noscea$/,
timelineFile: 'test.txt',
// timeline here is additions to the timeline. They can
// be strings, or arrays of strings, or functions that
// take the same data object (including role and lang)
// that triggers do.
timeline: [
'alerttext "Final Sting" before 4 "oh no final sting in 4"',
'alarmtext "Death" before 3',
'alertall "Long Castbar" before 1 speak "voice" "long"',
function(data) {
if (data.role != 'tank' && data.role != 'healer')
return 'hideall "Super Tankbuster"';
},
function(data) {
if (!data.role.startsWith('dps'))
return 'hideall "Pentacle Sac (DPS)"';
},
function(data) {
if (data.role != 'healer')
return 'hideall "Almagest"';
return 'alarmtext "Almagest" before 0';
},
function(data) {
// <_<
let shortName = data.me.substring(0, data.me.indexOf(' '));
return [
'40 "Death To ' + shortName + '!!"',
'hideall "Death"',
];
},
],
timelineTriggers: [
{
id: 'Test Angry Dummy',
regex: /(Angry Dummy)/,
beforeSeconds: 2,
infoText: function(data, matches) {
return {
en: 'Stack for ' + matches[1],
};
},
tts: {
en: 'Stack',
},
},
],
timelineReplace: [
{
locale: 'fr',
replaceText: {
'Final Sting': 'Dard final',
'Almagest': 'Almageste',
'Angry Dummy': 'Mannequin en colère',
'Long Castbar': 'Longue barre de lancement',
'Dummy Stands Still': 'Mannequin immobile',
'Death': 'Mort',
},
replaceSync: {
'You bid farewell to the striking dummy': 'Vous faites vos adieux au mannequin d\'entraînement',
'You bow courteously to the striking dummy': 'Vous vous inclinez devant le mannequin d\'entraînement',
'Engage!': 'À l\'attaque',
},
},
],
triggers: [
{
id: 'Test Poke',
regex: /:You poke the striking dummy/,
regexFr: /:Vous touchez légèrement le mannequin d'entraînement du doigt/,
preRun: function(data) {
data.pokes = (data.pokes || 0) + 1;
},
infoText: function(data) {
return {
en: 'poke #' + data.pokes,
fr: 'Touché #' + data.pokes,
};
},
},
{
id: 'Test Psych',
regex: /:You psych yourself up alongside the striking dummy/,
regexFr: /:Vous vous motivez devant le mannequin d'entraînement/,
alertText: function(data) {
return {
en: 'PSYCH!!!',
fr: 'MOTIVATION !!!',
};
},
tts: {
en: 'psych',
fr: 'Motivation',
},
groupTTS: {
en: 'group psych',
fr: 'group motivation',
},
},
{
id: 'Test Laugh',
regex: /:You burst out laughing at the striking dummy/,
regexFr: /:Vous vous esclaffez devant le mannequin d'entraînement/,
suppressSeconds: 5,
alarmText: function(data) {
return {
en: 'hahahahaha',
fr: 'Mouahahaha',
};
},
tts: {
en: 'hahahahaha',
fr: 'Haha mort de rire',
},
groupTTS: {
en: 'group laugh',
fr: 'group motivation',
},
},
{
id: 'Test Clap',
regex: /:You clap for the striking dummy/,
regexFr: /:Vous applaudissez le mannequin d'entraînement/,
sound: '../../resources/sounds/WeakAuras/Applause.ogg',
soundVolume: 0.3,
tts: {
en: 'clapity clap',
fr: 'Bravo, vive la France',
},
},
{
id: 'Test Lang',
// In game: /echo cactbot lang
regex: /00:0038:cactbot lang/,
infoText: function(data) {
return {
en: 'Language: ' + data.lang,
};
},
},
],
}];