From 798ccde422d7248f4e98a1ef1da6d9709babcc21 Mon Sep 17 00:00:00 2001 From: Tai Dao Date: Sun, 6 Feb 2022 20:51:01 -0800 Subject: [PATCH] Added Ultimate Splinterlands Bot v2 --- splinterlands-bot-v2/Dockerfile | 27 ++++++++ splinterlands-bot-v2/README.md | 9 ++- splinterlands-bot-v2/config/accounts.txt | 2 + splinterlands-bot-v2/config/config.txt | 86 ++++++++++++++++++++++++ splinterlands-bot-v2/docker-compose.yml | 16 +++++ 5 files changed, 137 insertions(+), 3 deletions(-) create mode 100644 splinterlands-bot-v2/Dockerfile create mode 100644 splinterlands-bot-v2/config/accounts.txt create mode 100644 splinterlands-bot-v2/config/config.txt create mode 100644 splinterlands-bot-v2/docker-compose.yml diff --git a/splinterlands-bot-v2/Dockerfile b/splinterlands-bot-v2/Dockerfile new file mode 100644 index 0000000..2e80964 --- /dev/null +++ b/splinterlands-bot-v2/Dockerfile @@ -0,0 +1,27 @@ +FROM ubuntu:latest + +ARG BOT_VERSION="2.9-fix2" + +RUN apt-get update && apt-get install -y wget + +# Add dotnet runtime to repository +RUN wget https://packages.microsoft.com/config/ubuntu/21.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +RUN dpkg -i packages-microsoft-prod.deb +RUN rm packages-microsoft-prod.deb + +RUN apt-get update && apt-get install -y \ + apt-transport-https \ + dotnet-runtime-6.0 \ + unzip + +RUN wget https://github.com/PCJones/Ultimate-Splinterlands-Bot-V2/releases/download/v${BOT_VERSION}/linux-x64.zip + +RUN unzip linux-x64.zip || true + +RUN rm -f linux-x64.zip + +WORKDIR ./linux-x64 + +RUN mv Ultimate\ Splinterlands\ Bot\ V2 ultimatesplinterlandsbotv2 + +RUN chmod +x ultimatesplinterlandsbotv2 \ No newline at end of file diff --git a/splinterlands-bot-v2/README.md b/splinterlands-bot-v2/README.md index bc78ead..d1aa062 100644 --- a/splinterlands-bot-v2/README.md +++ b/splinterlands-bot-v2/README.md @@ -2,6 +2,12 @@ This is my implementation of the dockerized version of the bot! For some reason I can't get updates to work! Thank you PCJones for creating this bot! +After creating all the folders and files below with the modifications specified. + +Run `docker-compose up -d` to run the container! + +To check how the bot is doing live run `docker logs --follow splinterlands` otherwise to check the logs run `docker logs splinterlands` + ### Minimum File Structure ``` /home/ @@ -120,7 +126,6 @@ Check for latest version here [Ultimate Splinterlands Bot V2](https://github.com To update this image you would run docker-compose build in this folder if the version changed. ``` - FROM ubuntu:latest ARG BOT_VERSION="2.9-fix2" @@ -152,7 +157,6 @@ RUN chmod +x ultimatesplinterlandsbotv2 ### docker-compose.yml ``` - version: '3' services: @@ -169,6 +173,5 @@ networks: default: external: name: caddy_net - ``` diff --git a/splinterlands-bot-v2/config/accounts.txt b/splinterlands-bot-v2/config/accounts.txt new file mode 100644 index 0000000..8798508 --- /dev/null +++ b/splinterlands-bot-v2/config/accounts.txt @@ -0,0 +1,2 @@ +username:postingkey +username:postingkey \ No newline at end of file diff --git a/splinterlands-bot-v2/config/config.txt b/splinterlands-bot-v2/config/config.txt new file mode 100644 index 0000000..1dee67a --- /dev/null +++ b/splinterlands-bot-v2/config/config.txt @@ -0,0 +1,86 @@ +##################General Settings################## +PRIORITIZE_QUEST=true +SLEEP_BETWEEN_BATTLES=5 +START_BATTLE_ABOVE_ECR=0 +STOP_BATTLE_BELOW_ECR=75 +MINIMUM_BATTLE_POWER=0 +CLAIM_SEASON_REWARD=false +CLAIM_QUEST_REWARD=false + +##E.g. if you are almost bronze 1 and have enough power, it won't claim quest reward until you are bronze 1 +DONT_CLAIM_QUEST_NEAR_HIGHER_LEAGUE=true + +##If enabled it will click on the advance to next league button +ADVANCE_LEAGUE=true + +##seperate by comma like this: earth,life - it will request new quest on earth and life quest +##Remove the # at the beginning of the next line to activate +#REQUEST_NEW_QUEST=earth +##################General Settings################## + +##################Lightning Mode Settings################## +#####If you want to use the fast, low resource blockchain mode of the bot enable this##### +#####It has 90% less requests to splinterlands API then playing via browser, so you ##### +#####will not get soft banned from splinterlands anymore. ##### +USE_LIGHTNING_MODE=true + +##Threads = number of parallel accoounts. +##Threads are MUCH faster than in the browser mode +THREADS=1 + +##Disable this if you want a cleaner log or you have problems with too many +##requests to the splinterlands API. Disabling will also make battles 10-25 seconds faster. +SHOW_BATTLE_RESULTS=true +##################Lightning Mode Settings################## + +#######################API Settings######################## + +USE_API=true +API_URL=http://splinterlandsapi.pcjones.de:8080/ + +##PRIVATE API Settings - ignore if you don't have it +USE_PRIVATE_API=false +PRIVATE_API_URL= +PRIVATE_API_SHOP= +POWER_TRANSFER_BOT=false +#######################API Settings######################## + +#####################Advanced Settings##################### +AUTO_UPDATE=true +SHOW_API_RESPONSE=true +DEBUG=false +WRITE_LOG_TO_FILE=false + +##Enable this if you get weird characters in your console that makes it hard to read +DISABLE_CONSOLE_COLORS=false + +##Linux / VPS Variables - ignore if bot works +#CHROME_BINARY_PATH=path/to/chrome/binary +CHROME_NO_SANDBOX=true + +##Advanced bot logic + +#If you enable both DONT_CLAIM_QUEST_NEAR_HIGHER_LEAGUE and this the bot will not only wait +#until you have enough rating for the higher league, but also until you have enough +#power. Don't enable this unless you actively manage your power. +WAIT_FOR_MISSING_CP_AT_QUEST_CLAIM=false +#####################Advanced Settings##################### + + + + + + + + +###################Browser Mode Settings################### +#####If you want to use the old browser based version of the bot enable this##### +USE_BROWSER_MODE=false + +## HEADLESS true = invisible browser +HEADLESS=true + +##MAX_BROWSER_INSTANCES = MultiThreading! +##2 = 2 Browsers will open, so 2 accounts can fight at the same time +MAX_BROWSER_INSTANCES=2 +###################Browser Mode Settings################### \ No newline at end of file diff --git a/splinterlands-bot-v2/docker-compose.yml b/splinterlands-bot-v2/docker-compose.yml new file mode 100644 index 0000000..de61484 --- /dev/null +++ b/splinterlands-bot-v2/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3' + +services: + splinterlandsbotv2: + restart: unless-stopped + container_name: splinterlands + build: . + volumes: + - ./config:/linux-x64/config + command: "./ultimatesplinterlandsbotv2" +# fordebugging... command: "tail -f /dev/null" + +networks: + default: + external: + name: caddy_net \ No newline at end of file