forked from Hirohiko360/LiquidBounceScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCombo.js
More file actions
68 lines (53 loc) · 1.54 KB
/
Combo.js
File metadata and controls
68 lines (53 loc) · 1.54 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
var scriptName = "Combo";
var scriptAuthor = "Soulplexis";
var scriptVersion = 1.0;
var colorIndex = 0;
function randomIntFrom(min,max) // Get a random integer from [min] to [max]
{
return Math.floor(Math.random()*(max-min+1)+min);
}
function printMessage(message) {
var availableColors = ["§c[§4Combo§c] §7", "§c[§4Combo§c] §f"];
var color = availableColors[colorIndex];
colorIndex += 1;
if (colorIndex >= availableColors.length) {
colorIndex = 0;
}
chat.print(color + message + "§r");
}
var Criticals = moduleManager.getModule("Criticals");
function ColorChatModule() {
var value = 0;
this.getName = function() {
return "Combo";
}
this.getCategory = function() {
return "Scripts";
}
this.getDescription = function() {
return "Counts hits and then criticals.";
}
this.onEnable = function() {
value = 0;
criticalstate = Criticals.state;
}
this.onAttack = function() {
value += 1;
if (mc.thePlayer.motionY < -0.08 || Criticals.state == true) {
printMessage("§l§o操你妈!是暴击!! " + value);
} else {
printMessage("连击! " + value);
}
}
this.onDisable = function() {
value = 0;
}
}
var colorChatModule = new ColorChatModule();
var colorChatModuleClient;
function onEnable() {
colorChatModuleClient = moduleManager.registerModule(colorChatModule);
}
function onDisable() {
moduleManager.unregisterModule(colorChatModuleClient);
}