Skip to content

Commit

Permalink
Update v1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
RattlesHyper committed Oct 3, 2022
1 parent 52642dd commit ef47211
Show file tree
Hide file tree
Showing 15 changed files with 253 additions and 193 deletions.
54 changes: 34 additions & 20 deletions BotWindow/botwin.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</div>

<div class="form-control mt-auto">
<label class="label cursor-pointer p-1">
<label class="label p-1">
<span class="label-text">Walk</span>
<input type="checkbox" class="toggle mx-1" id="togglewalk" />
</label>
Expand All @@ -89,56 +89,70 @@

<div class="flex">
<div class="form-control">
<label class="label cursor-pointer">
<span class="label-text">Anti AFK</span>
<label class="label">
<span class="label-text m-1">Anti AFK</span>
<input type="checkbox" class="toggle mx-1" id="afkToggle" />
</label>
</div>
<div class="form-control">
<label class="label cursor-pointer">
<span class="label-text">Auto Reconnect</span>
<label class="label">
<span class="label-text m-1">Auto Reconnect</span>
<input type="checkbox" class="toggle mx-1" id="btnrecon" />
</label>
</div>
</div>

<div class="flex">
<div class="flex btn btn-disabled">
<div class="form-control">
<label class="label cursor-pointer">
KillAura ⚔️
<label class="label text-xl">
KillAura
</label>
</div>
</div>

<div class="flex">
<div class="flex label">
<div class="form-control">
<label class="label cursor-pointer">
<span class="label-text">Attack Delay</span>
<input class="input input-sm input-bordered w-16" placeholder="ms" type="number" min="0" id="atkdel">
<span class="label-text p-1">Target Range</span>
<label class="label">
<span class="label-text mx-2">Attack Delay</span>
<input class="input input-sm input-bordered" style="width: 5pc;" placeholder="ms" type="number" min="0" id="atkdel">
</label>
</div>
<div class="form-control">
<label class="label">
<span class="label-text mx-2">Range</span>
<input class="input input-sm input-bordered w-16" placeholder="1" type="number" min="0" id="atkrng">
<span class="label-text">LockOn</span>
<input type="checkbox" class="toggle mx-1" id="lookLock" />
</label>
</div>
<div class="form-control">
<label class="label">
<span class="label-text mx-2">LockOn</span>
<input type="checkbox" class="toggle" id="lookLock" />
</label>
</div>
</div>

<div class="flex">
<div class="form-control">
<label class="label cursor-pointer">
<span class="label-text p-1">Look</span>
<label class="label">
<span class="label-text">Look</span>
<input type="checkbox" class="toggle mx-1" id="kaLook" />
</label>
</div>
<div class="form-control">
<label class="label">
<span class="label-text">Player</span>
<input type="checkbox" class="toggle mx-1" id="kaPlayer" />
</label>
</div>
<div class="form-control">
<label class="label">
<span class="label-text">Mobs</span>
<input type="checkbox" class="toggle mx-1" id="kaMobs" />
<span class="label-text">Animal</span>
<input type="checkbox" class="toggle mx-1" id="kaAnimal" />
</label>
</div>
</div>

<div class="btn-group p-4">
<div class="btn-group p-4 m-5 ">
<button class="btn btn-success btn-outline w-1/3" onclick="btnRc()">Reconnect</button>
<button class="btn btn-error btn-outline w-1/3" onclick="btnDc()">Disconnect</button>
<button class="btn btn-outline w-1/3" onclick="clearchat()">Clear Chat</button>
Expand Down
17 changes: 4 additions & 13 deletions BotWindow/botwin.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ ipcRenderer.on('startbot', (e, data) => {
});

