Git Product home page Git Product logo

hypixel-fragbot's Introduction

hypixel-fragbot

Simple FragBot Library for Hypixel SkyBlock.

Put any suggestions in the Issues tab!

Requirements

  • node.js
  • npm
  • second minecraft account (can be alt)

Important

  • Your bot account should either not have dungeons unlocked or be in Limbo (AFK for long enough).
  • In the config.json file, you can set the username to whatever you like. This value is only used for sending webhook notifications and logging purposes.

Installation

To install the necessary modules for the fragbot, you need to run the install.bat file. This will initiate the installation process using npm, and you should wait until it finishes installing all the modules.

Configuration

To set up the fragbot, you need to open the config.json file and update the email and password. If you haven't moved your account to Microsoft, change "auth": "microsoft" to "auth":"mojang".

For the webhook field, put the link to your Discord webhook where you want the notifications to go. If you don't want to receive notifications via webhook, set webhook to null, without the quotation marks.

After you've made these changes, your config.json file should look something like this.

NOTE: As of version 1.1, blacklisted field was changed into whitelist and so changed its behavior. If it's empty (like in the example), the whitelist is turned off. If it has 1 or more items (example: "whitelist": ["player1","player2"]) it will be on.

{
    "username": "FragBot",
    "email": "[email protected]",
    "password": "P4$$w0rd",
    "auth": "microsoft",
    "webhook": "https://discord.com/api/webhooks/XXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "whitelist": []
}

Running

Now that everything is set up, run the bot using start.bat file
If for whatever reason the start file doesn't work for you, start the bot by running index.js

Examples

Simplest way to implement the FragBot

(As of version 1.1, will work if account was migrated to microsoft)

config.json:

{"email": "[email protected]","password": "exampleP4SSword"}

node.js:

new (require("./fragbot"))(require("./config.json"));

Custom Messages

const FragBot = require("./fragbot");
const config = require("./config.json");

let bot = new FragBot(config);
bot.setMessage("join", "Successfully connected to the server as %s")
bot.setMessage("end", "%s was kicked from the server")
/*
First argument can be:
- join, when fragbot joins the server
- end, when fragbot gets kicked
- invite, when fragbot gets invited to the party
- joined, when fragbot joins the party
- disband, when fragbot disbands the party (user didn't join the dungeons)
- dungeons, when user joins the dungeons
- disbanded, when user disbands the party
- limbo, when fragbot gets sent to the limbo
*/

Event Listeners

const FragBot = require("./fragbot");
const config = require("./config.json");

let bot = new FragBot(config);

bot.once("join",()=>{
    // FragBot joined the server
})

bot.once("end",()=>{
    // FragBot got kicked
})

bot.once("limbo",()=>{
    // FragBot was sent to the limbo
})

bot.on("queued",(username,position)=>{
    // username partied the fragbot
})

bot.on("dungeons",(username)=>{
    // username joined the dungeons
})

bot.on("disbanded",(username)=>{
    // username disbanded the party
    // to add him to the blacklist do
    // bot.config.blacklisted.push(username);
})

Custom Logger

const FragBot = require("./fragbot");
const config = require("./config.json");
let logs = [];
let bot = new FragBot(config);

function log(message)
{
    logs.push(message)
    console.log("["+new Date().toLocaleTimeString()+"] "+message)
}

bot.log = log

Discord.js v12 bot

const Discord = require('discord.js');
const client = new Discord.Client();
const FragBot = require("./fragbot");
const config = require("./config.json");
let fb = null;
client.on('message', msg => {
  if (msg.content === '.start') {
    if(fb != null) return;
    fb = new FragBot();
    msg.channel.send("FragBot has been started")
    fb.once("join",()=>{msg.channel.send(fb.username+" connected to hypixel")})
    fb.once("end",()=>{msg.channel.send(fb.username+" was kicked from hypixel");fb = null;})
    fb.once("limbo",()=>{msg.channel.send(fb.username+" was sent to limbo")});
    // cba to continue but you get the point
  }
});

client.login('token')

Modules used

minecraft-protocol
[email protected]

The fragbot was created for educational purposes. I do not take responsibility if for whatever reason your account got banned (which shouldn't happen, after the bot gets sent to limbo, it's safe)

Credits to ChatGPT for helping me enhance README.md

hypixel-fragbot's People

Contributors

nextu1337 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

112batman gusz1

hypixel-fragbot's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.