Skip to content

Commit

Permalink
Merge pull request #4843 from PokemonGoF/dev
Browse files Browse the repository at this point in the history
Dev merge to master
  • Loading branch information
solderzzc authored Aug 28, 2016
2 parents ed09593 + 5e70608 commit bc97886
Show file tree
Hide file tree
Showing 41 changed files with 690 additions and 385 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ configs/*
!configs/path.example.json
!config.json.cluster.example
!config.json.optimizer.example
!auth.json.example

# Virtualenv folders
bin/
Expand All @@ -136,3 +137,6 @@ pip-selfcheck.json

# Some love for the vim users
.*.sw*

# Mac Gargage
.DS_Store
2 changes: 1 addition & 1 deletion .pullapprove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ reject_value: -1
reset_on_push: true
author_approval: ignored
reviewers:
required: 2
required: 1
teams:
- pokemongo-bot-team
24 changes: 15 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,27 @@ VOLUME ["/usr/src/app/configs", "/usr/src/app/web"]

ADD https://raw.githubusercontent.com/$BUILD_REPO/$BUILD_BRANCH/requirements.txt .
RUN apk -U --no-cache add python py-pip \
&& apk --no-cache add --virtual .build-dependencies python-dev gcc make musl-dev git tzdata \
&& apk --no-cache add --virtual .build-dependencies python-dev gcc make musl-dev git tzdata tar \
&& cp -fa /usr/share/zoneinfo/$TIMEZONE /etc/localtime \
&& echo $TIMEZONE > /etc/timezone \
&& wget -q -O- http://pgoapi.com/pgoencrypt.tar.gz | tar zxf - -C /tmp \
&& make -C /tmp/pgoencrypt/src \
&& cp /tmp/pgoencrypt/src/libencrypt.so /usr/src/app/encrypt.so \
&& ln -s locale.h /usr/include/xlocale.h \
&& pip install --no-cache-dir -r requirements.txt \
&& apk del .build-dependencies \
&& rm -rf /var/cache/apk/* /tmp/pgoencrypt /usr/include/xlocale.h \
&& rm -rf /var/cache/apk/* /usr/include/xlocale.h \
&& find / -name '*.pyc' -o -name '*.pyo' -exec rm -f {} \;

RUN apk -U --no-cache add --virtual .install-dependencies wget ca-certificates tar \
&& wget -q -O- https://github.com/$BUILD_REPO/archive/$BUILD_BRANCH.tar.gz | tar zxf - --strip-components=1 -C /usr/src/app \
&& apk del .install-dependencies \
&& rm -rf /var/cache/apk/*
ADD http://pgoapi.com/pgoencrypt.tar.gz /tmp/pgoencrypt.tar.gz
RUN apk --no-cache add --virtual .pgoencrypt-dependencies gcc make musl-dev tar \
&& cat /tmp/pgoencrypt.tar.gz | tar xzf - -C /tmp \
&& make -C /tmp/pgoencrypt/src \
&& cp /tmp/pgoencrypt/src/libencrypt.so /usr/src/app/encrypt.so \
&& apk del .pgoencrypt-dependencies \
&& rm -rf /var/cache/apk/* /tmp/pgoencrypt /tmp/pgoencrypt.tar.gz

ADD https://github.com/$BUILD_REPO/archive/$BUILD_BRANCH.tar.gz /tmp
RUN apk -U --no-cache add --virtual .tar-deps tar \
&& cat /tmp/$BUILD_BRANCH.tar.gz | tar -zxf - --strip-components=1 -C /usr/src/app \
&& apk del .tar-deps \
&& rm /tmp/$BUILD_BRANCH.tar.gz

ENTRYPOINT ["python", "pokecli.py"]
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# Disclaimer
©2016 Niantic, Inc. ©2016 Pokémon. ©1995–2016 Nintendo / Creatures Inc. / GAME FREAK inc. © 2016 Pokémon/Nintendo Pokémon and Pokémon character names are trademarks of Nintendo. The Google Maps Pin is a trademark of Google Inc. and the trade dress in the product design is a trademark of Google Inc. under license to The Pokémon Company. Other trademarks are the property of their respective owners.
[Privacy Policy](http://www.pokemon.com/us/privacy-policy/)

[PokemonGo-Bot](https://github.com/PokemonGoF/PokemonGo-Bot) is intended for academic purposes and should not be used to play the game *PokemonGo* as it violates the TOS and is unfair to the community. Use the bot **at your own risk**.

[PokemonGoF](https://github.com/PokemonGoF) does not support the use of 3rd party apps or apps that violate the TOS.

# PokemonGo-Bot
PokemonGo bot is a project created by the [PokemonGoF](https://github.com/PokemonGoF) team.

The project is currently setup in two main branches.
- `dev` also known as `beta` - This is where the latest features are, but you may also experience some issues with stability/crashes
- `master` also known as `stable` - The bot 'should' be stable on this branch, and is generally well tested

## [Desktop version](https://github.com/PokemonGoF/PokemonGo-Bot-Desktop)

## Support
###Configuration issues/help
If you need any help please don't create an issue as we have a great community on Slack. You can count on the community in [#help](https://pokemongo-bot.slack.com/messages/help/) channel.
Expand Down Expand Up @@ -65,8 +59,6 @@ If there are any concerns with this policy or you believe we are tracking someth

If you do not want any data to be gathered, you can turn off this feature by setting `health_record` to `false` in your `config.json`.

## 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
Expand All @@ -78,5 +70,13 @@ If you do not want any data to be gathered, you can turn off this feature by set

## [Contributors](https://github.com/PokemonGoF/PokemonGo-Bot/blob/master/CONTRIBUTORS.md)

## Disclaimer
©2016 Niantic, Inc. ©2016 Pokémon. ©1995–2016 Nintendo / Creatures Inc. / GAME FREAK inc. © 2016 Pokémon/Nintendo Pokémon and Pokémon character names are trademarks of Nintendo. The Google Maps Pin is a trademark of Google Inc. and the trade dress in the product design is a trademark of Google Inc. under license to The Pokémon Company. Other trademarks are the property of their respective owners.
[Privacy Policy](http://www.pokemon.com/us/privacy-policy/)

[PokemonGo-Bot](https://github.com/PokemonGoF/PokemonGo-Bot) is intended for academic purposes and should not be used to play the game *PokemonGo* as it violates the TOS and is unfair to the community. Use the bot **at your own risk**.

[PokemonGoF](https://github.com/PokemonGoF) does not support the use of 3rd party apps or apps that violate the TOS.


[![Analytics](https://ga-beacon.appspot.com/UA-81468120-1/welcome-page-master)](https://github.com/igrigorik/ga-beacon)
12 changes: 12 additions & 0 deletions configs/auth.json.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"auth_service": "google",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"location": "SOME_LOCATION",
"favorite_locations":[
{"name": "Milan", "coords": "45.472849,9.177567"}
],
"gmapkey": "GOOGLE_MAPS_API_KEY",
"encrypt_location": "",
"telegram_token": ""
}
21 changes: 9 additions & 12 deletions configs/config.json.cluster.example
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
{
"auth_service": "google",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"location": "SOME_LOCATION",
"favorite_locations":[
{"name": "Milan", "coords": "45.472849,9.177567"}
],
"gmapkey": "GOOGLE_MAPS_API_KEY",
"encrypt_location": "",
"websocket_server": false,
"heartbeat_threshold": 10,
"enable_social": true,
Expand Down Expand Up @@ -49,7 +40,8 @@
"type": "IncubateEggs",
"config": {
"enabled": true,
"longer_eggs_first": true,
"infinite_longer_eggs_first": false,
"breakable_longer_eggs_first": true,
"min_interval": 120
}
},
Expand Down Expand Up @@ -103,6 +95,8 @@
"type": "EvolvePokemon",
"config": {
"enabled": false,
"//evolve all except Zubat and Rattata": "",
"//evolve_all": "-Zubat,-Rattata",
"evolve_all": "none",
"first_evolve_by": "cp",
"evolve_above_cp": 500,
Expand Down Expand Up @@ -146,6 +140,7 @@
"min_ultraball_to_keep": 5,
"berry_threshold": 0.35,
"vip_berry_threshold": 0.9,
"daily_catch_limit": 800,
"catch_throw_parameters": {
"excellent_rate": 0.1,
"great_rate": 0.5,
Expand Down Expand Up @@ -233,8 +228,10 @@
"location_cache": true,
"distance_unit": "km",
"reconnecting_timeout": 15,
"logging_color": true,
"daily_catch_limit": 800,
"logging": {
"color": true,
"clean": false
},
"catch": {
"any": {"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"},
"// Example of always catching Rattata:": {},
Expand Down
32 changes: 19 additions & 13 deletions configs/config.json.example
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
{
"auth_service": "google",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"location": "SOME_LOCATION",
"favorite_locations":[
{"name": "Milan", "coords": "45.472849,9.177567"}
],
"gmapkey": "GOOGLE_MAPS_API_KEY",
"encrypt_location": "",
"websocket_server": false,
"heartbeat_threshold": 10,
"enable_social": true,
Expand All @@ -16,6 +7,14 @@
"tasks_only": false
},
"tasks": [
{
"type": "TelegramTask",
"config": {
"enabled": false,
"master": null,
"alert_catch": ["all"]
}
},
{
"//NOTE: This task MUST be placed on the top of task list": {},
"type": "RandomAlivePause",
Expand Down Expand Up @@ -59,7 +58,8 @@
"type": "IncubateEggs",
"config": {
"enabled": true,
"longer_eggs_first": true,
"infinite_longer_eggs_first": false,
"breakable_longer_eggs_first": true,
"min_interval": 120,
"infinite": [2,5,10],
"breakable": [2,5,10]
Expand Down Expand Up @@ -115,6 +115,8 @@
"type": "EvolvePokemon",
"config": {
"enabled": false,
"//evolve all except Zubat and Rattata": "",
"//evolve_all": "-Zubat,-Rattata",
"evolve_all": "none",
"first_evolve_by": "cp",
"evolve_above_cp": 500,
Expand Down Expand Up @@ -159,6 +161,7 @@
"berry_threshold": 0.35,
"vip_berry_threshold": 0.9,
"treat_unseen_as_vip": true,
"daily_catch_limit": 800,
"catch_throw_parameters": {
"excellent_rate": 0.1,
"great_rate": 0.5,
Expand Down Expand Up @@ -200,7 +203,8 @@
"enabled": true,
"lure_attraction": true,
"lure_max_distance": 2000,
"walker": "StepWalker"
"walker": "StepWalker",
"log_interval": 5
}
},
{
Expand Down Expand Up @@ -262,8 +266,10 @@
"location_cache": true,
"distance_unit": "km",
"reconnecting_timeout": 15,
"logging_color": true,
"daily_catch_limit": 800,
"logging": {
"color": true,
"clean": false
},
"catch": {
"any": {"candy_threshold" : 400 ,"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"},
"// Example of always catching Rattata:": {},
Expand Down
24 changes: 11 additions & 13 deletions configs/config.json.map.example
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
{
"auth_service": "google",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"location": "SOME_LOCATION",
"favorite_locations":[
{"name": "Milan", "coords": "45.472849,9.177567"}
],
"gmapkey": "GOOGLE_MAPS_API_KEY",
"encrypt_location": "",
"websocket_server": false,
"heartbeat_threshold": 10,
"enable_social": true,
Expand Down Expand Up @@ -49,7 +40,8 @@
"type": "IncubateEggs",
"config": {
"enabled": true,
"longer_eggs_first": true,
"infinite_longer_eggs_first": false,
"breakable_longer_eggs_first": true,
"min_interval": 120
}
},
Expand Down Expand Up @@ -103,6 +95,8 @@
"type": "EvolvePokemon",
"config": {
"enabled": false,
"//evolve all except Zubat and Rattata": "",
"//evolve_all": "-Zubat,-Rattata",
"evolve_all": "none",
"first_evolve_by": "cp",
"evolve_above_cp": 500,
Expand Down Expand Up @@ -146,6 +140,7 @@
"min_ultraball_to_keep": 5,
"berry_threshold": 0.35,
"vip_berry_threshold": 0.9,
"daily_catch_limit": 800,
"catch_throw_parameters": {
"excellent_rate": 0.1,
"great_rate": 0.5,
Expand Down Expand Up @@ -432,7 +427,8 @@
"config": {
"enabled": true,
"lure_attraction": true,
"lure_max_distance": 2000
"lure_max_distance": 2000,
"log_interval": 5
}
},
{
Expand Down Expand Up @@ -489,8 +485,10 @@
"location_cache": true,
"distance_unit": "km",
"reconnecting_timeout": 15,
"logging_color": true,
"daily_catch_limit": 800,
"logging": {
"color": true,
"clean": false
},
"catch": {
"any": {"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"},
"// Example of always catching Rattata:": {},
Expand Down
24 changes: 10 additions & 14 deletions configs/config.json.optimizer.example
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
{
"auth_service": "google",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"location": "SOME_LOCATION",
"favorite_locations":[
{"name": "Milan", "coords": "45.472849,9.177567"}
],
"gmapkey": "GOOGLE_MAPS_API_KEY",
"encrypt_location": "",
"websocket_server": false,
"heartbeat_threshold": 10,
"enable_social": true,
Expand Down Expand Up @@ -49,7 +40,8 @@
"type": "IncubateEggs",
"config": {
"enabled": true,
"longer_eggs_first": true,
"infinite_longer_eggs_first": false,
"breakable_longer_eggs_first": true,
"min_interval": 120
}
},
Expand Down Expand Up @@ -138,7 +130,7 @@
"// 'iv' = individual value": {},
"// 'ivcp' = iv weigted so that for equal iv, attack > defense > stamina": {},
"// 'cp' = combat power (can be increased with candies)": {},
"// 'cp_exact' = combar power (not rounded)": {},
"// 'cp_exact' = combat power (not rounded)": {},
"// 'ncp' (normalized cp) or 'cp_percent' = ratio cp / max_cp": {},
"// 'iv_attack' = attach component of iv": {},
"// 'iv_defense' = defense component of iv": {},
Expand Down Expand Up @@ -208,6 +200,7 @@
"berry_threshold": 0.35,
"vip_berry_threshold": 0.9,
"treat_unseen_as_vip": true,
"daily_catch_limit": 800,
"catch_throw_parameters": {
"excellent_rate": 0.1,
"great_rate": 0.5,
Expand Down Expand Up @@ -247,7 +240,8 @@
"config": {
"enabled": true,
"lure_attraction": true,
"lure_max_distance": 2000
"lure_max_distance": 2000,
"log_interval": 5
}
},
{
Expand Down Expand Up @@ -304,8 +298,10 @@
"location_cache": true,
"distance_unit": "km",
"reconnecting_timeout": 15,
"logging_color": true,
"daily_catch_limit": 800,
"logging": {
"color": true,
"clean": false
},
"catch": {
"any": {
"always_catch": true
Expand Down
Loading

0 comments on commit bc97886

Please sign in to comment.