This repository was archived by the owner on Apr 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathyettings.js
More file actions
367 lines (305 loc) · 11.7 KB
/
yettings.js
File metadata and controls
367 lines (305 loc) · 11.7 KB
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
import {AutoGG, Desktop, URI} from './utils/javaClasses'
import { @Vigilant, @SwitchProperty,
@TextProperty, @ButtonProperty,
@SelectorProperty, @SliderProperty
@ColorProperty, Color } from 'Vigilance'
import {version} from './utils/constants'
import {ahSearch, bzSearch} from './features/keybinds'
import {getCharFromKeyCode} from './utils/functions'
const video = new URI('https://www.youtube.com/watch?v=-z_AZR35ozI') // Bounty hunting video
let autoGGConfig
let autoGGOn = false
function getIsAutoGG() { // Detect if AutoGG is on (if it exists)
const autoGG = AutoGG.INSTANCE
if (!autoGG instanceof AutoGG) return true
autoGGConfig = autoGG.getAutoGGConfig()
if (autoGGConfig.isModEnabled()) {
autoGGOn = true
return true
}
else return false
}
function getAutoGGDelay() {
if (autoGGOn) {
return autoGGConfig.getAutoGGDelay()
}
else return 1
}
@Vigilant('YedelUtils', 'YedelUtils', {
getCategoryComparator: () => (a, b) => {
const categories = ['General', 'Modern Features', 'TNT Tag', 'Hypixel Says']
return categories.indexOf(a.name) - categories.indexOf(b.name)
},
getSubcategoryComparator: () => (a, b) => {
const subcategories = ['Features', 'Keybinds', 'Customization']
return subcategories.indexOf(a.getValue()[0].attributesExt.subcategory) - subcategories.indexOf(b.getValue()[0].attributesExt.subcategory)
},
getPropertyComparator: () => (a, b) => {
const properties = ['Reset stats', 'Customize display', 'Highlight target and show distance', 'Play sounds for target selections and kills', 'Target selection sound', 'Kill sound', 'Give items to play again and leave the game', 'Play again item', 'Return to lobby item']
return properties.indexOf(a.attributesExt.name) - properties.indexOf(b.attributesExt.name)
}
})
class Yettings {
@SwitchProperty({
name: 'Auto welcome guild members',
description: 'Automatically welcomes new guild members, customize the message below.\n&a[VIP] Yedelos &ejoined the guild!\n&2Guild > &b[MVP&8+&b] Yedel &6[Yedel]&f: Welcome, Yedelos!',
category: 'General',
subcategory: 'Features',
})
guildWelcome = true;
@SwitchProperty({
name: 'SkyWars strength indicators',
description: 'Shows people\'s strength above their nametags. Accounts for Apothecary.\nThe color of the indicators can be customized below',
category: 'General',
subcategory: 'Features'
})
strengthIndicators = true;
@SwitchProperty({
name: 'BedWars defusal solver',
description: 'Highlights redstone for the BedWars defusal challenge.',
category: 'General',
subcategory: 'Features'
})
defusalSolver = true;
@SwitchProperty({
name: 'Dropper AutoGG',
description: 'AutoGG for dropper, will be removed when it is added to Sk1er\'s AutoGG.\n&eNote: This only says gg at the end of the game, not when you finish.',
category: 'General',
subcategory: 'Features'
})
dropperGG = getIsAutoGG();
@SwitchProperty({
name: 'Kuudra sacrifice display',
description: 'Shows the coins needed to get the Kuudra Follower Helmet from the Kuudra Believer.',
category: 'General',
subcategory: 'Features'
})
sacrificeDisplay = true;
@SwitchProperty({
name: 'Limbo creative mode',
description: 'Gives creative mode in limbo, not bannable because the server does not listen to anything happening.',
category: 'General',
subcategory: 'Features'
})
limboCreative = false;
@SwitchProperty({
name: 'AH market searching',
description: `Press &6${getCharFromKeyCode(ahSearch.getKeyCode())} &7to search the auction house for your currently held item.`,
category: 'General',
subcategory: 'Keybinds'
})
ahKeybindEnabled = true;
@SwitchProperty({
name: 'Bazaar market searching',
description: `Pr&7ess &6${getCharFromKeyCode(bzSearch.getKeyCode())} &7to search the bazaar for your currently held item.`,
category: 'General',
subcategory: 'Keybinds'
})
bzKeybindEnabled = true;
@SwitchProperty({
name: 'Book background',
description: 'Draws the default dark background in book GUIs',
category: 'Modern Features',
subcategory: 'Features',
})
drawBookBackground = true;
@SwitchProperty({
name: 'Interactions',
description: 'Swing your hand when using certain items, such as a snowball or water bucket (on the ground)',
category: 'Modern Features',
subcategory: 'Hand Swings'
})
interactSwings = false;
@SwitchProperty({
name: 'Item drops',
description: 'Swing your hand when dropping an item',
category: 'Modern Features',
subcategory: 'Hand Swings'
})
dropSwings = false;
@TextProperty({
name: 'Random placeholder',
description: 'When this is typed in chat, it will be replaced with a random string.',
category: 'General',
subcategory: 'Customization'
})
randomString = '//r';
@TextProperty({
name: 'Auto guild welcome message',
description: 'Message to say when a new guild member joins. Use [player] for the player name',
category: 'General',
subcategory: 'Customization',
})
guildWelcomeMessage = 'Welcome, [player]!'
@ColorProperty({
name: 'Strength color',
description: 'Color for strength indicators (5.5s - 0.5s)',
category: 'General',
subcategory: 'Customization',
})
startStrengthColor = Color.RED;
@ColorProperty({
name: 'Sub strength color',
description: 'Color for strength indicators (0.5s - end)',
category: 'General',
subcategory: 'Customization',
})
endStrengthColor = Color.ORANGE;
@SliderProperty({
name: 'Delay',
description: 'Delay for AutoGG, measured in seconds',
category: 'General',
subcategory: 'Customization',
min: 0,
max: 5
})
dropperGGDelay = getAutoGGDelay();
@SelectorProperty({
name: 'Ping method',
description: '&9Ping: &7Does /ping command. Works on very few servers.' +
'\n&9Command: &7Enters a random command and waits for the unknown command response. Works on almost all servers. ' +
'\n&9Tab: &7Sends a tab completion packet and waits for the response. Works on all servers.' +
'\n&9Stats (default): &7Sends a statistics packet and waits for the response. Works on all servers.' +
'\n&9Server list: &7Gets the ping displayed previously on the server list. Doesn\'t work on singleplayer and if you used Direct Connect.',
category: 'General',
subcategory: 'Customization',
options: ['Ping', 'Command', 'Tab', 'Stats (default)', 'Server list']
})
pingMethod = 3;
@SliderProperty({
name: 'Play again item',
description: 'Where the &b&lPlay Again &ritem should be placed.',
category: 'TNT Tag',
subcategory: 'Features',
min: 1,
max: 9
})
playAgainItem = 8;
@SliderProperty({
name: 'Return to lobby item',
description: 'Where the &c&lReturn To Lobby &ritem should be placed.',
category: 'TNT Tag',
subcategory: 'Features',
min: 1,
max: 9
})
returnToLobbyItem = 9;
@ButtonProperty({
name: 'Customize display',
description: 'Customize the bounty hunting display, can also be done with /movehuntingtext.',
category: 'TNT Tag',
subcategory: 'Features',
placeholder: 'Open GUI'
})
openHuntingGui = () => ChatLib.command('movehuntingtext', true);
@SwitchProperty({
name: 'Bounty Hunting',
description: 'Enables bounty hunting',
category: 'TNT Tag'
})
bountyHunting = true;
@ButtonProperty({
name: 'Video',
description: 'This is a complicated feature, watch my video for help!',
category: 'TNT Tag',
placeholder: 'Open video'
})
watchVideo = () => {
if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
Desktop.getDesktop().browse(video)
}
}
@SwitchProperty({
name: 'Highlight target and show distance',
description: 'Distance is displayed above their nametag, corresponding to their rank color.',
category: 'TNT Tag',
subcategory: 'Features'
})
display = true;
@SwitchProperty({
name: 'Play sounds for target selections and kills',
description: 'Use the buttons below to test these sounds.',
category: 'TNT Tag',
subcategory: 'Features'
})
sounds = true;
@ButtonProperty({
name: 'Target selection sound',
description: 'Sound: random.successful_hit at 10 volume and 0.8 pitch.',
category: 'TNT Tag',
subcategory: 'Features',
placeholder: 'Play sound'
})
playSelection = () => World.playSound('random.successful_hit', 10, 0.8);
@ButtonProperty({
name: 'Kill sound',
description: 'Sound: random.successful_hit at 10 volume and 1.04 pitch.',
category: 'TNT Tag',
subcategory: 'Features',
placeholder: 'Play sound'
})
playKill = () => World.playSound('random.successful_hit', 10, 1.04);
@SwitchProperty({
name: 'Give items to play again and leave the game',
description: 'Mimics spectator items, useful if you have already lost.',
category: 'TNT Tag',
subcategory: 'Features'
})
clickables = true;
@TextProperty({
name: 'Current nick',
description: 'If you\'re playing nicked, set your nick or you might become the target.',
category: 'TNT Tag',
subcategory: 'Features'
})
nick = 'Replace';
@ButtonProperty({
name: '&cReset stats',
category: 'TNT Tag',
placeholder: 'Reset'
})
reset; // Modified later
@SwitchProperty({
name: 'Hypixel Says helper',
description: 'Enable Hypixel Says helper',
category: 'Hypixel Says'
})
hypixelSaysHelper = true;
@SwitchProperty({
name: 'Show type of task in task message',
description: 'All tasks are either participation tasks (do it to get the point) or ranked tasks (top 3 players only get points). \nToggle this to show the type of task at the end of the message.',
category: 'Hypixel Says',
subcategory: 'Features'
})
showType = true;
constructor() {
this.initialize(this)
this.setCategoryDescription('General',
`&9&lYedelUtils &r&l${version}` +
'\nDiscord: &9yedel' +
'\n\n&nCommands:' +
'\n\n&9/formatting: &7Shows all text formatting codes' +
'\n&9/settext: &7Adds custom display text, supports variables with ${the variable}' +
'\n&7Move with &9/movetext&7 and clear with &9/movetext' +
'\n&9/yedelplaytime (/ypt, /yedelpt): &7Shows your total and daily playtime in hours and minutes' +
'\n&9/yedelli (/yli, /li): &7Sends you to the lobby/limbo for an invalid character (disconnects on most other servers)' +
'\n&9/yping (/yp): &7Shows an estimation of your ping using your selected method (customize below)' +
'\n&9/yedelmessage: &7Shows a message about the mod. These can be tips or bug notes.'
); // All commands and keybinds
this.addDependency('Auto guild welcome message', 'Auto welcome guild members')
this.addDependency('Strength color', 'SkyWars strength indicators')
this.addDependency('Sub strength color', 'SkyWars strength indicators')
this.addDependency('Delay', 'Dropper AutoGG')
this.addDependency('Customize display', 'Bounty Hunting')
this.addDependency('&cReset stats', 'Bounty Hunting')
this.addDependency('Current nick', 'Bounty Hunting')
this.addDependency('Highlight target and show distance', 'Bounty Hunting')
this.addDependency('Play sounds for target selections and kills', 'Bounty Hunting')
this.addDependency('Play again item', 'Give items to play again and leave the game')
this.addDependency('Return to lobby item', 'Give items to play again and leave the game')
this.addDependency('Target selection sound', 'Bounty Hunting')
this.addDependency('Kill sound', 'Bounty Hunting')
this.addDependency('Show type of task in task message', 'Hypixel Says helper')
}
}
export default new Yettings