Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Webhook Integration from Pit Bot + Fixed numeration in README.md #18

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BedwarsAFKv2/liteconfig/common/macros/.macros.txt
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ script.warn.permissions.enabled=0

# KEY_EQUALS
Macro[13].Macro=$${stop(all)}$$
Macro[13].Macro=$${exec(botstopwebhook.txt,botstopwebhook)}$$

# KEY_UP
Macro[200].Macro=$${$$<bwstart.txt>}$$
Expand Down
6 changes: 6 additions & 0 deletions BedwarsAFKv2/liteconfig/common/macros/beddestroyedwebhook.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
wait(3000ms)
&message_json = "{\"content\":\"%&message%\"}"
&example_content = {"content": "","embeds": [{"title": "%PLAYER%","description": ":bed: Bed destroyed.", "color": 12109567, "footer": {"text": "sunsi autogrinder! - https://github.com/familiar/Bedwars-Bot"},"thumbnail": {"url": "https://visage.surgeplay.com/full/512/%PLAYER%"}}]}
setrequestheader("User-Agent","%UUID%")
setrequestheader("Content-Type","application/json")
&response[] = httppost(%@&webhook_url%,%&example_content%,#status)
6 changes: 6 additions & 0 deletions BedwarsAFKv2/liteconfig/common/macros/botstartwebhook.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
wait(3000ms)
&message_json = "{\"content\":\"%&message%\"}"
&example_content = {"content": "","embeds": [{"title": "%PLAYER%","description": ":unlock: Bot started!", "color": 12109567, "footer": {"text": "sunsi autogrinder! - https://github.com/familiar/Bedwars-Bot"},"thumbnail": {"url": "https://visage.surgeplay.com/full/512/%PLAYER%"}}]}
setrequestheader("User-Agent","%UUID%")
setrequestheader("Content-Type","application/json")
&response[] = httppost(%@&webhook_url%,%&example_content%,#status)
6 changes: 6 additions & 0 deletions BedwarsAFKv2/liteconfig/common/macros/botstopwebhook.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
wait(3000ms)
&message_json = "{\"content\":\"%&message%\"}"
&example_content = {"content": "","embeds": [{"title": "%PLAYER%","description": ":lock: Bot stopped", "color": 12109567, "footer": {"text": "sunsi autogrinder! - https://github.com/familiar/Bedwars-Bot"},"thumbnail": {"url": "https://visage.surgeplay.com/full/512/%PLAYER%"}}]}
setrequestheader("User-Agent","%UUID%")
setrequestheader("Content-Type","application/json")
&response[] = httppost(%@&webhook_url%,%&example_content%,#status)
6 changes: 6 additions & 0 deletions BedwarsAFKv2/liteconfig/common/macros/bridgestartwebhook.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
wait(3000ms)
&message_json = "{\"content\":\"%&message%\"}"
&example_content = {"content": "","embeds": [{"title": "%PLAYER%","description": ":bridge_at_night: Started bridging!", "color": 12109567, "footer": {"text": "sunsi autogrinder! - https://github.com/familiar/Bedwars-Bot"},"thumbnail": {"url": "https://visage.surgeplay.com/full/512/%PLAYER%"}}]}
setrequestheader("User-Agent","%UUID%")
setrequestheader("Content-Type","application/json")
&response[] = httppost(%@&webhook_url%,%&example_content%,#status)
6 changes: 6 additions & 0 deletions BedwarsAFKv2/liteconfig/common/macros/bridgestopwebhook.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
wait(3000ms)
&message_json = "{\"content\":\"%&message%\"}"
&example_content = {"content": "","embeds": [{"title": "%PLAYER%","description": ":bridge_at_night::x: Stopped bridging!", "color": 12109567, "footer": {"text": "sunsi autogrinder! - https://github.com/familiar/Bedwars-Bot"},"thumbnail": {"url": "https://visage.surgeplay.com/full/512/%PLAYER%"}}]}
setrequestheader("User-Agent","%UUID%")
setrequestheader("Content-Type","application/json")
&response[] = httppost(%@&webhook_url%,%&example_content%,#status)
2 changes: 2 additions & 0 deletions BedwarsAFKv2/liteconfig/common/macros/bwfirstrush.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ looks(%@#realyaw%,0,0.4);
wait(500ms)
if(%@#bridgemap% == 1)
log("&f[&cBW&f] This is a bridge map. Will bridge on this map.")
exec("bridgestartwebhook.txt","bridgestartwebhook")

//Once at gen, goes out to start bridging
keydown(right)
Expand Down Expand Up @@ -194,3 +195,4 @@ endif;

exec("bwrc.txt","bwrc")
exec("bwtimer.txt","bwtimer")
exec("bridgestopwebhook.txt","bridgestopwebhook")
1 change: 1 addition & 0 deletions BedwarsAFKv2/liteconfig/common/macros/bwstart.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ wait(1t)
log("")
wait(100t)

exec("botstartwebhook.txt","botstartwebhook")
exec("command.txt","command")
wait(25t)
3 changes: 3 additions & 0 deletions BedwarsAFKv2/liteconfig/common/macros/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// User Config //
// ---------------- //

//Put your Discord webhook url in between the quotes
@&webhook_url = "WEBHOOK_URL";

//Set the shop slot based on what your item is at
@#blocksslot = 19;
@#dreamdefenderslot = 23;
Expand Down
6 changes: 6 additions & 0 deletions BedwarsAFKv2/liteconfig/common/macros/deathwebhook.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
wait(3000ms)
&message_json = "{\"content\":\"%&message%\"}"
&example_content = {"content": "","embeds": [{"title": "%PLAYER%","description": ":skull: Bot died.", "color": 12109567, "footer": {"text": "sunsi autogrinder! - https://github.com/familiar/Bedwars-Bot"},"thumbnail": {"url": "https://visage.surgeplay.com/full/512/%PLAYER%"}}]}
setrequestheader("User-Agent","%UUID%")
setrequestheader("Content-Type","application/json")
&response[] = httppost(%@&webhook_url%,%&example_content%,#status)
6 changes: 6 additions & 0 deletions BedwarsAFKv2/liteconfig/common/macros/eliminatedwebhook.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
wait(3000ms)
&message_json = "{\"content\":\"%&message%\"}"
&example_content = {"content": "","embeds": [{"title": "%PLAYER%","description": ":x: Bot got eliminated.", "color": 12109567, "footer": {"text": "sunsi autogrinder! - https://github.com/familiar/Bedwars-Bot"},"thumbnail": {"url": "https://visage.surgeplay.com/full/512/%PLAYER%"}}]}
setrequestheader("User-Agent","%UUID%")
setrequestheader("Content-Type","application/json")
&response[] = httppost(%@&webhook_url%,%&example_content%,#status)
6 changes: 6 additions & 0 deletions BedwarsAFKv2/liteconfig/common/macros/gamejoinwebhook.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
wait(3000ms)
&message_json = "{\"content\":\"%&message%\"}"
&example_content = {"content": "","embeds": [{"title": "%PLAYER%","description": ":white_check_mark: Game joined!", "color": 12109567, "footer": {"text": "sunsi autogrinder! - https://github.com/familiar/Bedwars-Bot"},"thumbnail": {"url": "https://visage.surgeplay.com/full/512/%PLAYER%"}}]}
setrequestheader("User-Agent","%UUID%")
setrequestheader("Content-Type","application/json")
&response[] = httppost(%@&webhook_url%,%&example_content%,#status)
6 changes: 6 additions & 0 deletions BedwarsAFKv2/liteconfig/common/macros/gamewinwebhook.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
wait(3000ms)
&message_json = "{\"content\":\"%&message%\"}"
&example_content = {"content": "","embeds": [{"title": "%PLAYER%","description": ":white_check_mark: Game won!", "color": 12109567, "footer": {"text": "sunsi autogrinder! - https://github.com/familiar/Bedwars-Bot"},"thumbnail": {"url": "https://visage.surgeplay.com/full/512/%PLAYER%"}}]}
setrequestheader("User-Agent","%UUID%")
setrequestheader("Content-Type","application/json")
&response[] = httppost(%@&webhook_url%,%&example_content%,#status)
9 changes: 9 additions & 0 deletions BedwarsAFKv2/liteconfig/common/macros/onChat.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ ifcontains(%CHATCLEAN%,"You have respawned!")
keyup(sneak)
wait(1000ms)
exec("bwgotogen.txt","bwgotogen")
exec("deathwebhook.txt","deathwebhook")
endif

//Item purchase
Expand All @@ -131,6 +132,10 @@ ifcontains(%CHATCLEAN%,"You purchased Iron Sword")
log(%@#ironsword%)
endif

ifcontains(%CHATCLEAN%,"BED DESTRUCTION > Your bed")
exec("beddestroyedwebhook.txt","beddestroyedwebhook")
endif

// Other failsafes

ifcontains(%CHATCLEAN%,"You have been eliminated!")
Expand All @@ -155,6 +160,7 @@ ifcontains(%CHATCLEAN%,"You have been eliminated!")
stop(classicpvpbot)
wait(1000ms)
exec("Command.txt","Command")
exec("eliminatedwebhook.txt","eliminatedwebhook")
endif

ifcontains(%CHATCLEAN%,"Your bed was destroyed so you are a spectator!")
Expand Down Expand Up @@ -186,6 +192,7 @@ endif
ifcontains(%CHATCLEAN%,"tokens! (Win)")
wait(200ms)
exec("screenshot.txt","screenshot")
exec("gamewinwebhook.txt","gamewinwebhook")
endif

ifcontains(%CHATCLEAN%,"Reward Summary")
Expand Down Expand Up @@ -360,6 +367,7 @@ ifcontains(%CHATCLEAN%,"%@&yourign% has joined");
@#bridgemap = 1;
wait(100ms)
echo("/map")
exec("gamejoinwebhook.txt","gamejoinwebhook")
endif;

// Broken maps
Expand Down Expand Up @@ -675,6 +683,7 @@ ifcontains(%CHATCLEAN%,"Eliminate your opponents");
exec("classicaddons.txt","classicaddons")
exec("classichit.txt","classichit")
exec("classicmovement.txt","classicmovement")
exec("gamejoinwebhook.txt","gamejoinwebhook")
wait(1t)
stop;
endif;
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ A Bedwars Bot made for Hypixel, compatibility with Fours and Dreams modes. Has r
2. Open the "Dependencies" folder, and install forge 1.12.2 if not installed already. (Make sure you have the Minecraft launcher installed).
3. Once finished installing, run the liteloader 1.12.2 installer, and click the "Extend from:" dropdown. Click 1.12.2 Forge.
4. Copy the "liteconfig" and "mods" folders from "BedwarsAFK" (or BedwarsAFKv2 depending on the version you downloaded) into the ".minecraft" directory.
8. Open the Minecraft launcher. You should now have a profile in the Minecraft launcher called "release 1.12.2-LiteLoader1.12.2-1.12.2-forge..". In the top of the launcher, press on installations, then on that installation and you can run the game.
5. Open the Minecraft launcher. You should now have a profile in the Minecraft launcher called "release 1.12.2-LiteLoader1.12.2-1.12.2-forge..". In the top of the launcher, press on installations, then on that installation and you can run the game.

#### MultiMC / Prism Launcher
1. Begin by installing Forge 1.12.2 and LiteLoader. Navigate to "Add Instance," select version 1.12.2, choose Forge as the modloader, then confirm with "OK."
2. Once the installation is complete, select the instance and click "Edit." Proceed to click "Install Loader," choose LiteLoader, and confirm with "OK."
3. Thirdly, download and extract this repository.
6. Launch Prism Launcher. Select your instance and click "Folder." Then, double-click on ".minecraft" and copy the "liteconfig" and "mods" folders from "BedwarsAFK" (or BedwarsAFKv2 depending on the version you downloaded) into the ".minecraft" directory.
7. Finally, launch the game.
4. Launch Prism Launcher. Select your instance and click "Folder." Then, double-click on ".minecraft" and copy the "liteconfig" and "mods" folders from "BedwarsAFK" (or BedwarsAFKv2 depending on the version you downloaded) into the ".minecraft" directory.
5. Finally, launch the game.

### 5a. CONFIGURATION FOR V1
Open "start.txt", and replace the IGN in quotations with your IGN. Save this file.
Expand All @@ -48,9 +48,10 @@ Open "config.txt", and read through it. Replace the shop slots based on your own
![inventorysetup](https://github.com/familiar/Bedwars-Bot/assets/136278435/852b8003-5717-457b-bd15-8837511a3a27)

6. This is OPTIONAL, but you can also open "command.txt" and replace the Bedwars play command with the one you want to queue. If you set it to dreams, your FKDR will not be affected.
7. Open the Minecraft launcher. You should now have a profile in the Minecraft launcher called "release 1.12.2-LiteLoader1.12.2-1.12.2-forge..". In the top of the launcher, press on installations, then on that installation.
8. Press on "Browser" for the game directory, and select the "BedwarsAFK" (or BedwarsAFKv2 depending on the version you downloaded) folder, which is inside of the Bedwars-Bot-main folder.
9. Click save, and then run the game.
7. This is OPTIONAL, but you can also open "config.txt" and put your own discord webhook url at "WEBHOOK_URL". This will send information using a discord webhook to your discord server.
8. Open the Minecraft launcher. You should now have a profile in the Minecraft launcher called "release 1.12.2-LiteLoader1.12.2-1.12.2-forge..". In the top of the launcher, press on installations, then on that installation.
9. Press on "Browser" for the game directory, and select the "BedwarsAFK" (or BedwarsAFKv2 depending on the version you downloaded) folder, which is inside of the Bedwars-Bot-main folder.
10. Click save, and then run the game.

# In-game Setup:

Expand Down