Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Dev merge to master #6097

Merged
merged 55 commits into from
Jul 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
91cd435
Adjust modifiers for moves
davidakachaos Jul 11, 2017
95a3ef9
Also need to adjust the tests...
davidakachaos Jul 11, 2017
d1b061a
Fixed all the tests
davidakachaos Jul 12, 2017
f8ecc1e
Merge pull request #6078 from davidakachaos/move_adjustments
davidakachaos Jul 12, 2017
629eb60
Add files via upload
goedzo Jul 13, 2017
a24839e
Add Full and complete 0.67.2 API Support
goedzo Jul 13, 2017
4b4f65a
Changes docker to Goedzo Fork
goedzo Jul 13, 2017
9db3b8d
Update requirements.txt
goedzo Jul 13, 2017
22ff6eb
Update requirements.txt
goedzo Jul 13, 2017
8b9e3b7
Making sure that Original Pogo Branch is used
goedzo Jul 13, 2017
a811650
Removing /r
goedzo Jul 14, 2017
b5acdd5
Adding Gym Cell Worker to deal with Gym Messages
goedzo Jul 14, 2017
5f6b963
Enable GymPokemon worker
goedzo Jul 14, 2017
5953744
Making sure that the event of deploying a mon is shown in green
goedzo Jul 14, 2017
b77af34
Share the feeding event
goedzo Jul 14, 2017
2e65068
Adding config sample and setting correct base config
goedzo Jul 14, 2017
fba2c04
Update message frequency to be less chatty
goedzo Jul 14, 2017
2a19fdb
Allow feeding berries from Config file
goedzo Jul 14, 2017
461cd35
Testing the quantity to use for feeding
goedzo Jul 14, 2017
31a90db
Merge branch 'master' into Basic-Gym-Support
goedzo Jul 14, 2017
8d41601
Adding support to find gyms in range
goedzo Jul 14, 2017
d17c4e1
Bugfixes and disabled berry feeding
goedzo Jul 15, 2017
dc7711c
Merge pull request #2 from goedzo/Basic-Gym-Support
goedzo Jul 15, 2017
aa306d4
Fix for gyms not sharing their defenders
goedzo Jul 15, 2017
ac151a8
Stop moving if running fails
goedzo Jul 15, 2017
4548311
Gym Deployment finalized
goedzo Jul 16, 2017
36acea4
Fixes issue with newer version of docker
goedzo Jul 16, 2017
d61ad5d
Fixes issue with newer version of docker
goedzo Jul 16, 2017
7a7a379
Merge pull request #6085 from goedzo/Docker-Fix
davidakachaos Jul 17, 2017
78d3cc1
Introducing HealPokemon
davidakachaos Jul 17, 2017
9a9b7a6
Full API Support for 0.67.2 based on latest compile from POGOProtos
goedzo Jul 17, 2017
5ffcfc8
Merge branch 'dev' into Basic-Gym-Support
goedzo Jul 17, 2017
12282cc
Merge pull request #6086 from davidakachaos/heal_pokemon
Jcolomar Jul 17, 2017
432a51c
Fixed Heal Pokemon
goedzo Jul 17, 2017
de9cb21
Fixed all Heal Pokemon bugs
goedzo Jul 17, 2017
e32cd14
Merge pull request #5 from PokemonGoF/dev
goedzo Jul 17, 2017
3d5f6a0
Merge pull request #6 from goedzo/HealPokemon-Fix
goedzo Jul 17, 2017
ea3e660
Merge branch 'Debug_2017_07_18' into Basic-Gym-Support
goedzo Jul 17, 2017
851da62
Merge pull request #7 from goedzo/Basic-Gym-Support
goedzo Jul 17, 2017
d6bcbd5
Making sure we are all fixed now
goedzo Jul 18, 2017
59455ed
Merge pull request #8 from goedzo/Full-0.67.2-Support
goedzo Jul 18, 2017
cf6c2c5
Merge pull request #6090 from goedzo/HealPokemon-Fix
MerlionRock Jul 18, 2017
6ed8089
Changes to spinning Pokestops and Gyms
davidakachaos Jul 18, 2017
424bae0
Trying to solve move to fort issues
davidakachaos Jul 18, 2017
8241825
Caching of forts small adjustment
davidakachaos Jul 18, 2017
2f9ab17
Removed unused config
davidakachaos Jul 18, 2017
db9f99f
Removed unused event
davidakachaos Jul 18, 2017
72f56ce
Merge pull request #6092 from davidakachaos/move_to_fort_and_gyms
MerlionRock Jul 18, 2017
6b10582
Merge pull request #6091 from goedzo/Debug_2017_07_18
MerlionRock Jul 18, 2017
38d488d
Fixing missed events
davidakachaos Jul 18, 2017
7b95e6a
Merge pull request #6093 from davidakachaos/fix_mistakes
MerlionRock Jul 18, 2017
b633a1f
Update README.md
Jcolomar Jul 18, 2017
826d86a
Quick fix
davidakachaos Jul 18, 2017
64d0c5d
Merge pull request #6096 from davidakachaos/fix_spin_fort
davidakachaos Jul 18, 2017
825eba4
Merge pull request #6095 from Jcolomar/dev
Jcolomar Jul 18, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,24 @@ RUN apk -U --no-cache add python py-pip tzdata \
&& rm -rf /var/cache/apk/* \
&& find / -name '*.pyc' -o -name '*.pyo' | xargs -rn1 rm -f

ADD http://pgoapi.com/pgoencrypt.tar.gz /tmp/pgoencrypt.tar.gz
ADD https://raw.githubusercontent.com/$BUILD_REPO/$BUILD_BRANCH/requirements.txt .
RUN apk -U --no-cache add --virtual .build-dependencies python-dev gcc make musl-dev git \
&& tar zxf /tmp/pgoencrypt.tar.gz -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 \
&& find / -name '*.pyc' -o -name '*.pyo' | xargs -rn1 rm -f

#Need to load cert for WGET
RUN apk update
RUN apk add ca-certificates wget
RUN update-ca-certificates
RUN wget -P /tmp/ http://pgoapi.com/pgoencrypt.tar.gz

RUN apk -U --no-cache add --virtual .build-dependencies python-dev gcc make musl-dev git
RUN tar xvzf /tmp/pgoencrypt.tar.gz -C /tmp
RUN make -C /tmp/pgoencrypt/src
RUN cp /tmp/pgoencrypt/src/libencrypt.so /usr/src/app/encrypt.so
RUN ln -s locale.h /usr/include/xlocale.h
RUN pip install --no-cache-dir -r requirements.txt
RUN apk del .build-dependencies
RUN rm -rf /var/cache/apk/* /tmp/pgoencrypt* /usr/include/xlocale.h
RUN find / -name '*.pyc' -o -name '*.pyo' | xargs -rn1 rm -f


ADD https://api.github.com/repos/$BUILD_REPO/commits/$BUILD_BRANCH /tmp/pgobot-version
RUN apk -U --no-cache add --virtual .pgobot-dependencies wget ca-certificates tar jq \
Expand Down
36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ If you need any help please don't create an issue as we have a great community o
- #dev channel in slack

## Discord
- [Click here to join discord server](https://discord.gg/n3g5puF)
- [Click here to join discord server](https://discord.gg/n3g5puF) ---->RECOMENDED<----

### [Bugs / Issues](https://github.com/PokemonGoF/PokemonGo-Bot/issues?q=is%3Aissue+sort%3Aupdated-desc)
If you discover a bug in the bot, please [search our issue tracker](https://github.com/PokemonGoF/PokemonGo-Bot/issues?q=is%3Aissue+sort%3Aupdated-desc) first. If it hasn't been reported, please [create a new issue](https://github.com/PokemonGoF/PokemonGo-Bot/issues/new) and ensure you follow the template guide so that our team can assist you as quickly as possible.
Expand All @@ -53,27 +53,25 @@ If this is your first time making a PR or aren't sure of the standard practice o
- [x] Search Pokestops
- [x] Catch Pokemon
- [x] Determine which pokeball to use (uses Razz Berry if the catch percentage is low!)
- [x] Exchange Pokemon as per configuration
- [x] Evolve Pokemon as per configuration
- [x] Exchange, evolve and catch Pokemon as per configuration
- [x] Transfer Pokemon in bulk
- [x] Auto switch mode (Inventory Checks - switches between catch/farming items)
- [x] Limit the step to farm specific area for pokestops
- [x] Rudimentary IV Functionality filter
- [x] Ignore certain pokemon filter
- [x] Limit Pokestops/catch Pokemons per day
- [x] IV Functionality filter
- [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)
- [x] Use candy
- [x] Set family ID as VIP and priorice bot to catch it!
- [x] Spin Gyms pokestops
- [x] Transfer red slashed pokemons
- [x] Set shiny pokemons as VIP
- [x] Deploy a pokemon in Gym if slot available
- [x] Docker support
- [x] Auto heal Pokemons
- [x] Information about PGoAPI bot version is rather Bossland endpoint, expiration key date and RPM used

## Analytics
[PokemonGo-Bot](https://github.com/PokemonGoF/PokemonGo-Bot) is very popular and has a vibrant community. Because of that, it has become very difficult for us to know how the bot is used and what errors people hit. By capturing small amounts of data, we can prioritize our work better such as fixing errors that happen to a large percentage of our user base, not just a vocal minority.

Our goal is to help inform our decisions by capturing data that helps us get aggregate usage and error reports, not personal information. To view the code that handles analytics in our master branch, you can use this [search link](https://github.com/PokemonGoF/PokemonGo-Bot/search?utf8=%E2%9C%93&q=BotEvent).

If there are any concerns with this policy or you believe we are tracking something we shouldn't, please open a ticket in the tracker. The contributors always intend to do the right thing for our users, and we want to make sure we are held to that path.

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`.

## Credits
- [tejado](https://github.com/tejado) many thanks for the API
Expand Down Expand Up @@ -167,6 +165,14 @@ If you do not want any data to be gathered, you can turn off this feature by set
* Gobberwart
* javajohnHub
* kolinkorr839
* lepeli
* davidakachaos
* MerlionRock
* walaoaaa1234
* pogarek
* goedzo
* solderzzc aka BIG BOSS


## 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.
Expand Down
11 changes: 11 additions & 0 deletions configs/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,16 @@
"enabled": true
}
},
{
"type": "GymPokemon",
"config": {
"enabled": false,
"order_by": "cp",
"min_interval":360,
"min_recheck":30,
"max_recheck":120
}
},
{
"type": "MoveToFort",
"config": {
Expand All @@ -482,6 +492,7 @@
"step_size": 70
}
}

],
"map_object_cache_time": 5,
"forts": {
Expand Down
30 changes: 30 additions & 0 deletions docs/configuration_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
- [BuddyPokemon](#buddypokemon)
- [PokemonHunter](#pokemonhunter)
- [BadPokemon](#badpokemon)
- [HealPokemon](#healpokemon)

# Configuration files

Expand Down Expand Up @@ -1486,3 +1487,32 @@ If you have any Pokemon that Niantic has marked as bad (red slashes) this will n
}
}
```

## HealPokemon
[[back to top](#table-of-contents)]

### Description
[[back to top](#table-of-contents)]

If you have any Pokemon that are dead or need healing, this task will try to do that.

### Options
[[back to top](#table-of-contents)]

* `heal`: `Default: True`. Should Pokemon be healed?
* `revive`: `Default: True`. Should dead Pokemon be revived?


### Sample configuration
[[back to top](#table-of-contents)]
```json
{
"type": "BadPokemon",
"config": {
"enabled": true,
"heal": true,
"revive": true
}
}
```

25 changes: 24 additions & 1 deletion pokemongo_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,21 +372,23 @@ def _register_events(self):
'moving_to_fort',
parameters=(
'fort_name',
'target_type',
'distance'
)
)
self.event_manager.register_event(
'moving_to_lured_fort',
parameters=(
'fort_name',
'target_type',
'distance',
'lure_distance'
)
)
self.event_manager.register_event(
'spun_pokestop',
parameters=(
'pokestop', 'exp', 'items'
'pokestop', 'exp', 'items', 'stop_kind', 'spin_amount_now'
)
)
self.event_manager.register_event(
Expand Down Expand Up @@ -559,6 +561,8 @@ def _register_events(self):
self.event_manager.register_event('catch_limit')
self.event_manager.register_event('spin_limit')
self.event_manager.register_event('show_best_pokemon', parameters=('pokemons'))
self.event_manager.register_event('revived_pokemon')
self.event_manager.register_event('healing_pokemon')

# level up stuff
self.event_manager.register_event(
Expand Down Expand Up @@ -1725,6 +1729,25 @@ def get_forts(self, order_by_distance=False):
))

return forts

def get_gyms(self, order_by_distance=False):
forts = [fort
for fort in self.cell['forts']
if 'latitude' in fort and 'type' not in fort]
# Need to filter out disabled gyms!
forts = filter(lambda x: x["enabled"] is True, forts)
forts = filter(lambda x: 'closed' not in fort, forts)
# forts = filter(lambda x: 'type' not in fort, forts)

if order_by_distance:
forts.sort(key=lambda x: distance(
self.position[0],
self.position[1],
x['latitude'],
x['longitude']
))

return forts

def get_map_objects(self, lat, lng, timestamp, cellid):
if time.time() - self.last_time_map_object < self.config.map_object_cache_time:
Expand Down
2 changes: 2 additions & 0 deletions pokemongo_bot/cell_workers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@
from .catch_limiter import CatchLimiter
from .update_hash_stats import UpdateHashStats
from .bad_pokemon import BadPokemon
from .heal_pokemon import HealPokemon
from .gym_pokemon import GymPokemon
Loading