function newBot(data) {
let unm = "";
unm = data.username.replace("(SALT)", salt(4)).replace("(SALT)", salt(4)).replace("(SALT)", salt(4)).replace("(SALT)", salt(4))
const bot = mineflayer.createBot({
username: data.username,
username: unm,
auth: data.auth,
host: data.host,
port: data.port,
Expand Down Expand Up @@ -219,18 +221,7 @@ function newBot(data) {
var kaBtn = document.getElementById("kaMobs");
var kaMobs = setInterval(() => {
if (kaBtn.checked == false) clearInterval(kaMobs);
const entity = bot.nearestEntity(e => e.kind === 'Hostile mobs')
if (entity && entity.position.distanceTo(bot.entity.position) < document.getElementById('atkrng').value) {
if (document.getElementById('kaLook').checked) bot.lookAt(entity.position.offset(0, entity.height, 0), true)
bot.attack(entity)
}
}, document.getElementById('atkdel').value);
})
document.getElementById('kaAnimal').addEventListener('change', () => {
var kaBtn = document.getElementById("kaAnimal");
var kaAnimal = setInterval(() => {
if (kaBtn.checked == false) clearInterval(kaAnimal);
const entity = bot.nearestEntity(e => e.kind === 'Passive mobs')
const entity = bot.nearestEntity(e => e.type === 'mob')
if (entity && entity.position.distanceTo(bot.entity.position) < document.getElementById('atkrng').value) {
if (document.getElementById('kaLook').checked) bot.lookAt(entity.position.offset(0, entity.height, 0), true)
bot.attack(entity)
Expand Down
53 changes: 34 additions & 19 deletions BotWindow/mbotwin.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,55 +94,70 @@

<div class="flex">
<div class="form-control">
<label class="label cursor-pointer">
<span class="label-text">Anti AFK</span>
<label class="label">
<span class="label-text m-1">Anti AFK</span>
<input type="checkbox" class="toggle mx-1" id="afkToggle" />
</label>
</div>
<div class="form-control">
<label class="label cursor-pointer">
<span class="label-text">Auto Reconnect</span>
<label class="label">
<span class="label-text m-1">Auto Reconnect</span>
<input type="checkbox" class="toggle mx-1" id="btnrecon" />
</label>
</div>
</div>

<div class="flex">
<div class="flex btn btn-disabled">
<div class="form-control">
<label class="label cursor-pointer">
KillAura ⚔️
<label class="label text-xl">
KillAura
</label>
</div>
</div>
<div class="flex">

<div class="flex label">
<div class="form-control">
<label class="label cursor-pointer">
<span class="label-text">Attack Delay</span>
<input class="input input-sm input-bordered w-16" placeholder="ms" type="number" min="0" id="atkdel">
<span class="label-text p-1">Target Range</span>
<label class="label">
<span class="label-text mx-2">Attack Delay</span>
<input class="input input-sm input-bordered" style="width: 5pc;" placeholder="ms" type="number" min="0" id="atkdel">
</label>
</div>
<div class="form-control">
<label class="label">
<span class="label-text mx-2">Range</span>
<input class="input input-sm input-bordered w-16" placeholder="1" type="number" min="0" id="atkrng">
<span class="label-text">LockOn</span>
<input type="checkbox" class="toggle mx-1" id="lookLock" />
</label>
</div>
<div class="form-control">
<label class="label">
<span class="label-text mx-2">LockOn</span>
<input type="checkbox" class="toggle" id="lookLock" />
</label>
</div>
</div>

<div class="flex">
<div class="form-control">
<label class="label cursor-pointer">
<span class="label-text p-1">Look</span>
<label class="label">
<span class="label-text">Look</span>
<input type="checkbox" class="toggle mx-1" id="kaLook" />
</label>
</div>
<div class="form-control">
<label class="label">
<span class="label-text">Player</span>
<input type="checkbox" class="toggle mx-1" id="kaPlayer" />
</label>
</div>
<div class="form-control">
<label class="label">
<span class="label-text">Mobs</span>
<input type="checkbox" class="toggle mx-1" id="kaMobs" />
<span class="label-text">Animal</span>
<input type="checkbox" class="toggle mx-1" id="kaAnimal" />
</label>
</div>
</div>

<div class="btn-group p-4">
<div class="btn-group p-4 m-5 ">
<button class="btn btn-success btn-outline w-1/3" onclick="btnRc()">Reconnect</button>
<button class="btn btn-error btn-outline w-1/3" onclick="btnDc()">Disconnect</button>
<button class="btn btn-outline w-1/3" onclick="clearchat()">Clear Chat</button>
Expand Down
34 changes: 11 additions & 23 deletions BotWindow/mbotwin.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ipcRenderer.on('startbotmulti', (e, data) => {
});

function newBot(options) {

const bot = mineflayer.createBot({
username: options.username,
password: options.password,
Expand Down Expand Up @@ -208,29 +209,16 @@ function newBot(options) {
}, document.getElementById('atkdel').value);
})
document.getElementById('kaMobs').addEventListener('change', () => {
var kaBtn = document.getElementById("kaMobs");
if (kaBtn.checked == false) return;
var kaMobs = setInterval(() => {
if (kaBtn.checked == false) clearInterval(kaMobs);
const entity = bot.nearestEntity(e => e.kind === 'Hostile mobs')
if (entity && entity.position.distanceTo(bot.entity.position) < document.getElementById('atkrng').value) {
if (document.getElementById('kaLook').checked) bot.lookAt(entity.position.offset(0, entity.height, 0), true)
bot.attack(entity)
}
}, document.getElementById('atkdel').value);
})
document.getElementById('kaAnimal').addEventListener('change', () => {
var kaBtn = document.getElementById("kaAnimal");
if (kaBtn.checked == false) return;
var kaAnimal = setInterval(() => {
if (kaBtn.checked == false) clearInterval(kaAnimal);
const entity = bot.nearestEntity(e => e.kind === 'Passive mobs')
if (entity && entity.position.distanceTo(bot.entity.position) < document.getElementById('atkrng').value) {
if (document.getElementById('kaLook').checked) bot.lookAt(entity.position.offset(0, entity.height, 0), true)
bot.attack(entity)
}
}, document.getElementById('atkdel').value);
})
var kaBtn = document.getElementById("kaMobs");
var kaMobs = setInterval(() => {
if (kaBtn.checked == false) clearInterval(kaMobs);
const entity = bot.nearestEntity(e => e.type === 'mob')
if (entity && entity.position.distanceTo(bot.entity.position) < document.getElementById('atkrng').value) {
if (document.getElementById('kaLook').checked) bot.lookAt(entity.position.offset(0, entity.height, 0), true)
bot.attack(entity)
}
}, document.getElementById('atkdel').value);
})
//script listeners
execmd.on('chat', (o) => {bot.chat(o)});
execmd.on('activate', () => {bot.activateItem()});
Expand Down
53 changes: 34 additions & 19 deletions BotWindow/proxymbotwin.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,55 +94,70 @@

<div class="flex">
<div class="form-control">
<label class="label cursor-pointer">
<span class="label-text">Anti AFK</span>
<label class="label">
<span class="label-text m-1">Anti AFK</span>
<input type="checkbox" class="toggle mx-1" id="afkToggle" />
</label>
</div>
<div class="form-control">
<label class="label cursor-pointer">
<span class="label-text">Auto Reconnect</span>
<label class="label">
<span class="label-text m-1">Auto Reconnect</span>
<input type="checkbox" class="toggle mx-1" id="btnrecon" />
</label>
</div>
</div>

<div class="flex">
<div class="flex btn btn-disabled">
<div class="form-control">
<label class="label cursor-pointer">
KillAura ⚔️
<label class="label text-xl">
KillAura
</label>
</div>
</div>
<div class="flex">

<div class="flex label">
<div class="form-control">
<label class="label cursor-pointer">
<span class="label-text">Attack Delay</span>
<input class="input input-sm input-bordered w-16" placeholder="ms" type="number" min="0" id="atkdel">
<span class="label-text p-1">Target Range</span>
<label class="label">
<span class="label-text mx-2">Attack Delay</span>
<input class="input input-sm input-bordered" style="width: 5pc;" placeholder="ms" type="number" min="0" id="atkdel">
</label>
</div>
<div class="form-control">
<label class="label">
<span class="label-text mx-2">Range</span>
<input class="input input-sm input-bordered w-16" placeholder="1" type="number" min="0" id="atkrng">
<span class="label-text">LockOn</span>
<input type="checkbox" class="toggle mx-1" id="lookLock" />
</label>
</div>
<div class="form-control">
<label class="label">
<span class="label-text mx-2">LockOn</span>
<input type="checkbox" class="toggle" id="lookLock" />
</label>
</div>
</div>

<div class="flex">
<div class="form-control">
<label class="label cursor-pointer">
<span class="label-text p-1">Look</span>
<label class="label">
<span class="label-text">Look</span>
<input type="checkbox" class="toggle mx-1" id="kaLook" />
</label>
</div>
<div class="form-control">
<label class="label">
<span class="label-text">Player</span>
<input type="checkbox" class="toggle mx-1" id="kaPlayer" />
</label>
</div>
<div class="form-control">
<label class="label">
<span class="label-text">Mobs</span>
<input type="checkbox" class="toggle mx-1" id="kaMobs" />
<span class="label-text">Animal</span>
<input type="checkbox" class="toggle mx-1" id="kaAnimal" />
</label>
</div>
</div>

<div class="btn-group p-4">
<div class="btn-group p-4 m-5 ">
<button class="btn btn-success btn-outline w-1/3" onclick="btnRc()">Reconnect</button>
<button class="btn btn-error btn-outline w-1/3" onclick="btnDc()">Disconnect</button>
<button class="btn btn-outline w-1/3" onclick="clearchat()">Clear Chat</button>
Expand Down
Loading

0 comments on commit ef47211

Please sign in to comment.