forked from amandeepintl/autobot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
117 lines (114 loc) · 3.56 KB
/
Copy pathconfig.js
File metadata and controls
117 lines (114 loc) · 3.56 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
/**
* Autobot Configuration File
* Supports hot-reloading by checking file modifications periodically.
*/
import fs from 'fs';
try {
if (fs.existsSync('.env')) {
process.loadEnvFile('.env');
}
} catch (_) {}
export const config = {
server: {
host: process.env.MC_SERVER_HOST || "localhost",
port: parseInt(process.env.MC_SERVER_PORT) || 25565,
version: process.env.MC_SERVER_VERSION || "1.20.4" // Auto-negotiates if null, specify for faster connection
},
reconnect: {
backoffSequence: [10000, 20000, 40000, 80000, 160000, 300000],
maxFailedAttemptsBeforeCircuitBreaker: 20,
circuitBreakerCooldownMs: 1800000 // 30 minutes
},
watchdog: {
enabled: true,
packetTimeoutMs: 30000, // 30s without packet = stuck
chatTimeoutMs: 300000, // 5m without any chat event
tickTimeoutMs: 15000, // 15s without tick update
checkIntervalMs: 5000 // Watchdog loop check frequency
},
antiAfk: {
enabled: true,
minIntervalMs: 5000, // 5 seconds
maxIntervalMs: 10000, // 10 seconds
actions: {
rotateHead: true,
crouchToggle: true,
shortWalk: true,
inventoryInteract: true
}
},
unstuck: {
enabled: true,
checkIntervalMs: 30000, // Check position every 30s
stuckTimeoutMs: 300000 // Trigger unstuck after 5m of absolute zero movement
},
usernameRotation: {
enabled: true,
usernames: [
"BOT_A01", "BOT_A02", "BOT_A03", "BOT_A04", "BOT_A05", "BOT_A06",
"BOT_B01", "BOT_B02", "BOT_B03", "BOT_B04", "BOT_B05", "BOT_B06",
"BOT_C01", "BOT_C02", "BOT_C03", "BOT_C04", "BOT_C05", "BOT_C06",
"BOT_D01", "BOT_D02", "BOT_D03", "BOT_D04", "BOT_D05", "BOT_D06"
],
rotationSchedule: "time",
sessionDurationMs: 3600000, // 1 hour
maxUsernameFailures: 3,
delayBetweenRotationMs: 10000
},
healthMonitor: {
enabled: true,
checkIntervalMs: 10000,
maxMemoryRssMb: 300, // Memory threshold for restart
maxEventLoopLagMs: 500, // Event loop blockage detection
consecutiveViolationsLimit: 3
},
logging: {
level: "INFO", // DEBUG, INFO, WARN, ERROR
maxSizeMb: 5,
retentionDays: 30
},
performance: {
profile: "Adaptive", // "Ultra-Low", "Balanced", "Active", "Adaptive"
tpsThresholds: {
low: 15,
critical: 10
},
pingThresholds: {
high: 500,
critical: 1500
},
worldCacheExpiryMs: 1000,
cleanupIntervalMs: 1800000 // 30 minutes
},
backup: {
intervalMs: 21600000 // 6 hours
},
behavior: {
chat: {
enabled: false,
intervalMinMs: 300000, // 5 minutes
intervalMaxMs: 300000, // 5 minutes
paragraphs: [
"Just chilling here, hope everyone has a great game! MADE BY Aman",
"AFK for a bit. Beautiful day to watch the clouds roll by. MADE BY Aman",
"Chilling near spawn, taking a quick break. MADE BY Aman",
"Just staying online to keep the server active. Have fun! MADE BY Aman",
"Watching the iron golems patrol. Good vibes only. MADE BY Aman"
]
}
},
aternos: {
detectOffline: true,
detectStarting: true,
detectSleeping: true,
offlineRetryIntervalMs: 120000, // Wait 2 minutes if offline
startingRetryIntervalMs: 60000, // Wait 1 minute if starting
sleepingRetryIntervalMs: 180000 // Wait 3 minutes if sleeping
},
discord: {
token: process.env.DISCORD_TOKEN || "",
channelId: "1522515387793543168", // The channel for status and chat bridge
aternosUser: process.env.ATERNOS_USER || "sir_exactl",
aternosPass: process.env.ATERNOS_PASS || "sir_exactl"
}
};