Skip to content

Commit

Permalink
Update v2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
RattlesHyper committed Mar 1, 2023
1 parent 9b221e9 commit 193458b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
1 change: 0 additions & 1 deletion assets/js/botMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ botApi.on("spawn", (name)=> {
sendLog(`<li> <img src="./assets/icons/app/arrow-right.svg" class="icon-sm" style="filter: brightness(0) saturate(100%) invert(26%) sepia(94%) saturate(5963%) hue-rotate(74deg) brightness(96%) contrast(101%)"> ${name} Spawned.</li>`)
})
botApi.on("kicked", (name, reason)=> {
console.log(reason)
rmPlayer(name)
sendLog(`<li> <img src="./assets/icons/app/arrow-left.svg" class="icon-sm" style="filter: brightness(0) saturate(100%) invert(11%) sepia(92%) saturate(6480%) hue-rotate(360deg) brightness(103%) contrast(113%)"> [${name}] : ${formatText(JSON.parse(reason))}</li>`)
})
Expand Down
11 changes: 8 additions & 3 deletions assets/js/cf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const ProxyAgent = require('proxy-agent')
const botApi = new EventEmitter()
const fetch = require('node-fetch')
const fs = require('fs')
const currentVersion = "2.0"
const currentVersion = "2.1"
let stopBot = false

//bot connect method
Expand Down Expand Up @@ -227,9 +227,14 @@ async function startScript(botId, script) {
for (var i = 0; i < lines.length; i++) {
const args = lines[i].split(" ")
const command = args.shift().toLowerCase();
const cmd2 = args.shift(1)
if (command === "loop") {
startScript(botId, script)
sendLog(`<li> <img src="./assets/icons/app/code.svg" class="icon-sm" style="filter: brightness(0) saturate(100%) invert(28%) sepia(100%) saturate(359%) hue-rotate(172deg) brightness(93%) contrast(89%)"> [${botId}] Script Loop </li>`)
}
if (command === "delay") {
sendLog(`<li> <img src="./assets/icons/app/code.svg" class="icon-sm" style="filter: brightness(0) saturate(100%) invert(28%) sepia(100%) saturate(359%) hue-rotate(172deg) brightness(93%) contrast(89%)"> [${botId}] Delay ${args.shift()}ms </li>`)
await delay(args.shift())
sendLog(`<li> <img src="./assets/icons/app/code.svg" class="icon-sm" style="filter: brightness(0) saturate(100%) invert(28%) sepia(100%) saturate(359%) hue-rotate(172deg) brightness(93%) contrast(89%)"> [${botId}] Delay ${cmd2}ms </li>`)
await delay(cmd2)
} else if (command === "chat") {
botApi.emit(botId + command, lines[i].slice(5))
sendLog(`<li> <img src="./assets/icons/app/code.svg" class="icon-sm" style="filter: brightness(0) saturate(100%) invert(28%) sepia(100%) saturate(359%) hue-rotate(172deg) brightness(93%) contrast(89%)"> [${botId}] Chat ${lines[i].slice(5)} </li>`)
Expand Down
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
<input id="botConnectIp" class="input" type="text" placeholder="localhost:25565">
<select id="botversion" class="select">
<option value="">Version Auto</option>
<option value="1.19.3">1.19.3</option>
<option value="1.19.2">1.19.2</option>
<option value="1.19.1">1.19.1</option>
<option value="1.19">1.19</option>
<option value="1.18.2">1.18.2</option>
<option value="1.18.1">1.18.1</option>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "trafficermc",
"author": "RattlesHyper",
"maintainer": "RattlesHyper",
"version": "2.0.0",
"version": "2.1.0",
"description": "A Minecraft botting tool with Anti-AFK, Chat spammer, Inventory/Chest manager features.",
"license": "MIT",
"main": "main.js",
Expand All @@ -16,7 +16,7 @@
"dependencies": {
"electron-json-storage": "^4.6.0",
"electron-store": "^8.1.0",
"mineflayer": "^4.1.0",
"mineflayer": "^4.8.1",
"node-fetch": "2.6.7",
"proxy-agent": "^5.0.0",
"socks": "^2.7.0"
Expand Down

0 comments on commit 193458b

Please sign in to comment.