From 7cd0e6fda271856fd41a82a02c8522e4a5047d88 Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 13:03:38 +0200 Subject: [PATCH 01/51] Update Dockerfile --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6b71a5c241..6be0650b87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,7 @@ -FROM python:2.7 +FROM python:2.7.12-alpine + +RUN apk update && apk upgrade && \ + apk add --no-cache git bash wget sed nano WORKDIR /usr/src/app VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] @@ -8,7 +11,7 @@ RUN echo $timezone > /etc/timezone \ && ln -sfn /usr/share/zoneinfo/$timezone /etc/localtime \ && dpkg-reconfigure -f noninteractive tzdata -RUN cd /tmp && wget "http://pgoapi.com/pgoencrypt.tar.gz" \ +RUN cd /tmp && wget http://pgoapi.com/pgoencrypt.tar.gz \ && tar zxvf pgoencrypt.tar.gz \ && cd pgoencrypt/src \ && make \ From b319bfa9c22fad1f9bbd9bae3fdde4dfeb630cff Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 13:08:12 +0200 Subject: [PATCH 02/51] Update Dockerfile --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6be0650b87..a5270827cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM python:2.7.12-alpine RUN apk update && apk upgrade && \ - apk add --no-cache git bash wget sed nano + apk add --no-cache build-base git bash wget sed nano WORKDIR /usr/src/app VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] @@ -26,4 +26,6 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . /usr/src/app +RUN apk del build-base + ENTRYPOINT ["python", "pokecli.py"] From 2bdc4280799d0edd052b958b7450f941f4559abf Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 13:10:17 +0200 Subject: [PATCH 03/51] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a5270827cc..330c4a7e7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:2.7.12-alpine +FROM python:2.7.12-slim RUN apk update && apk upgrade && \ apk add --no-cache build-base git bash wget sed nano From f198adb569b081a2c4cc5ef08a9a2ef1beab1005 Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 13:17:49 +0200 Subject: [PATCH 04/51] Update Dockerfile --- Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 330c4a7e7b..3f1f6d3c68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,5 @@ FROM python:2.7.12-slim -RUN apk update && apk upgrade && \ - apk add --no-cache build-base git bash wget sed nano - WORKDIR /usr/src/app VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] From 3fe5a506f5b48679a9a4a9d2d00d506f2c34c2be Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 13:24:18 +0200 Subject: [PATCH 05/51] Update Dockerfile --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3f1f6d3c68..2510860c87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM python:2.7.12-slim +FROM python:2.7.12-alpine + +RUN apk add --update --no-cache wget bash WORKDIR /usr/src/app VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] From 8ff150f63c64c08dd7747e9b0fd5cbada3a9a9da Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 13:26:01 +0200 Subject: [PATCH 06/51] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2510860c87..8a9a5e356e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:2.7.12-alpine -RUN apk add --update --no-cache wget bash +RUN apk add --update --no-cache wget bash tzdata WORKDIR /usr/src/app VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] From b16987db2d726e2fd386e19678f2c9d4eed38f0a Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 13:28:20 +0200 Subject: [PATCH 07/51] Update Dockerfile --- Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8a9a5e356e..6795d867ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,12 @@ FROM python:2.7.12-alpine -RUN apk add --update --no-cache wget bash tzdata +RUN apk add --update --no-cache wget bash WORKDIR /usr/src/app VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] ARG timezone=Etc/UTC -RUN echo $timezone > /etc/timezone \ - && ln -sfn /usr/share/zoneinfo/$timezone /etc/localtime \ - && dpkg-reconfigure -f noninteractive tzdata +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN cd /tmp && wget http://pgoapi.com/pgoencrypt.tar.gz \ && tar zxvf pgoencrypt.tar.gz \ @@ -25,6 +23,6 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . /usr/src/app -RUN apk del build-base +#RUN apk del build-base ENTRYPOINT ["python", "pokecli.py"] From ccfb448f43229d6fa62084984ab8fa0f962238ea Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 13:33:02 +0200 Subject: [PATCH 08/51] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6795d867ae..8e78f75a8e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:2.7.12-alpine -RUN apk add --update --no-cache wget bash +RUN apk add --update --no-cache build-base gcc abuild binutils binutils-doc gcc-doc wget bash WORKDIR /usr/src/app VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] @@ -23,6 +23,6 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . /usr/src/app -#RUN apk del build-base +RUN apk del build-base gcc abuild binutils binutils-doc gcc-doc ENTRYPOINT ["python", "pokecli.py"] From ce8dcf8baeb9383a2892680ebcbd1f6bf315b586 Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 13:35:21 +0200 Subject: [PATCH 09/51] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8e78f75a8e..406b384fda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:2.7.12-alpine -RUN apk add --update --no-cache build-base gcc abuild binutils binutils-doc gcc-doc wget bash +RUN apk add --update --no-cache build-base gcc abuild binutils binutils-doc gcc-doc wget git WORKDIR /usr/src/app VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] From dd3278c5e2645df7a0a6e76176bfa2eddaf078b8 Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 13:46:11 +0200 Subject: [PATCH 10/51] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 406b384fda..5f8e5af268 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:2.7.12-alpine -RUN apk add --update --no-cache build-base gcc abuild binutils binutils-doc gcc-doc wget git +RUN apk add --update --no-cache build-base gcc abuild binutils binutils-doc gcc-doc python-dev wget git WORKDIR /usr/src/app VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] From 77c9e4d71eb7529f307d2226fcea065b9b667da9 Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 13:54:12 +0200 Subject: [PATCH 11/51] Update Dockerfile --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5f8e5af268..12129d4f81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ FROM python:2.7.12-alpine -RUN apk add --update --no-cache build-base gcc abuild binutils binutils-doc gcc-doc python-dev wget git +RUN apk add --update --no-cache build-base gcc abuild binutils binutils-doc gcc-doc py-pip python-dev wget git\ + && pip install virtualenv \ + && rm -rf /var/cache/apk/* WORKDIR /usr/src/app VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] From 496898a55121b750051f8727c67afa6a61d6b89e Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 14:09:50 +0200 Subject: [PATCH 12/51] Update Dockerfile --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 12129d4f81..439a7cc2e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,6 @@ FROM python:2.7.12-alpine -RUN apk add --update --no-cache build-base gcc abuild binutils binutils-doc gcc-doc py-pip python-dev wget git\ - && pip install virtualenv \ +RUN apk add --update --no-cache alpine-sdk wget git\ && rm -rf /var/cache/apk/* WORKDIR /usr/src/app @@ -25,6 +24,6 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . /usr/src/app -RUN apk del build-base gcc abuild binutils binutils-doc gcc-doc +RUN apk del alpine-sdk ENTRYPOINT ["python", "pokecli.py"] From 84da2ce76a42aca14d204ea16984cbee90cd2860 Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 14:20:38 +0200 Subject: [PATCH 13/51] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 439a7cc2e1..8ac24a24a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,7 @@ RUN cd /tmp && wget http://pgoapi.com/pgoencrypt.tar.gz \ ENV LD_LIBRARY_PATH /usr/src/app COPY requirements.txt /usr/src/app/ +RUN ln -s /usr/include/locale.h /usr/include/xlocale.h RUN pip install --no-cache-dir -r requirements.txt COPY . /usr/src/app From bf51dcec1cb3f8346d451e68681baa2913e2974c Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 14:50:03 +0200 Subject: [PATCH 14/51] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8ac24a24a6..054a7c78ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,4 +27,4 @@ COPY . /usr/src/app RUN apk del alpine-sdk -ENTRYPOINT ["python", "pokecli.py"] +CMD ["sh", "run.sh"] From 2fb73cdf62d857cb2b8908807e283002de756019 Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 14:52:25 +0200 Subject: [PATCH 15/51] link to /config and /web for easier use --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 054a7c78ce..2e110071cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,5 +26,7 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . /usr/src/app RUN apk del alpine-sdk +#link the config and web for easyer use +RUN ln -s /usr/src/app/configs /config %% /usr/src/app/web /web CMD ["sh", "run.sh"] From 81f82169266650d91214f86dca57cdeb82005b4c Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 14:56:48 +0200 Subject: [PATCH 16/51] Update Dockerfile --- Dockerfile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2e110071cd..3706ab84b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,13 +9,14 @@ VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] ARG timezone=Etc/UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -RUN cd /tmp && wget http://pgoapi.com/pgoencrypt.tar.gz \ - && tar zxvf pgoencrypt.tar.gz \ - && cd pgoencrypt/src \ - && make \ - && cp libencrypt.so /usr/src/app/encrypt.so \ - && cd /tmp \ - && rm -rf /tmp/pgoencrypt* + +#RUN cd /tmp && wget http://pgoapi.com/pgoencrypt.tar.gz \ +# && tar zxvf pgoencrypt.tar.gz \ +# && cd pgoencrypt/src \ +# && make \ +# && cp libencrypt.so /usr/src/app/encrypt.so \ +# && cd /tmp \ +# && rm -rf /tmp/pgoencrypt* ENV LD_LIBRARY_PATH /usr/src/app @@ -24,9 +25,11 @@ RUN ln -s /usr/include/locale.h /usr/include/xlocale.h RUN pip install --no-cache-dir -r requirements.txt COPY . /usr/src/app - -RUN apk del alpine-sdk #link the config and web for easyer use RUN ln -s /usr/src/app/configs /config %% /usr/src/app/web /web +RUN cd /usr/src/app && sh setup.sh -i +RUN apk del alpine-sdk + + CMD ["sh", "run.sh"] From 8fa7e8e697f1f5b41d3dfebe535e38e1719f760c Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 14:59:04 +0200 Subject: [PATCH 17/51] Update Dockerfile --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3706ab84b8..9c82e0b076 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,6 @@ VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] ARG timezone=Etc/UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - #RUN cd /tmp && wget http://pgoapi.com/pgoencrypt.tar.gz \ # && tar zxvf pgoencrypt.tar.gz \ # && cd pgoencrypt/src \ @@ -20,16 +19,18 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ENV LD_LIBRARY_PATH /usr/src/app -COPY requirements.txt /usr/src/app/ +#COPY requirements.txt /usr/src/app/ RUN ln -s /usr/include/locale.h /usr/include/xlocale.h -RUN pip install --no-cache-dir -r requirements.txt +#RUN pip install --no-cache-dir -r requirements.txt COPY . /usr/src/app #link the config and web for easyer use RUN ln -s /usr/src/app/configs /config %% /usr/src/app/web /web +#setup the bot RUN cd /usr/src/app && sh setup.sh -i -RUN apk del alpine-sdk +#remove unused stuff +RUN apk del alpine-sdk CMD ["sh", "run.sh"] From de98ff98a622a7ce04c5b39cfdb8fe63dbe1174a Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 15:06:39 +0200 Subject: [PATCH 18/51] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9c82e0b076..3e026c0186 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ COPY . /usr/src/app RUN ln -s /usr/src/app/configs /config %% /usr/src/app/web /web #setup the bot -RUN cd /usr/src/app && sh setup.sh -i +RUN ./setup.sh -i #remove unused stuff RUN apk del alpine-sdk From 048e9d1ca71cd1e549026522a03fc56de4a91dcb Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 15:13:18 +0200 Subject: [PATCH 19/51] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3e026c0186..00fa436ba5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:2.7.12-alpine -RUN apk add --update --no-cache alpine-sdk wget git\ +RUN apk add --update --no-cache alpine-sdk bash wget git\ && rm -rf /var/cache/apk/* WORKDIR /usr/src/app From b6ac6bf25fb2ce78d29913297c30f84f4628637b Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 15:19:28 +0200 Subject: [PATCH 20/51] Update Dockerfile --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 00fa436ba5..3e57f1fb5f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,6 @@ FROM python:2.7.12-alpine -RUN apk add --update --no-cache alpine-sdk bash wget git\ - && rm -rf /var/cache/apk/* +RUN apk add --update --no-cache alpine-sdk bash wget git WORKDIR /usr/src/app VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] @@ -31,6 +30,7 @@ RUN ln -s /usr/src/app/configs /config %% /usr/src/app/web /web RUN ./setup.sh -i #remove unused stuff -RUN apk del alpine-sdk +RUN apk del alpine-sdk\ + && rm -rf /var/cache/apk/* CMD ["sh", "run.sh"] From 843c168d43ed126a0e4acadb356fcda1b43b4752 Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 15:58:23 +0200 Subject: [PATCH 21/51] fixed indendts --- docs/installation.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 36f34bfb88..4e91e31922 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,11 +1,11 @@ -#Install the bot +# Install the bot ## Table of Contents - [Linux or Mac Automatic Installation](#linuxmac) - [Windows Automatic Installation](#windows) - [Docker Automatic Installation](#docker) -#Linux/Mac +# Linux/Mac ### Requirements (click each one for install guide) - [Python 2.7.x](http://docs.python-guide.org/en/latest/starting/installation/) - [pip](https://pip.pypa.io/en/stable/installing/) @@ -28,12 +28,12 @@ for manual installation please refer to [here](https://github.com/nivong/PokemonGo-Bot/blob/dev/docs/manual_installation.md) -#Windows +# Windows We do recommend Windows users to use [Docker](#docker) this will work much easier and smoother (also saver) -##Requirements +## Requirements -###Easy Installation +### Easy Installation 1. Download [PokemonGo-Bot-Install.bat](https://github.com/PokemonGoF/PokemonGo-Bot/blob/master/windows_bat/PokemonGo-Bot-Install.bat) 2. Download `encrypt.so` and `encrypt.dll` or `encrypt_64.dll` to the same folder of the `PokemonGo-Bot-Install.bat`. 3. Run `PokemonGo-Bot-install.bat`. @@ -45,9 +45,9 @@ This will start the bot and the web interface. 3. Run `PokemonGo-Bot-Start.bat` This will check for an update and will start the bot afterwards. -#Docker +# Docker -###Easy installation +### Easy installation Start by downloading for your platform: - [Mac](https://www.docker.com/products/docker#/mac) - [Windows](https://www.docker.com/products/docker#/windows) @@ -81,7 +81,7 @@ docker run --name=bot1-pokegoweb --rm -it --volumes-from bot1-pokego -p 8000:800 ``` The OpenPoGoWeb will be served on `http://:8000` -###Remarks for Windows +### Remarks for Windows Even if the previous command are valid, you will not be able to visualize the web view under Windows. To visualize the web view, execute instead the following commands (*make sure you are in the root folder and that your docker images is built*): @@ -109,7 +109,7 @@ Then, with your containers running and your host address, you can access the web `http://:8000 (eg http://192.168.99.100:8000)` -####Errors +#### Errors - An error occurred trying to connect: @@ -124,7 +124,7 @@ docker-machine env default Make sure that the name of the image is correct. - ###Using Docker compose +### Using Docker compose if docker-compose [installed](https://docs.docker.com/compose/install/) you can alternatively run the PokemonGo-Bot ecosystem with one simple command: (by using the docker-compose.yml configuration in this repo) From c3bbf5b691b739582a5ad2ad8467e10a0b71f7d2 Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 16:42:02 +0200 Subject: [PATCH 22/51] Update Dockerfile From 659e7e0a2bd7b20b3d11044976be6694122826f7 Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 17:16:16 +0200 Subject: [PATCH 23/51] woops wrong way around --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3e57f1fb5f..b99fbf2265 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,8 @@ RUN ln -s /usr/include/locale.h /usr/include/xlocale.h COPY . /usr/src/app #link the config and web for easyer use -RUN ln -s /usr/src/app/configs /config %% /usr/src/app/web /web +RUN ln -s /configs /usr/src/app/ %% ln -s /web /usr/src/app/ + #setup the bot RUN ./setup.sh -i From 014d5a646e6bca00b4bcf99b72c19220451da8ab Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 17:19:47 +0200 Subject: [PATCH 24/51] Update Dockerfile --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b99fbf2265..fecf90adf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,8 +24,6 @@ RUN ln -s /usr/include/locale.h /usr/include/xlocale.h COPY . /usr/src/app #link the config and web for easyer use -RUN ln -s /configs /usr/src/app/ %% ln -s /web /usr/src/app/ - #setup the bot RUN ./setup.sh -i From 22ea68e596b6b75f58dcd7618eed739c1d18828c Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 17:44:06 +0200 Subject: [PATCH 25/51] cache clean up --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index fecf90adf0..c6002db15b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,7 @@ RUN ./setup.sh -i #remove unused stuff RUN apk del alpine-sdk\ + && apk cache clean\ && rm -rf /var/cache/apk/* CMD ["sh", "run.sh"] From 189e676ee63999a0490ad1643fc4c19689be4174 Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 21:46:16 +0200 Subject: [PATCH 26/51] reverted some stuff --- Dockerfile | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index c6002db15b..3c59714a9d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,29 +8,27 @@ VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] ARG timezone=Etc/UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -#RUN cd /tmp && wget http://pgoapi.com/pgoencrypt.tar.gz \ -# && tar zxvf pgoencrypt.tar.gz \ -# && cd pgoencrypt/src \ -# && make \ -# && cp libencrypt.so /usr/src/app/encrypt.so \ -# && cd /tmp \ -# && rm -rf /tmp/pgoencrypt* +#setup the bot +RUN cd /tmp && wget http://pgoapi.com/pgoencrypt.tar.gz \ + && tar zxvf pgoencrypt.tar.gz \ + && cd pgoencrypt/src \ + && make \ + && cp libencrypt.so /usr/src/app/encrypt.so \ + && cd /tmp \ + && rm -rf /tmp/pgoencrypt* ENV LD_LIBRARY_PATH /usr/src/app -#COPY requirements.txt /usr/src/app/ +COPY requirements.txt /usr/src/app/ RUN ln -s /usr/include/locale.h /usr/include/xlocale.h -#RUN pip install --no-cache-dir -r requirements.txt +RUN pip install --no-cache-dir -r requirements.txt COPY . /usr/src/app -#link the config and web for easyer use -#setup the bot -RUN ./setup.sh -i #remove unused stuff RUN apk del alpine-sdk\ && apk cache clean\ && rm -rf /var/cache/apk/* -CMD ["sh", "run.sh"] +ENTRYPOINT ["python", "pokecli.py"] From cda9b30f32528ad0b12cfa0322ff202636c5b0e6 Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 21:48:52 +0200 Subject: [PATCH 27/51] please my ocd hurts :) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f875ce65c9..b18ef9b5dd 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,9 @@ If you'd like to make your own changes, make sure you follow the pull request te - [x] Adjust delay between Pokemon capture & Transfer as per configuration - [x] Hatch eggs - [x] Incubate eggs +- [x] Crowd Sourced Map Prototype - [ ] [Standalone Desktop Application] (https://github.com/PokemonGoF/PokemonGo-Bot-Desktop) - [ ] Use candy -- [x] Crowd Sourced Map Prototype ## Gym Battles This bot takes a strong stance against automating gym battles. Botting gyms will have a negative effect on most players and thus the game as a whole. We will thus never accept contributions or changes containing code specific for gym battles. From c96ff3d103e522d387581c845152b75a19276500 Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 21:50:08 +0200 Subject: [PATCH 28/51] just keep it all in 1 file --- README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/README.md b/README.md index b18ef9b5dd..5d22e1c82c 100644 --- a/README.md +++ b/README.md @@ -68,14 +68,7 @@ If you do not want any data to be gathered, you can turn off this feature by set ## Help Needed on [Desktop Version](https://github.com/PokemonGoF/PokemonGo-Bot-Desktop) -## Credits -- [tejado](https://github.com/tejado) many thanks for the API -- [U6 Group](http://pgoapi.com) for the U6 -- [Mila432](https://github.com/Mila432/Pokemon_Go_API) for the login secrets -- [elliottcarlson](https://github.com/elliottcarlson) for the Google Auth PR -- [AeonLucid](https://github.com/AeonLucid/POGOProtos) for improved protos -- [AHAAAAAAA](https://github.com/AHAAAAAAA/PokemonGo-Map) for parts of the s2sphere stuff -- [breeze ro] for some of that map stuff +## [Credits](https://github.com/PokemonGoF/PokemonGo-Bot/blob/master/CONTRIBUTORS.md) [![Analytics](https://ga-beacon.appspot.com/UA-81468120-1/welcome-page-master)](https://github.com/igrigorik/ga-beacon) From a3bf84c72f39fa04edb65a465323920cdd00b489 Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 22:07:49 +0200 Subject: [PATCH 29/51] Update Dockerfile --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3c59714a9d..369e88b6c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,10 +25,8 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . /usr/src/app - #remove unused stuff RUN apk del alpine-sdk\ - && apk cache clean\ && rm -rf /var/cache/apk/* ENTRYPOINT ["python", "pokecli.py"] From ae6e43ef0e73e2ef167f0353b3f7f8bbff0390b9 Mon Sep 17 00:00:00 2001 From: nivong Date: Tue, 23 Aug 2016 22:34:03 +0200 Subject: [PATCH 30/51] Update Dockerfile --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 369e88b6c1..7fbfad522e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,9 @@ FROM python:2.7.12-alpine RUN apk add --update --no-cache alpine-sdk bash wget git +ADD https://github.com/PokemonGoF/PokemonGo-Bot/archive/dev.tar.gz . +RUN tar -zxvf dev.tar.gz && mv PokemonGo-Bot-dev /usr/src/app && rm dev.tar.gz + WORKDIR /usr/src/app VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] From c0c34cf6696e7330a52924458903dd1de14dd92a Mon Sep 17 00:00:00 2001 From: Ovidiu Ghinet Date: Tue, 23 Aug 2016 22:47:55 +0200 Subject: [PATCH 31/51] Fetch the repo directly from the github using ADD --- Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7fbfad522e..c679d6f13d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,12 +22,9 @@ RUN cd /tmp && wget http://pgoapi.com/pgoencrypt.tar.gz \ ENV LD_LIBRARY_PATH /usr/src/app -COPY requirements.txt /usr/src/app/ RUN ln -s /usr/include/locale.h /usr/include/xlocale.h RUN pip install --no-cache-dir -r requirements.txt -COPY . /usr/src/app - #remove unused stuff RUN apk del alpine-sdk\ && rm -rf /var/cache/apk/* From a8eb98b055f6295b69b383b4dd49821563bbb683 Mon Sep 17 00:00:00 2001 From: nivong Date: Wed, 24 Aug 2016 09:07:06 +0200 Subject: [PATCH 32/51] this should be better --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5d22e1c82c..ab6e8fb60f 100644 --- a/README.md +++ b/README.md @@ -67,8 +67,15 @@ If you do not want any data to be gathered, you can turn off this feature by set ## Help Needed on [Desktop Version](https://github.com/PokemonGoF/PokemonGo-Bot-Desktop) - -## [Credits](https://github.com/PokemonGoF/PokemonGo-Bot/blob/master/CONTRIBUTORS.md) +## Credits +- [tejado](https://github.com/tejado) many thanks for the API +- [U6 Group](http://pgoapi.com) for the U6 +- [Mila432](https://github.com/Mila432/Pokemon_Go_API) for the login secrets +- [elliottcarlson](https://github.com/elliottcarlson) for the Google Auth PR +- [AeonLucid](https://github.com/AeonLucid/POGOProtos) for improved protos +- [AHAAAAAAA](https://github.com/AHAAAAAAA/PokemonGo-Map) for parts of the s2sphere stuff + +## [Contributors](https://github.com/PokemonGoF/PokemonGo-Bot/blob/master/CONTRIBUTORS.md) [![Analytics](https://ga-beacon.appspot.com/UA-81468120-1/welcome-page-master)](https://github.com/igrigorik/ga-beacon) From ed18e69ae24dcbdf38b5924a113e1df7bb4cda62 Mon Sep 17 00:00:00 2001 From: nivong Date: Wed, 24 Aug 2016 09:07:54 +0200 Subject: [PATCH 33/51] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c679d6f13d..cea21e3929 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:2.7.12-alpine -RUN apk add --update --no-cache alpine-sdk bash wget git +RUN apk add --update --no-cache alpine-sdk wget git ADD https://github.com/PokemonGoF/PokemonGo-Bot/archive/dev.tar.gz . RUN tar -zxvf dev.tar.gz && mv PokemonGo-Bot-dev /usr/src/app && rm dev.tar.gz From 9b7f554d50f0fc7feb4a8e53a232821b1ac2486c Mon Sep 17 00:00:00 2001 From: Ovidiu Ghinet Date: Wed, 24 Aug 2016 09:27:42 +0200 Subject: [PATCH 34/51] we don't need wget we can use ADD url --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index cea21e3929..b16cabe5b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:2.7.12-alpine -RUN apk add --update --no-cache alpine-sdk wget git +RUN apk add --update --no-cache alpine-sdk git ADD https://github.com/PokemonGoF/PokemonGo-Bot/archive/dev.tar.gz . RUN tar -zxvf dev.tar.gz && mv PokemonGo-Bot-dev /usr/src/app && rm dev.tar.gz @@ -12,8 +12,8 @@ ARG timezone=Etc/UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone #setup the bot -RUN cd /tmp && wget http://pgoapi.com/pgoencrypt.tar.gz \ - && tar zxvf pgoencrypt.tar.gz \ +ADD http://pgoapi.com/pgoencrypt.tar.gz /tmp/ +RUN cd /tmp && tar zxvf pgoencrypt.tar.gz \ && cd pgoencrypt/src \ && make \ && cp libencrypt.so /usr/src/app/encrypt.so \ From 36e66ddd0b58748b07ed54d8ec5ad97d5777e211 Mon Sep 17 00:00:00 2001 From: Simba Zhang Date: Wed, 24 Aug 2016 00:47:24 -0700 Subject: [PATCH 35/51] Added social hunter, currently break the map thing, need configuration to fix it. --- .../cell_workers/move_to_map_pokemon.py | 45 +++++++++++++++++-- .../event_handlers/social_handler.py | 11 ++--- 2 files changed, 46 insertions(+), 10 deletions(-) diff --git a/pokemongo_bot/cell_workers/move_to_map_pokemon.py b/pokemongo_bot/cell_workers/move_to_map_pokemon.py index 02b11be795..d43353d351 100644 --- a/pokemongo_bot/cell_workers/move_to_map_pokemon.py +++ b/pokemongo_bot/cell_workers/move_to_map_pokemon.py @@ -101,7 +101,45 @@ def initialize(self): open(data_file) ) self.alt = uniform(self.bot.config.alt_min, self.bot.config.alt_max) + def get_pokemon_from_social(self): + if not self.bot.mqtt_pokemon_list or len(self.bot.mqtt_pokemon_list) <= 0: + return [] + + pokemon_list = [] + now = int(time.time()) + + for pokemon in self.bot.mqtt_pokemon_list: + pokemon['encounter_id'] = pokemon['encounter_id'] + pokemon['spawn_point_id'] = pokemon['spawn_point_id'] + pokemon['disappear_time'] = int(pokemon['expiration_timestamp_ms'] / 1000) + pokemon['name'] = self.pokemon_data[pokemon['pokemon_id'] - 1]['Name'] + pokemon['is_vip'] = pokemon['name'] in self.bot.config.vips + + if pokemon['name'] not in self.config['catch']: + continue + + if self.was_caught(pokemon): + continue + + pokemon['priority'] = self.config['catch'].get(pokemon['name'], 0) + + pokemon['dist'] = distance( + self.bot.position[0], + self.bot.position[1], + pokemon['latitude'], + pokemon['longitude'], + ) + + if pokemon['dist'] > self.config['max_distance'] and not self.config['snipe']: + continue + # pokemon not reachable with mean walking speed (by config) + mean_walk_speed = (self.bot.config.walk_max + self.bot.config.walk_min) / 2 + if pokemon['dist'] > ((pokemon['disappear_time'] - now) * mean_walk_speed) and not self.config['snipe']: + continue + pokemon_list.append(pokemon) + self.bot.mqtt_pokemon_list = [] + return pokemon_list def get_pokemon_from_map(self): try: req = requests.get('{}/{}?gyms=false&scanned=false'.format(self.config['address'], self.map_path)) @@ -251,8 +289,9 @@ def work(self): self.update_map_location() self.dump_caught_pokemon() - - pokemon_list = self.get_pokemon_from_map() + pokemon_list = self.get_pokemon_from_social() + #Temp works as it, need add more configuration + #pokemon_list = self.get_pokemon_from_map() pokemon_list.sort(key=lambda x: x['dist']) if self.config['mode'] == 'priority': pokemon_list.sort(key=lambda x: x['priority'], reverse=True) @@ -439,7 +478,7 @@ def _move_to_pokemon_througt_fort(self, fort, pokemon): self.emit_event( 'arrived_at_fort', formatted='Arrived at fort.' - ) + ) return walker_factory(self.walker, self.bot, diff --git a/pokemongo_bot/event_handlers/social_handler.py b/pokemongo_bot/event_handlers/social_handler.py index 22ab9dc5cd..b12486e23f 100644 --- a/pokemongo_bot/event_handlers/social_handler.py +++ b/pokemongo_bot/event_handlers/social_handler.py @@ -21,13 +21,10 @@ def __init__(self, bot, clientid=None): def mqtt_on_message(self, mqttc, obj, msg): #msg.topic+" "+str(msg.qos)+" "+str(msg.payload) pokemon = json.loads(msg.payload) - print pokemon - #if pokemon and 'encounter_id' in pokemon: - # matches = (x for x in self.bot.mqtt_pokemon_list if x.encounter_id is pokemon['encounter_id']) - # if matches and len(matches) > 0: - # print 'Match es' - # else: - # self.bot.mqtt_pokemon_list.append(pokemon) + if pokemon and 'encounter_id' in pokemon: + new_list = [x for x in self.bot.mqtt_pokemon_list if x['encounter_id'] is pokemon['encounter_id']] + if not (new_list and len(new_list) > 0): + self.bot.mqtt_pokemon_list.append(pokemon) #def mqtt_on_publish(self, mqttc, obj, mid): #print "mid: "+str(mid) #def mqtt_on_subscribe(self, mqttc, obj, mid, granted_qos): From 97dc99d9184b1fdc69e453e7f7dad284d22660f8 Mon Sep 17 00:00:00 2001 From: geminiyellow Date: Wed, 24 Aug 2016 17:41:17 +0900 Subject: [PATCH 36/51] style(map-chat): format console.log - chat: output to info - catchable: output to debug --- map-chat/javascript/main.js | 118 +++---- map-chat/javascript/map.js | 618 +++++++++++++++++++----------------- 2 files changed, 383 insertions(+), 353 deletions(-) diff --git a/map-chat/javascript/main.js b/map-chat/javascript/main.js index c708c81477..4211dcd1ea 100644 --- a/map-chat/javascript/main.js +++ b/map-chat/javascript/main.js @@ -10,32 +10,34 @@ function initialiseEventBus(){ window.client = mqtt.connect('ws://broker.pikabot.org'); // you add a ws:// url here client.subscribe("pgomapcatch/#"); - client.on("message", function(topic, payload) { - //alert([topic, payload].join(": ")); - console.log('Topic is '+topic) - + client.on("message", function (topic, payload) { //Materialize.toast(payload, 4000); - if(topic === 'pgomapcatch/chat'){ - console.log('Chatting event') - displayChatMessageOnMap(payload) + if (topic === 'pgomapcatch/chat') { + displayChatMessageOnMap(payload); Materialize.toast(payload, 5000); - } else { - - //@ro: let's grab the message and split that shit. (simple for now, maybe we could just parse the json instead) - var pLoadR = payload.toString(); - var pLoadR2 = pLoadR.split(","); - var olat = pLoadR2[0] - var olong = pLoadR2[1] - var sessid = pLoadR2[2] - var ico = pLoadR2[3] - var expir = pLoadR2[4] - var pokenick = pLoadR2[5] - var path = "./images/p/" - var icon = path+"0"+ico+".png" - var icostr = icon.toString(); - //console.log(icostr) + var msg = JSON.parse(payload); + console.info('[ CHAT]', '(' + msg.lat + ',' + msg.lng + '): ', msg.text); + } else { + //@ro: let's grab the message and split that shit. (simple for now, maybe we could just parse the json instead) + var pLoadR = payload.toString(); + var pLoadR2 = pLoadR.split(","); + var olat = pLoadR2[0] + var olong = pLoadR2[1] + var sessid = pLoadR2[2] + var ico = pLoadR2[3] + var expir = pLoadR2[4] + var pokenick = pLoadR2[5] + var path = "./images/p/" + var icon = path + "0" + ico + ".png" + var icostr = icon.toString(); displayMessageOnMap(payload, olat, olong, sessid, icostr, expir, pokenick); + + if (/^pgomapcatch\/all\/catchable/i.test(topic)) { + console.debug('[CATCHABLE]', pokenick, '(' + olat + ',' + olong + ')'); + } else { + console.debug(topic); + } } }); @@ -43,52 +45,52 @@ function initialiseEventBus(){ } function sendMessage(topic, input) { - if (input.val()) { - publish(topic, input.val()); - input.val(''); - } + if (input.val()) { + publish(topic, input.val()); + input.val(''); + } } function publish(address, message) { - if (window.client) { - var json = createMessage(message); - window.client.publish(address, JSON.stringify(json)); - console.log(json); - } + if (window.client) { + var json = createMessage(message); + window.client.publish(address, JSON.stringify(json)); + console.log(json); + } } -$( document ).ready(function() { - if(!Modernizr.websockets || !Modernizr.geolocation){ - Materialize.toast('Browser not supported :(', 10000); - } +$(document).ready(function () { + if (!Modernizr.websockets || !Modernizr.geolocation) { + Materialize.toast('Browser not supported :(', 10000); + } - $("#side-nav-button").sideNav(); + $("#side-nav-button").sideNav(); - var input = $("#input"); - input.keyup(function (e) { - if (e.keyCode == 13) { - sendMessage('pgomapcatch/chat', input); - } - }); - input.focus(); + var input = $("#input"); + input.keyup(function (e) { + if (e.keyCode == 13) { + sendMessage('pgomapcatch/chat', input); + } + }); + input.focus(); - $("#send-button").click(function(){ - sendMessage('pgomapcatch/chat', input); - }); + $("#send-button").click(function () { + sendMessage('pgomapcatch/chat', input); + }); - $("#notification_lever").change(function() { - advanced = !advanced; - Materialize.toast(advanced ? 'Notifications On' : 'Notifications Off', 3000); - }); + $("#notification_lever").change(function () { + advanced = !advanced; + Materialize.toast(advanced ? 'Notifications On' : 'Notifications Off', 3000); + }); - $("#accurate_location_lever").change(function() { - shareAccurateLocation = !shareAccurateLocation; - Materialize.toast(shareAccurateLocation ? 'Sharing Your Accurate Location' : 'Sharing Your Fuzzy Location', 3000); - }); + $("#accurate_location_lever").change(function () { + shareAccurateLocation = !shareAccurateLocation; + Materialize.toast(shareAccurateLocation ? 'Sharing Your Accurate Location' : 'Sharing Your Fuzzy Location', 3000); + }); - if (topic != "main"){ - Materialize.toast("Private chat map - "+topic, 5000); - } + if (topic != "main") { + Materialize.toast("Private chat map - " + topic, 5000); + } - Materialize.toast("New: Click a user dot to mute it!", 7000); + Materialize.toast("New: Click a user dot to mute it!", 7000); }); diff --git a/map-chat/javascript/map.js b/map-chat/javascript/map.js index f93eacc684..c0a68c039a 100644 --- a/map-chat/javascript/map.js +++ b/map-chat/javascript/map.js @@ -14,197 +14,224 @@ var defaultZoom = isLowResolution ? 2 : 3; var minZoom = isLowResolution ? 1 : 3; var locationOptions = { - enableHighAccuracy: true, - timeout: 10000, - maximumAge: 10000 + enableHighAccuracy: true, + timeout: 10000, + maximumAge: 10000 }; var entityMap = { - "&": "&", - "<": "<", - ">": ">", - '"': '"', - "#": "#", - "'": ''', - "/": '/', - "卐": 'I am a dick ', - "卍": 'I am a dick ' + "&": "&", + "<": "<", + ">": ">", + '"': '"', + "#": "#", + "'": ''', + "/": '/', + "卐": 'I am a dick ', + "卍": 'I am a dick ' }; function initialize() { - var defaultLatLng = new google.maps.LatLng(32.078043, 34.774177); // Add the coordinates - - markerImage = { - url: 'images/blue_marker.png', - scaledSize: new google.maps.Size(30, 30) - }; - - disabledMarkerImage = { - url: 'images/grey_marker.png', - scaledSize: new google.maps.Size(30, 30) - }; - - - var mapOptions = { - center: defaultLatLng, - zoom: defaultZoom, // The initial zoom level when your map loads (0-20) - minZoom: minZoom, // Minimum zoom level allowed (0-20) - maxZoom: 18, // Maximum soom level allowed (0-20) - zoomControl:false, // Set to true if using zoomControlOptions below, or false to remove all zoom controls. - mapTypeId: google.maps.MapTypeId.ROADMAP, // Set the type of Map - scrollwheel: true, // Enable Mouse Scroll zooming - styles: [{"featureType":"landscape","stylers":[{"hue":"#FFBB00"},{"saturation":43.400000000000006},{"lightness":37.599999999999994},{"gamma":1}]},{"featureType":"road.highway","stylers":[{"hue":"#FFC200"},{"saturation":-61.8},{"lightness":45.599999999999994},{"gamma":1}]},{"featureType":"road.arterial","stylers":[{"hue":"#FF0300"},{"saturation":-100},{"lightness":51.19999999999999},{"gamma":1}]},{"featureType":"road.local","stylers":[{"hue":"#FF0300"},{"saturation":-100},{"lightness":52},{"gamma":1}]},{"featureType":"water","stylers":[{"hue":"#0078FF"},{"saturation":-13.200000000000003},{"lightness":2.4000000000000057},{"gamma":1}]},{"featureType":"poi","stylers":[{"hue":"#00FF6A"},{"saturation":-1.0989010989011234},{"lightness":11.200000000000017},{"gamma":1}]}], - // All of the below are set to true by default, so simply remove if set to true: - panControl:false, // Set to false to disable - mapTypeControl:false, // Disable Map/Satellite switch - scaleControl:false, // Set to false to hide scale - streetViewControl:false, // Set to disable to hide street view - overviewMapControl:false, // Set to false to remove overview control - rotateControl:false // Set to false to disable rotate control - }; - var mapDiv = document.getElementById('map-canvas'); - map = new google.maps.Map(mapDiv, mapOptions); - - navigator.geolocation.getCurrentPosition(onFirstPosition, onPositionError, locationOptions); + var defaultLatLng = new google.maps.LatLng(32.078043, 34.774177); // Add the coordinates + + markerImage = { + url: 'images/blue_marker.png', + scaledSize: new google.maps.Size(30, 30) + }; + + disabledMarkerImage = { + url: 'images/grey_marker.png', + scaledSize: new google.maps.Size(30, 30) + }; + + + var mapOptions = { + center: defaultLatLng, + zoom: defaultZoom, // The initial zoom level when your map loads (0-20) + minZoom: minZoom, // Minimum zoom level allowed (0-20) + maxZoom: 18, // Maximum soom level allowed (0-20) + zoomControl: false, // Set to true if using zoomControlOptions below, or false to remove all zoom controls. + mapTypeId: google.maps.MapTypeId.ROADMAP, // Set the type of Map + scrollwheel: true, // Enable Mouse Scroll zooming + styles: [ + { + "featureType": "landscape", + "stylers": [{ "hue": "#FFBB00" }, { "saturation": 43.400000000000006 }, { "lightness": 37.599999999999994 }, { "gamma": 1 }] + }, + { + "featureType": "road.highway", + "stylers": [{ "hue": "#FFC200" }, { "saturation": -61.8 }, { "lightness": 45.599999999999994 }, { "gamma": 1 }] + }, + { + "featureType": "road.arterial", + "stylers": [{ "hue": "#FF0300" }, { "saturation": -100 }, { "lightness": 51.19999999999999 }, { "gamma": 1 }] + }, + { + "featureType": "road.local", + "stylers": [{ "hue": "#FF0300" }, { "saturation": -100 }, { "lightness": 52 }, { "gamma": 1 }] + }, + { + "featureType": "water", + "stylers": [{ "hue": "#0078FF" }, { "saturation": -13.200000000000003 }, { "lightness": 2.4000000000000057 }, { "gamma": 1 }] + }, + { + "featureType": "poi", + "stylers": [{ "hue": "#00FF6A" }, { "saturation": -1.0989010989011234 }, { "lightness": 11.200000000000017 }, { "gamma": 1 }] + } + ], + // All of the below are set to true by default, so simply remove if set to true: + panControl: false, // Set to false to disable + mapTypeControl: false, // Disable Map/Satellite switch + scaleControl: false, // Set to false to hide scale + streetViewControl: false, // Set to disable to hide street view + overviewMapControl: false, // Set to false to remove overview control + rotateControl: false // Set to false to disable rotate control + }; + var mapDiv = document.getElementById('map-canvas'); + map = new google.maps.Map(mapDiv, mapOptions); + + navigator.geolocation.getCurrentPosition(onFirstPosition, onPositionError, locationOptions); } -function onFirstPosition(position){ - setUserLocation(position.coords.latitude, position.coords.longitude); - initialiseEventBus(); - map.panTo(userLocation); +function onFirstPosition(position) { + setUserLocation(position.coords.latitude, position.coords.longitude); + initialiseEventBus(); + map.panTo(userLocation); } function onPositionUpdate(position) { - if (markersMap[mySessionId]) { //update user marker position - setUserLocation(position.coords.latitude, position.coords.longitude); - var userMarker = markersMap[mySessionId].marker; - userMarker.setPosition(shareAccurateLocation ? userLocation : fuzzyUserLocation); - } + if (markersMap[mySessionId]) { //update user marker position + setUserLocation(position.coords.latitude, position.coords.longitude); + var userMarker = markersMap[mySessionId].marker; + userMarker.setPosition(shareAccurateLocation ? userLocation : fuzzyUserLocation); + } } function onPositionError(err) { - // try fallback location provider ipinfo.io or generate random location - $.getJSON("http://ipinfo.io", onFallbackLocationProviderResponse, useRandomLocation); + // try fallback location provider ipinfo.io or generate random location + $.getJSON("http://ipinfo.io", onFallbackLocationProviderResponse, useRandomLocation); } -function onFallbackLocationProviderResponse(ipinfo){ - console.log("Found location ["+ipinfo.loc+"] by ipinfo.io"); - var latLong = ipinfo.loc.split(","); - onFirstPosition({ - "coords" : { - latitude : parseFloat(latLong[0]), - longitude : parseFloat(latLong[1]) - } - }); +function onFallbackLocationProviderResponse(ipinfo) { + console.log("Found location [" + ipinfo.loc + "] by ipinfo.io"); + var latLong = ipinfo.loc.split(","); + onFirstPosition({ + "coords": { + latitude: parseFloat(latLong[0]), + longitude: parseFloat(latLong[1]) + } + }); } function useRandomLocation(err) { - Materialize.toast('User location problem, using random location :P', 7000); - // These ranges cover only the center of the map - var lat = (90 * Math.random() - 22.5).toFixed(3); - var lng = (180 * Math.random() - 90).toFixed(3); - onFirstPosition({ - "coords" : { - latitude : parseFloat(lat), - longitude : parseFloat(lng) - } - }); + Materialize.toast('User location problem, using random location :P', 7000); + // These ranges cover only the center of the map + var lat = (90 * Math.random() - 22.5).toFixed(3); + var lng = (180 * Math.random() - 90).toFixed(3); + onFirstPosition({ + "coords": { + latitude: parseFloat(lat), + longitude: parseFloat(lng) + } + }); } -function setUserLocation(lat, lng){ - userLocation = new google.maps.LatLng(lat, lng); - fuzzyUserLocation = new google.maps.LatLng(Math.round(lat * 100) / 100, Math.round(lng * 100) / 100); +function setUserLocation(lat, lng) { + userLocation = new google.maps.LatLng(lat, lng); + fuzzyUserLocation = new google.maps.LatLng(Math.round(lat * 100) / 100, Math.round(lng * 100) / 100); } -function createMessage(text){ - return { - lat: shareAccurateLocation ? userLocation.lat() : fuzzyUserLocation.lat(), - lng: shareAccurateLocation ? userLocation.lng() : fuzzyUserLocation.lng(), - text: text - }; +function createMessage(text) { + return { + lat: shareAccurateLocation ? userLocation.lat() : fuzzyUserLocation.lat(), + lng: shareAccurateLocation ? userLocation.lng() : fuzzyUserLocation.lng(), + text: text + }; } -function displayChatMessageOnMap(raw){ - var msg = JSON.parse(raw) - //console.log(msg) - var newPosition = new google.maps.LatLng(msg.lat,msg.lng); - var msgSessionId = msg.sessionId; - - // xss prevention hack - msg.text = html_sanitize(msg.text); +function displayChatMessageOnMap(raw) { + var msg = JSON.parse(raw) + //console.log(msg) + var newPosition = new google.maps.LatLng(msg.lat, msg.lng); + var msgSessionId = msg.sessionId; + + // xss prevention hack + msg.text = html_sanitize(msg.text); + + msg.text = String(msg.text).replace(/[&<>"#'\/卐卍]/g, function (s) { + return entityMap[s]; + }); + + // msg.text = msg.text ? embedTweet(msg.text) : ""; + msg.text = msg.text.replace(/#(\S*)/g, '#$1'); + + // linkify + msg.text = msg.text.replace( + /(\b(https?|ftp|file)://[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, + "$1" + ); + + if (markersMap[msgSessionId]) { // update existing marker + var existingMarker = markersMap[msgSessionId].marker; + var existingInfoWindow = markersMap[msgSessionId].infoWindow; + var existingTimeoutId = markersMap[msgSessionId].timeoutId; + + existingMarker.setPosition(newPosition); + existingInfoWindow.setContent(msg.text); + existingInfoWindow.setZIndex(infoWindowZIndex); + infoWindowZIndex++; + if (msg.text && !markersMap[msgSessionId].disabled) { + if (existingTimeoutId) { + clearTimeout(existingTimeoutId); + } + markersMap[msgSessionId].timeoutId = + setTimeout(function () { existingInfoWindow.close() }, 10000); + existingInfoWindow.open(map, existingMarker); + } + } else { // new marker + var infoWindow = new google.maps.InfoWindow({ + content: msg.text, + maxWidth: 400, + disableAutoPan: true, + zIndex: infoWindowZIndex + }); + infoWindowZIndex++; + + var marker = new google.maps.Marker({ + position: newPosition, + map: map, + draggable: false, + icon: markerImage, + title: "Click to mute/un-mute User " + msgSessionId + }); - msg.text = String(msg.text).replace(/[&<>"#'\/卐卍]/g, function (s) { - return entityMap[s]; + marker.addListener('click', function () { + if (markersMap[msgSessionId].disabled) { + markersMap[msgSessionId].disabled = false; + marker.setIcon(markerImage); + } else { + markersMap[msgSessionId].disabled = true; + marker.setIcon(disabledMarkerImage); + infoWindow.close(); + } }); -// msg.text = msg.text ? embedTweet(msg.text) : ""; - msg.text = msg.text.replace(/#(\S*)/g,'#$1'); - - // linkify - msg.text = msg.text.replace(/(\b(https?|ftp|file)://[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, - "$1"); - - if(markersMap[msgSessionId]){ // update existing marker - var existingMarker = markersMap[msgSessionId].marker; - var existingInfoWindow = markersMap[msgSessionId].infoWindow; - var existingTimeoutId = markersMap[msgSessionId].timeoutId; - - existingMarker.setPosition(newPosition); - existingInfoWindow.setContent(msg.text); - existingInfoWindow.setZIndex(infoWindowZIndex); - infoWindowZIndex++; - if (msg.text && !markersMap[msgSessionId].disabled) { - if (existingTimeoutId){ - clearTimeout(existingTimeoutId); - } - markersMap[msgSessionId].timeoutId = - setTimeout(function() { existingInfoWindow.close() }, 10000); - existingInfoWindow.open(map, existingMarker); - } - } else { // new marker - var infoWindow = new google.maps.InfoWindow({ - content: msg.text, - maxWidth: 400, - disableAutoPan: true, - zIndex: infoWindowZIndex - }); - infoWindowZIndex++; - - var marker = new google.maps.Marker({ - position: newPosition, - map: map, - draggable: false, - icon: markerImage, - title: "Click to mute/un-mute User "+msgSessionId - }); - - marker.addListener('click',function() { - if (markersMap[msgSessionId].disabled) { - markersMap[msgSessionId].disabled = false; - marker.setIcon(markerImage); - } else{ - markersMap[msgSessionId].disabled = true; - marker.setIcon(disabledMarkerImage); - infoWindow.close(); - } - }); - - if (msg.text) { - infoWindow.open(map, marker); - } - - var timeoutId = setTimeout(function() { infoWindow.close() }, 10000); - markersMap[msgSessionId] = { - marker: marker, - infoWindow: infoWindow, - timeoutId: timeoutId, - disabled: false - } + if (msg.text) { + infoWindow.open(map, marker); } - if (advanced){ - runAdvancedOptions(msg); + var timeoutId = setTimeout(function () { infoWindow.close() }, 10000); + markersMap[msgSessionId] = { + marker: marker, + infoWindow: infoWindow, + timeoutId: timeoutId, + disabled: false } + } + + if (advanced) { + runAdvancedOptions(msg); + } } // @ro: to calculate time until expiration @@ -218,160 +245,161 @@ function timeUntil(now, then) { return diff; } - -function displayMessageOnMap(msg, olat, olong, sessid, icostr, expir, pokenick){ - - // @ro: passing values split from incoming payload into two variables for now (lat and long) - var newPosition = new google.maps.LatLng(olat, olong); - var msgSessionId = sessid; - var expiration = expir; - var thetime = "155564565475" - var pName = pokenick/* + " disappears in " + timeUntil(thetime,expiration)*/; - console.log(pName) - // @ro: just checking the output - //console.log(olat); - //console.log(olong); - - // xss prevention hack - msg.text = html_sanitize(msg.text); - - msg.text = String(msg.text).replace(/[&<>"#'\/卐卍]/g, function (s) { - return entityMap[s]; + +function displayMessageOnMap(msg, olat, olong, sessid, icostr, expir, pokenick) { + // @ro: passing values split from incoming payload into two variables for now (lat and long) + var newPosition = new google.maps.LatLng(olat, olong); + var msgSessionId = sessid; + var expiration = expir; + var thetime = "155564565475" + var pName = pokenick/* + " disappears in " + timeUntil(thetime,expiration)*/; + // console.log(pName); + // @ro: just checking the output + //console.log(olat); + //console.log(olong); + + // xss prevention hack + msg.text = html_sanitize(msg.text); + + msg.text = String(msg.text).replace(/[&<>"#'\/卐卍]/g, function (s) { + return entityMap[s]; + }); + + // msg.text = msg.text ? embedTweet(msg.text) : ""; + msg.text = msg.text.replace(/#(\S*)/g, '#$1'); + + // linkify + msg.text = msg.text.replace( + /(\b(https?|ftp|file)://[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, + "$1" + ); + + if (markersMap[msgSessionId]) { // update existing marker + var infoWindow = new google.maps.InfoWindow({ + content: pName, + maxWidth: 400, + disableAutoPan: true, + zIndex: infoWindowZIndex }); + infoWindowZIndex++; + + var marker = new google.maps.Marker({ + position: newPosition, + map: map, + draggable: false, + icon: icostr, + icon: { url: icostr, scaledSize: new google.maps.Size(60, 60) }, + title: "Click to mute/un-mute User " + msgSessionId + }); + + marker.addListener('click', function () { + if (markersMap[msgSessionId].disabled) { + markersMap[msgSessionId].disabled = false; + marker.setIcon(icostr); + } else { + markersMap[msgSessionId].disabled = true; + marker.setIcon(disabledMarkerImage); + infoWindow.close(); + } + }); + } else { // new marker + var infoWindow = new google.maps.InfoWindow({ + content: pName, + maxWidth: 400, + disableAutoPan: true, + zIndex: infoWindowZIndex + }); + infoWindowZIndex++; + + var marker = new google.maps.Marker({ + position: newPosition, + map: map, + draggable: false, + icon: { url: icostr, scaledSize: new google.maps.Size(60, 60) }, + title: "Click to mute/un-mute User " + msgSessionId + }); + + marker.addListener('click', function () { + if (markersMap[msgSessionId].disabled) { + markersMap[msgSessionId].disabled = false; + marker.setIcon(icostr); + } else { + markersMap[msgSessionId].disabled = true; + marker.setIcon(icostr); + infoWindow.close(); + } + }); + + if (msg.text) { + infoWindow.open(map, marker); - // msg.text = msg.text ? embedTweet(msg.text) : ""; - msg.text = msg.text.replace(/#(\S*)/g,'#$1'); - - // linkify - msg.text = msg.text.replace(/(\b(https?|ftp|file)://[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, - "$1"); - - if(markersMap[msgSessionId]){ // update existing marker - var infoWindow = new google.maps.InfoWindow({ - content: pName, - maxWidth: 400, - disableAutoPan: true, - zIndex: infoWindowZIndex - }); - infoWindowZIndex++; - - var marker = new google.maps.Marker({ - position: newPosition, - map: map, - draggable: false, - icon: icostr, - icon: { url: icostr, scaledSize: new google.maps.Size(60,60) }, - title: "Click to mute/un-mute User "+msgSessionId - }); - - marker.addListener('click',function() { - if (markersMap[msgSessionId].disabled) { - markersMap[msgSessionId].disabled = false; - marker.setIcon(icostr); - } else{ - markersMap[msgSessionId].disabled = true; - marker.setIcon(disabledMarkerImage); - infoWindow.close(); - } - }); - } else { // new marker - var infoWindow = new google.maps.InfoWindow({ - content: pName, - maxWidth: 400, - disableAutoPan: true, - zIndex: infoWindowZIndex - }); - infoWindowZIndex++; - - var marker = new google.maps.Marker({ - position: newPosition, - map: map, - draggable: false, - icon: { url: icostr, scaledSize: new google.maps.Size(60,60) }, - title: "Click to mute/un-mute User "+msgSessionId - }); - - marker.addListener('click',function() { - if (markersMap[msgSessionId].disabled) { - markersMap[msgSessionId].disabled = false; - marker.setIcon(icostr); - } else{ - markersMap[msgSessionId].disabled = true; - marker.setIcon(icostr); - infoWindow.close(); - } - }); - - if (msg.text) { - infoWindow.open(map, marker); - - } - - var timeoutId = setTimeout(function() { infoWindow.close() }, 10000); - markersMap[msgSessionId] = { - marker: marker, - infoWindow: infoWindow, - timeoutId: timeoutId, - disabled: false - } } - if (advanced){ - runAdvancedOptions(msg); + var timeoutId = setTimeout(function () { infoWindow.close() }, 10000); + markersMap[msgSessionId] = { + marker: marker, + infoWindow: infoWindow, + timeoutId: timeoutId, + disabled: false } + } + + if (advanced) { + runAdvancedOptions(msg); + } } function embedTweet(text) { - var tweetText = "Someone wrote " + text + " on "; - var tweetUrl = "https:\/\/twitter.com\/share?url=http://maps.pikabot.org/&text=" + tweetText; - var width = 500, height = 300; - var left = (screen.width / 2) - (width / 2); - var top = (screen.height / 2) - (height / 2); - return " " + - " <\/a> " + text; + var tweetText = "Someone wrote " + text + " on "; + var tweetUrl = "https:\/\/twitter.com\/share?url=http://maps.pikabot.org/&text=" + tweetText; + var width = 500, height = 300; + var left = (screen.width / 2) - (width / 2); + var top = (screen.height / 2) - (height / 2); + return " " + + " <\/a> " + text; } -function clearMessageFromMap(){ - for (var markerSessionId in markersMap) { - if (markersMap.hasOwnProperty(markerSessionId)) { - markersMap[markerSessionId].infoWindow.close(); - } +function clearMessageFromMap() { + for (var markerSessionId in markersMap) { + if (markersMap.hasOwnProperty(markerSessionId)) { + markersMap[markerSessionId].infoWindow.close(); } + } } -function changeZoom(factor){ - map.setZoom(map.getZoom() + factor); +function changeZoom(factor) { + map.setZoom(map.getZoom() + factor); } -function runAdvancedOptions(msg){ - if (msg.sessionId == mySessionId){ - return; - } +function runAdvancedOptions(msg) { + if (msg.sessionId == mySessionId) { + return; + } - if (Notification.permission !== "granted"){ - Notification.requestPermission(); - } + if (Notification.permission !== "granted") { + Notification.requestPermission(); + } - new Notification('Incoming MapChat', { - icon: 'favicons/apple-touch-icon-120x120.png', - body: msg.text ? "Incoming message: "+msg.text : "New user" - }); + new Notification('Incoming MapChat', { + icon: 'favicons/apple-touch-icon-120x120.png', + body: msg.text ? "Incoming message: " + msg.text : "New user" + }); } // This should be displayed when the app is opened from a mobile facebook app WebView (Until a better solution is found) if (window.navigator.userAgent.indexOf("FBAV") > 0) { - document.write( - "
" + - "
" + - "
" + - "This page will not work inside the facebook app, " + - "please open it in the native browser." + - "
" + - "
" + - "
" - ); -} else { - google.maps.event.addDomListener(window, 'load', initialize); + document.write( + "
" + + "
" + + "
" + + "This page will not work inside the facebook app, " + + "please open it in the native browser." + + "
" + + "
" + + "
" + ); +} else { + google.maps.event.addDomListener(window, 'load', initialize); } From 215832021111bd08038b337487b09d68e73787ce Mon Sep 17 00:00:00 2001 From: Ovidiu Ghinet Date: Wed, 24 Aug 2016 11:09:30 +0200 Subject: [PATCH 37/51] added logic to support both master and dev branch or different fork --- Dockerfile | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b16cabe5b7..e8db59f029 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,30 @@ +# To build a docker container for the "master" branch (this is the default) execute: +# +# docker build --build-arg BUILD_BRANCH=master . +# (or) +# docker build . +# +# To build a docker container for the "dev" branch execute: +# +# docker build --build-arg BUILD_BRANCH=dev . +# +# You can also build from different fork and ispecify a particular commit as the branch +# +# docker build --build-arg BUILD_REPO=YourFork/PokemonGo-Bot --build-arg BUILD_BRANCH=6a4580f . + + FROM python:2.7.12-alpine RUN apk add --update --no-cache alpine-sdk git -ADD https://github.com/PokemonGoF/PokemonGo-Bot/archive/dev.tar.gz . -RUN tar -zxvf dev.tar.gz && mv PokemonGo-Bot-dev /usr/src/app && rm dev.tar.gz +ARG BUILD_BRANCH +ENV BUILD_BRANCH ${BUILD_BRANCH:-master} + +ARG BUILD_REPO +ENV BUILD_REPO ${BUILD_REPO:-PokemonGoF/PokemonGo-Bot} + +ADD https://github.com/$BUILD_REPO/archive/$BUILD_BRANCH.tar.gz . +RUN tar -zxvf $BUILD_BRANCH.tar.gz && mv PokemonGo-Bot-* /usr/src/app && rm $BUILD_BRANCH.tar.gz WORKDIR /usr/src/app VOLUME ["/usr/src/app/configs", "/usr/src/app/web"] @@ -30,3 +51,9 @@ RUN apk del alpine-sdk\ && rm -rf /var/cache/apk/* ENTRYPOINT ["python", "pokecli.py"] + +#remove unused stuff +RUN apk del alpine-sdk\ + && rm -rf /var/cache/apk/* + +ENTRYPOINT ["python", "pokecli.py"] From 015f3a8c8bdaf813df7209ac9e1ff263b13a4197 Mon Sep 17 00:00:00 2001 From: Ovidiu Ghinet Date: Wed, 24 Aug 2016 11:13:48 +0200 Subject: [PATCH 38/51] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e8db59f029..fb7c58f0c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ # # docker build --build-arg BUILD_BRANCH=dev . # -# You can also build from different fork and ispecify a particular commit as the branch +# You can also build from different fork and specify a particular commit as the branch # # docker build --build-arg BUILD_REPO=YourFork/PokemonGo-Bot --build-arg BUILD_BRANCH=6a4580f . From 74e67ed4ec0726eda25c84ae9386c1430cfe768b Mon Sep 17 00:00:00 2001 From: Ovidiu Ghinet Date: Wed, 24 Aug 2016 11:41:15 +0200 Subject: [PATCH 39/51] Added label so we can ask check what version was a container build with --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index fb7c58f0c1..ba7c778caa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,6 +23,8 @@ ENV BUILD_BRANCH ${BUILD_BRANCH:-master} ARG BUILD_REPO ENV BUILD_REPO ${BUILD_REPO:-PokemonGoF/PokemonGo-Bot} +LABEL build_repo=$BUILD_REPO build_branch=$BUILD_BRANCH + ADD https://github.com/$BUILD_REPO/archive/$BUILD_BRANCH.tar.gz . RUN tar -zxvf $BUILD_BRANCH.tar.gz && mv PokemonGo-Bot-* /usr/src/app && rm $BUILD_BRANCH.tar.gz From 691037348b7d40649f8c507e73a12334854b5526 Mon Sep 17 00:00:00 2001 From: nivong Date: Wed, 24 Aug 2016 13:30:12 +0200 Subject: [PATCH 40/51] Update Dockerfile --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ba7c778caa..92a49ce49b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,6 @@ # # docker build --build-arg BUILD_REPO=YourFork/PokemonGo-Bot --build-arg BUILD_BRANCH=6a4580f . - FROM python:2.7.12-alpine RUN apk add --update --no-cache alpine-sdk git @@ -55,7 +54,7 @@ RUN apk del alpine-sdk\ ENTRYPOINT ["python", "pokecli.py"] #remove unused stuff -RUN apk del alpine-sdk\ +RUN apk del alpine-sdk \ && rm -rf /var/cache/apk/* ENTRYPOINT ["python", "pokecli.py"] From f9f6a3b7a3f5a524559b3ea39a5233725a428e1c Mon Sep 17 00:00:00 2001 From: Dmitry Ovodov Date: Wed, 24 Aug 2016 13:31:08 +0300 Subject: [PATCH 41/51] Added RandomAlivePause task --- pokemongo_bot/__init__.py | 16 +++ pokemongo_bot/cell_workers/__init__.py | 1 + .../cell_workers/random_alive_pause.py | 133 ++++++++++++++++++ 3 files changed, 150 insertions(+) create mode 100644 pokemongo_bot/cell_workers/random_alive_pause.py diff --git a/pokemongo_bot/__init__.py b/pokemongo_bot/__init__.py index 7f0047eedd..345ac03057 100644 --- a/pokemongo_bot/__init__.py +++ b/pokemongo_bot/__init__.py @@ -221,6 +221,22 @@ def _register_events(self): ) ) + # random alive pause + self.event_manager.register_event( + 'next_random_alive_pause', + parameters=( + 'time', + 'duration' + ) + ) + self.event_manager.register_event( + 'bot_random_alive_pause', + parameters=( + 'time_hms', + 'resume' + ) + ) + # fort stuff self.event_manager.register_event( 'spun_fort', diff --git a/pokemongo_bot/cell_workers/__init__.py b/pokemongo_bot/cell_workers/__init__.py index 088e11dccd..5e748b9ae6 100644 --- a/pokemongo_bot/cell_workers/__init__.py +++ b/pokemongo_bot/cell_workers/__init__.py @@ -21,3 +21,4 @@ from catch_pokemon import CatchPokemon from complete_tutorial import CompleteTutorial from random_pause import RandomPause +from random_alive_pause import RandomAlivePause diff --git a/pokemongo_bot/cell_workers/random_alive_pause.py b/pokemongo_bot/cell_workers/random_alive_pause.py new file mode 100644 index 0000000000..35dfd0ee53 --- /dev/null +++ b/pokemongo_bot/cell_workers/random_alive_pause.py @@ -0,0 +1,133 @@ +from datetime import datetime as dt, timedelta +from time import sleep +from random import uniform +from pokemongo_bot.base_task import BaseTask +from pokemongo_bot.worker_result import WorkerResult + +class RandomAlivePause(BaseTask): + """Drops the execution of following bot tasks + This task must be placed at beginning of the task list + + Simulates the user doing "something random" for some time leaving app launched + Example Config: + { + "type": "RandomAlivePause", + "config": { + "min_duration": "00:00:10", + "max_duration": "00:10:00", + "min_interval": "00:05:00", + "max_interval": "01:30:00" + } + } + + Inspired from RandomPause. + """ + SUPPORTED_TASK_API_VERSION = 1 + + def initialize(self): + self._sleep_to_go = 0 + self._last_call = None + self._process_config() + self._schedule_next_pause() + + def work(self): + if self._should_pause_now(): + if not self._sleep(): + sleep(1) + return WorkerResult.RUNNING + self._schedule_next_pause() + + + def getSeconds(self, strTime): + ''' + Return the duration in seconds of a time string + :param strTime: string time of format %H:%M:%S + ''' + try: + x = dt.strptime(strTime, '%H:%M:%S') + seconds = int(timedelta(hours=x.hour,minutes=x.minute,seconds=x.second).total_seconds()) + except ValueError: + seconds = 0; + + if seconds < 0: + seconds = 0; + + return seconds + + def _process_config(self): + self.minDuration = self.getSeconds(self.config.get('min_duration', '00:00:10')) + self.maxDuration = self.getSeconds(self.config.get('max_duration', '00:10:00')) + self.minInterval = self.getSeconds(self.config.get('min_interval', '00:10:00')) + self.maxInterval = self.getSeconds(self.config.get('max_interval', '01:10:00')) + + if self.minDuration > self.maxDuration: + raise ValueError('random pause min_duration is bigger than random pause max_duration') #TODO there must be a more elegant way to do it... + if self.minInterval > self.maxInterval: + raise ValueError('random pause min_interval is bigger than random pause max_interval') #TODO there must be a more elegant way to do it... + + def _schedule_next_pause(self): + ''' + Schedule the time and the duration of the next pause. + ''' + self._next_pause = self._get_next_pause_schedule() + self._next_duration = self._get_next_duration() + self.emit_event( + 'next_random_alive_pause', + formatted="Next random alive pause at {time}, for a duration of {duration}", + data={ + 'time': str(self._next_pause.strftime("%H:%M:%S")), + 'duration': str(timedelta(seconds=self._next_duration)) + } + ) + + def _should_pause_now(self): + if dt.now() >= (self._next_pause + timedelta(seconds=self._next_duration) + timedelta(seconds=1)): + self._schedule_next_pause() + return False + if dt.now() >= self._next_pause: + return True + + return False + + def _get_next_pause_schedule(self): + now = dt.now() + next_time = now + timedelta(seconds=int(uniform(self.minInterval, self.maxInterval))) + + # If pause time is passed add one day + if next_time <= now: + next_time += timedelta(days=1) + + return next_time + + def _get_next_duration(self): + duration = int(uniform(self.minDuration, self.maxDuration)) + return duration + + def _sleep(self): + now = dt.now() + + if self._sleep_to_go <= 0: + self._sleep_to_go = self._next_duration + + sleep_m, sleep_s = divmod(self._sleep_to_go, 60) + sleep_h, sleep_m = divmod(sleep_m, 60) + sleep_hms = '%02d:%02d:%02d' % (sleep_h, sleep_m, sleep_s) + + resume = now + timedelta(seconds=self._sleep_to_go) + + self.emit_event( + 'bot_random_alive_pause', + formatted="Taking a random break keeping bot alive for {time_hms}, will resume at {resume}", + data={ + 'time_hms': sleep_hms, + 'resume': resume.strftime("%H:%M:%S") + } + ) + + self._last_call = now + return False + + diff = (now - self._last_call).total_seconds() + self._last_call = now + self._sleep_to_go -= diff + return True if self._sleep_to_go <= 0 else False From bce3bbaff3b8cf0ec2be2cf8fd71dbe80ca1d75a Mon Sep 17 00:00:00 2001 From: Dmitry Ovodov Date: Wed, 24 Aug 2016 14:11:54 +0300 Subject: [PATCH 42/51] Rewrited _should_pause_now func --- .../cell_workers/random_alive_pause.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pokemongo_bot/cell_workers/random_alive_pause.py b/pokemongo_bot/cell_workers/random_alive_pause.py index 35dfd0ee53..767702994d 100644 --- a/pokemongo_bot/cell_workers/random_alive_pause.py +++ b/pokemongo_bot/cell_workers/random_alive_pause.py @@ -81,11 +81,18 @@ def _schedule_next_pause(self): ) def _should_pause_now(self): - if dt.now() >= (self._next_pause + timedelta(seconds=self._next_duration) + timedelta(seconds=1)): - self._schedule_next_pause() - return False - if dt.now() >= self._next_pause: - return True + if self._sleep_to_go > 0: return True + + now = dt.now() + end = self._next_pause + timedelta(seconds=self._next_duration) + if now >= self._next_pause and now <= end: + diff = (now - self._next_pause).total_seconds() + if (self._next_duration - diff) <= 0: + self._schedule_next_pause() + return False + else: + self._next_duration -= diff + return True return False @@ -104,6 +111,8 @@ def _get_next_duration(self): return duration def _sleep(self): + if self._next_duration <= 0: return True + now = dt.now() if self._sleep_to_go <= 0: From b41abf31ed5277623ed92bcc35107ac26d2b08cf Mon Sep 17 00:00:00 2001 From: Dmitry Ovodov Date: Wed, 24 Aug 2016 14:26:53 +0300 Subject: [PATCH 43/51] Added noise --- pokemongo_bot/cell_workers/random_alive_pause.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pokemongo_bot/cell_workers/random_alive_pause.py b/pokemongo_bot/cell_workers/random_alive_pause.py index 767702994d..2a4470a347 100644 --- a/pokemongo_bot/cell_workers/random_alive_pause.py +++ b/pokemongo_bot/cell_workers/random_alive_pause.py @@ -136,6 +136,11 @@ def _sleep(self): self._last_call = now return False + self.bot.heartbeat() + if self.bot.config.replicate_gps_xy_noise or self.bot.config.replicate_gps_z_noise: # Adding some noise + lat, lng, alt = self.bot.api.get_position() + self.bot.api.set_position(lat, lng, alt) # Just set the same _actual_ values. set_position will add noise itself + diff = (now - self._last_call).total_seconds() self._last_call = now self._sleep_to_go -= diff From 671b5c3bfb0b3af038c688f767461018b2805ee0 Mon Sep 17 00:00:00 2001 From: Dmitry Ovodov Date: Wed, 24 Aug 2016 14:43:13 +0300 Subject: [PATCH 44/51] Added examples --- configs/config.json.cluster.example | 10 ++++++++++ configs/config.json.example | 10 ++++++++++ configs/config.json.map.example | 10 ++++++++++ configs/config.json.optimizer.example | 10 ++++++++++ configs/config.json.path.example | 10 ++++++++++ configs/config.json.pokemon.example | 10 ++++++++++ .../cell_workers/random_alive_pause.py | 18 +++++++++--------- 7 files changed, 69 insertions(+), 9 deletions(-) diff --git a/configs/config.json.cluster.example b/configs/config.json.cluster.example index 52baa7055b..6cd96fa988 100644 --- a/configs/config.json.cluster.example +++ b/configs/config.json.cluster.example @@ -9,6 +9,16 @@ "heartbeat_threshold": 10, "enable_social": true, "tasks": [ + { + "//NOTE: This task MUST be placed on the top of task list": {}, + "type": "RandomAlivePause", + "config": { + "min_duration": "00:00:10", + "max_duration": "00:10:00", + "min_interval": "00:05:00", + "max_interval": "01:30:00" + } + }, { "type": "HandleSoftBan" }, diff --git a/configs/config.json.example b/configs/config.json.example index 29256ebea5..aae8f47fdd 100644 --- a/configs/config.json.example +++ b/configs/config.json.example @@ -9,6 +9,16 @@ "heartbeat_threshold": 10, "enable_social": true, "tasks": [ + { + "//NOTE: This task MUST be placed on the top of task list": {}, + "type": "RandomAlivePause", + "config": { + "min_duration": "00:00:10", + "max_duration": "00:10:00", + "min_interval": "00:05:00", + "max_interval": "01:30:00" + } + }, { "type": "HandleSoftBan" }, diff --git a/configs/config.json.map.example b/configs/config.json.map.example index d4abf5e6bb..88977a4e77 100644 --- a/configs/config.json.map.example +++ b/configs/config.json.map.example @@ -9,6 +9,16 @@ "heartbeat_threshold": 10, "enable_social": true, "tasks": [ + { + "//NOTE: This task MUST be placed on the top of task list": {}, + "type": "RandomAlivePause", + "config": { + "min_duration": "00:00:10", + "max_duration": "00:10:00", + "min_interval": "00:05:00", + "max_interval": "01:30:00" + } + }, { "type": "HandleSoftBan" }, diff --git a/configs/config.json.optimizer.example b/configs/config.json.optimizer.example index 0e6656ffaa..bb75f5fa55 100644 --- a/configs/config.json.optimizer.example +++ b/configs/config.json.optimizer.example @@ -9,6 +9,16 @@ "heartbeat_threshold": 10, "enable_social": true, "tasks": [ + { + "//NOTE: This task MUST be placed on the top of task list": {}, + "type": "RandomAlivePause", + "config": { + "min_duration": "00:00:10", + "max_duration": "00:10:00", + "min_interval": "00:05:00", + "max_interval": "01:30:00" + } + }, { "type": "HandleSoftBan" }, diff --git a/configs/config.json.path.example b/configs/config.json.path.example index a8bf6cb8e2..2226372e3d 100644 --- a/configs/config.json.path.example +++ b/configs/config.json.path.example @@ -9,6 +9,16 @@ "heartbeat_threshold": 10, "enable_social": true, "tasks": [ + { + "//NOTE: This task MUST be placed on the top of task list": {}, + "type": "RandomAlivePause", + "config": { + "min_duration": "00:00:10", + "max_duration": "00:10:00", + "min_interval": "00:05:00", + "max_interval": "01:30:00" + } + }, { "type": "HandleSoftBan" }, diff --git a/configs/config.json.pokemon.example b/configs/config.json.pokemon.example index df51153b77..e78b55b7ad 100644 --- a/configs/config.json.pokemon.example +++ b/configs/config.json.pokemon.example @@ -9,6 +9,16 @@ "heartbeat_threshold": 10, "enable_social": true, "tasks": [ + { + "//NOTE: This task MUST be placed on the top of task list": {}, + "type": "RandomAlivePause", + "config": { + "min_duration": "00:00:10", + "max_duration": "00:10:00", + "min_interval": "00:05:00", + "max_interval": "01:30:00" + } + }, { "type": "HandleSoftBan" }, diff --git a/pokemongo_bot/cell_workers/random_alive_pause.py b/pokemongo_bot/cell_workers/random_alive_pause.py index 2a4470a347..9c558a26aa 100644 --- a/pokemongo_bot/cell_workers/random_alive_pause.py +++ b/pokemongo_bot/cell_workers/random_alive_pause.py @@ -6,21 +6,21 @@ class RandomAlivePause(BaseTask): """Drops the execution of following bot tasks - This task must be placed at beginning of the task list + This task MUST be placed on the top of task list Simulates the user doing "something random" for some time leaving app launched Example Config: { - "type": "RandomAlivePause", - "config": { - "min_duration": "00:00:10", - "max_duration": "00:10:00", - "min_interval": "00:05:00", - "max_interval": "01:30:00" - } + "type": "RandomAlivePause", + "config": { + "min_duration": "00:00:10", + "max_duration": "00:10:00", + "min_interval": "00:05:00", + "max_interval": "01:30:00" + } } - Inspired from RandomPause. + Based on RandomPause. """ SUPPORTED_TASK_API_VERSION = 1 From 8832b16f610bbc7ea7cbce10b8c682450a6d05da Mon Sep 17 00:00:00 2001 From: nivong Date: Wed, 24 Aug 2016 13:58:10 +0200 Subject: [PATCH 45/51] Update Dockerfile --- Dockerfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 92a49ce49b..881fc99981 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,9 +52,3 @@ RUN apk del alpine-sdk\ && rm -rf /var/cache/apk/* ENTRYPOINT ["python", "pokecli.py"] - -#remove unused stuff -RUN apk del alpine-sdk \ - && rm -rf /var/cache/apk/* - -ENTRYPOINT ["python", "pokecli.py"] From 88b654180b9032f1c48873973c417c9b0ce8b8fe Mon Sep 17 00:00:00 2001 From: Dmitry Ovodov Date: Wed, 24 Aug 2016 17:24:49 +0300 Subject: [PATCH 46/51] A little correction --- pokemongo_bot/cell_workers/random_alive_pause.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pokemongo_bot/cell_workers/random_alive_pause.py b/pokemongo_bot/cell_workers/random_alive_pause.py index 9c558a26aa..02c417d745 100644 --- a/pokemongo_bot/cell_workers/random_alive_pause.py +++ b/pokemongo_bot/cell_workers/random_alive_pause.py @@ -85,7 +85,7 @@ def _should_pause_now(self): now = dt.now() end = self._next_pause + timedelta(seconds=self._next_duration) - if now >= self._next_pause and now <= end: + if now >= self._next_pause and now < end: diff = (now - self._next_pause).total_seconds() if (self._next_duration - diff) <= 0: self._schedule_next_pause() From 31f528feaa7164c5d0efa55fe068113a5dd87c93 Mon Sep 17 00:00:00 2001 From: Matt J Madsen Date: Wed, 24 Aug 2016 11:10:32 -0500 Subject: [PATCH 47/51] Fix error --- pokemongo_bot/cell_workers/move_to_map_pokemon.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pokemongo_bot/cell_workers/move_to_map_pokemon.py b/pokemongo_bot/cell_workers/move_to_map_pokemon.py index d43353d351..e87f9fe502 100644 --- a/pokemongo_bot/cell_workers/move_to_map_pokemon.py +++ b/pokemongo_bot/cell_workers/move_to_map_pokemon.py @@ -102,6 +102,8 @@ def initialize(self): ) self.alt = uniform(self.bot.config.alt_min, self.bot.config.alt_max) def get_pokemon_from_social(self): + if not hasattr(obj, 'attr_name'): + return [] if not self.bot.mqtt_pokemon_list or len(self.bot.mqtt_pokemon_list) <= 0: return [] From b449384edc12ae2206950000b046437503fc9747 Mon Sep 17 00:00:00 2001 From: Matt J Madsen Date: Wed, 24 Aug 2016 11:12:17 -0500 Subject: [PATCH 48/51] Fixed parameters --- pokemongo_bot/cell_workers/move_to_map_pokemon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pokemongo_bot/cell_workers/move_to_map_pokemon.py b/pokemongo_bot/cell_workers/move_to_map_pokemon.py index e87f9fe502..39a927c547 100644 --- a/pokemongo_bot/cell_workers/move_to_map_pokemon.py +++ b/pokemongo_bot/cell_workers/move_to_map_pokemon.py @@ -102,7 +102,7 @@ def initialize(self): ) self.alt = uniform(self.bot.config.alt_min, self.bot.config.alt_max) def get_pokemon_from_social(self): - if not hasattr(obj, 'attr_name'): + if not hasattr(self.bot, 'mqtt_pokemon_list'): return [] if not self.bot.mqtt_pokemon_list or len(self.bot.mqtt_pokemon_list) <= 0: return [] From 0973102e70d34d1b333e227987207845e683a54d Mon Sep 17 00:00:00 2001 From: Matt J Madsen Date: Wed, 24 Aug 2016 12:35:21 -0500 Subject: [PATCH 49/51] Hotfix for #4675 (#4684) * Fixed min_ball checks * Updated configuration_files.md * Fixed typo --- docs/configuration_files.md | 1 + pokemongo_bot/cell_workers/move_to_map_pokemon.py | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/configuration_files.md b/docs/configuration_files.md index d931ee5a7f..9fc17488b7 100644 --- a/docs/configuration_files.md +++ b/docs/configuration_files.md @@ -506,6 +506,7 @@ This task will fetch current pokemon spawns from /raw_data of an PokemonGo-Map i - `priority` - Will move to the pokemon with the highest priority assigned (tie breaking by distance) * `prioritize_vips` - Will prioritize vips in distance and priority mode above all normal pokemon if set to true * `min_time` - Minimum time the pokemon has to be available before despawn +* `min_ball` - Minimum amount of balls required to run task * `max_distance` - Maximum distance the pokemon is allowed to be when walking, ignored when sniping * `snipe`: - `True` - Will teleport to target pokemon, encounter it, teleport back then catch it diff --git a/pokemongo_bot/cell_workers/move_to_map_pokemon.py b/pokemongo_bot/cell_workers/move_to_map_pokemon.py index 39a927c547..e57cbb5725 100644 --- a/pokemongo_bot/cell_workers/move_to_map_pokemon.py +++ b/pokemongo_bot/cell_workers/move_to_map_pokemon.py @@ -286,7 +286,7 @@ def work(self): superballs_quantity = inventory.items().get(GREATBALL_ID).count ultraballs_quantity = inventory.items().get(ULTRABALL_ID).count - if (pokeballs_quantity + superballs_quantity + ultraballs_quantity) < 1: + if (pokeballs_quantity + superballs_quantity + ultraballs_quantity) < self.min_ball: return WorkerResult.SUCCESS self.update_map_location() @@ -305,11 +305,6 @@ def work(self): pokemon = pokemon_list[0] - if pokeballs_quantity < 1: - if superballs_quantity < 1: - if ultraballs_quantity < 1: - return WorkerResult.SUCCESS - if self.config['snipe']: if self.snipe_high_prio_only: if self.snipe_high_prio_threshold < pokemon['priority']: @@ -317,6 +312,12 @@ def work(self): else: return self.snipe(pokemon) + # check for pokeballs (excluding masterball) + # checking again as we may have lost some if we sniped + pokeballs_quantity = inventory.items().get(POKEBALL_ID).count + superballs_quantity = inventory.items().get(GREATBALL_ID).count + ultraballs_quantity = inventory.items().get(ULTRABALL_ID).count + if pokeballs_quantity + superballs_quantity + ultraballs_quantity < self.min_ball: return WorkerResult.SUCCESS From 38b4a0904345cdce275be641e4b5b45f9d7e3972 Mon Sep 17 00:00:00 2001 From: Matt J Madsen Date: Wed, 24 Aug 2016 12:59:02 -0500 Subject: [PATCH 50/51] Add disable/enable to RandomAlivePause (#4685) * Add enable to RandomAlivePause * Add enable to RandomAlivePause * Add enable to RandomAlivePause * Added variable walk_variance to config * Added variable walk_variance to config * Added variable walk_variance to config --- configs/config.json.cluster.example | 1 + configs/config.json.example | 1 + configs/config.json.map.example | 1 + configs/config.json.optimizer.example | 1 + configs/config.json.path.example | 1 + configs/config.json.pokemon.example | 1 + 6 files changed, 6 insertions(+) diff --git a/configs/config.json.cluster.example b/configs/config.json.cluster.example index 6cd96fa988..83e267ffa1 100644 --- a/configs/config.json.cluster.example +++ b/configs/config.json.cluster.example @@ -13,6 +13,7 @@ "//NOTE: This task MUST be placed on the top of task list": {}, "type": "RandomAlivePause", "config": { + "enabled": false, "min_duration": "00:00:10", "max_duration": "00:10:00", "min_interval": "00:05:00", diff --git a/configs/config.json.example b/configs/config.json.example index aae8f47fdd..64eca099c6 100644 --- a/configs/config.json.example +++ b/configs/config.json.example @@ -13,6 +13,7 @@ "//NOTE: This task MUST be placed on the top of task list": {}, "type": "RandomAlivePause", "config": { + "enabled": false, "min_duration": "00:00:10", "max_duration": "00:10:00", "min_interval": "00:05:00", diff --git a/configs/config.json.map.example b/configs/config.json.map.example index 88977a4e77..0dbed8a709 100644 --- a/configs/config.json.map.example +++ b/configs/config.json.map.example @@ -13,6 +13,7 @@ "//NOTE: This task MUST be placed on the top of task list": {}, "type": "RandomAlivePause", "config": { + "enabled": false, "min_duration": "00:00:10", "max_duration": "00:10:00", "min_interval": "00:05:00", diff --git a/configs/config.json.optimizer.example b/configs/config.json.optimizer.example index bb75f5fa55..d0491517e5 100644 --- a/configs/config.json.optimizer.example +++ b/configs/config.json.optimizer.example @@ -13,6 +13,7 @@ "//NOTE: This task MUST be placed on the top of task list": {}, "type": "RandomAlivePause", "config": { + "enabled": false, "min_duration": "00:00:10", "max_duration": "00:10:00", "min_interval": "00:05:00", diff --git a/configs/config.json.path.example b/configs/config.json.path.example index 2226372e3d..9e3e27e71b 100644 --- a/configs/config.json.path.example +++ b/configs/config.json.path.example @@ -13,6 +13,7 @@ "//NOTE: This task MUST be placed on the top of task list": {}, "type": "RandomAlivePause", "config": { + "enabled": false, "min_duration": "00:00:10", "max_duration": "00:10:00", "min_interval": "00:05:00", diff --git a/configs/config.json.pokemon.example b/configs/config.json.pokemon.example index e78b55b7ad..2942f04fab 100644 --- a/configs/config.json.pokemon.example +++ b/configs/config.json.pokemon.example @@ -13,6 +13,7 @@ "//NOTE: This task MUST be placed on the top of task list": {}, "type": "RandomAlivePause", "config": { + "enabled": false, "min_duration": "00:00:10", "max_duration": "00:10:00", "min_interval": "00:05:00", From 3ebad0b9e4d468d6a3831741af05dc109bfa6691 Mon Sep 17 00:00:00 2001 From: Simba Zhang Date: Wed, 24 Aug 2016 13:13:44 -0700 Subject: [PATCH 51/51] Added contirbution part over write by dev merge to master. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ab6e8fb60f..4402474c41 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,7 @@ If you do not want any data to be gathered, you can turn off this feature by set - [elliottcarlson](https://github.com/elliottcarlson) for the Google Auth PR - [AeonLucid](https://github.com/AeonLucid/POGOProtos) for improved protos - [AHAAAAAAA](https://github.com/AHAAAAAAA/PokemonGo-Map) for parts of the s2sphere stuff +- [Breeze ro](https://github.com/BreezeRo) for some of the MQTT/Map stuff ## [Contributors](https://github.com/PokemonGoF/PokemonGo-Bot/blob/master/CONTRIBUTORS.md)