Skip to content

Commit

Permalink
Merge pull request #3 from GhosterBot/Sniper_Task_Logs
Browse files Browse the repository at this point in the history
Sniper task : More logs + correction of pokewatcher 's source
  • Loading branch information
GhosterBot authored Oct 5, 2016
2 parents 45e1787 + 17cc2b4 commit cf00395
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configs/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
"name": { "param": "pokemon" },
"latitude": { "param": "cords" },
"longitude": { "param": "cords" },
"expiration": { "param": "timeend", "format": "milliseconds" }
"expiration": { "param": "timeend", "format": "seconds" }
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion configs/config.json.map.example
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@
"name": { "param": "pokemon" },
"latitude": { "param": "cords" },
"longitude": { "param": "cords" },
"expiration": { "param": "timeend", "format": "milliseconds" }
"expiration": { "param": "timeend", "format": "seconds" }
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ This task is an upgrade version of the MoveToMapPokemon task. It will fetch poke
"name": { "param": "pokemon" },
"latitude": { "param": "cords" },
"longitude": { "param": "cords" },
"expiration": { "param": "timeend", "format": "milliseconds" }
"expiration": { "param": "timeend", "format": "seconds" }
}
}
],
Expand Down
10 changes: 10 additions & 0 deletions pokemongo_bot/cell_workers/sniper.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,16 @@ def work(self):
if targets:
# Order the targets (descending)
targets = sorted(targets, key=itemgetter(*self.order), reverse=True)
#List Pokemons found
self._trace('Sniping the {} best Pokemons found, ordered by {}'.format(self.bullets, self.order))
self._trace('+----+------+----------------+-------+----------+---------+---------+----------+')
self._trace('| # | Id | Name | IV | Verified | VIP | Missing | Priority |')
self._trace('+----+------+----------------+-------+----------+---------+---------+----------+')
row_format ="|{:>3} |{:>5} | {:<15}|{:>6} | {:<9}| {:<8}| {:<8}|{:>9} |"
for index, target in enumerate(targets):
self._trace(row_format.format(*[index+1, target.get('pokemon_id'), target.get('pokemon_name'), target.get('iv'), str(target.get('verified')), str(target.get('vip')), str(target.get('missing')), target.get('priority')]))

self._trace('+----+------+----------------+-------+----------+---------+---------+----------+')
shots = 0

# For as long as there are targets available, try to snipe untill we run out of bullets
Expand Down

0 comments on commit cf00395

Please sign in to comment.