Skip to content

Commit

Permalink
Merge pull request PokemonGoF#467 from msoedov/pepify
Browse files Browse the repository at this point in the history
Pepify
  • Loading branch information
douglascamata authored Jul 23, 2016
2 parents d8b2aec + 66fb3d0 commit a021cba
Show file tree
Hide file tree
Showing 10 changed files with 356 additions and 178 deletions.
5 changes: 5 additions & 0 deletions .styles.yapf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[style]
based_on_style = google
spaces_before_comment = 4
split_before_logical_operator = true
column_limit=120
87 changes: 66 additions & 21 deletions pokecli.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,33 +56,77 @@ def init_config():

# Read passed in Arguments
required = lambda x: not x in load
parser.add_argument("-a", "--auth_service", help="Auth Service ('ptc' or 'google')",
parser.add_argument("-a",
"--auth_service",
help="Auth Service ('ptc' or 'google')",
required=required("auth_service"))
parser.add_argument("-u", "--username", help="Username")
parser.add_argument("-p", "--password", help="Password")
parser.add_argument("-l", "--location", help="Location")
parser.add_argument("-lc", "--location_cache",
help="Bot will start at last known location", type=bool, default=False)
parser.add_argument("-m", "--mode", help="Farming Mode",
type=str, default="all")
parser.add_argument("-lc",
"--location_cache",
help="Bot will start at last known location",
type=bool,
default=False)
parser.add_argument("-m",
"--mode",
help="Farming Mode",
type=str,
default="all")
parser.add_argument(
"-w", "--walk", help="Walk instead of teleport with given speed (meters per second, e.g. 2.5)", type=float, default=2.5)
"-w",
"--walk",
help=
"Walk instead of teleport with given speed (meters per second, e.g. 2.5)",
type=float,
default=2.5)
parser.add_argument("-c",
"--cp",
help="Set CP less than to transfer(DEFAULT 100)",
type=int,
default=100)
parser.add_argument(
"-c", "--cp", help="Set CP less than to transfer(DEFAULT 100)", type=int, default=100)
parser.add_argument("-iv", "--pokemon_potential",
help="Set IV ratio less than to transfer(DEFAULT 0.40)", type=float, default=0.40)
parser.add_argument("-k", "--gmapkey",
help="Set Google Maps API KEY", type=str, default=None)
"-iv",
"--pokemon_potential",
help="Set IV ratio less than to transfer(DEFAULT 0.40)",
type=float,
default=0.40)
parser.add_argument("-k",
"--gmapkey",
help="Set Google Maps API KEY",
type=str,
default=None)
parser.add_argument(
"-ms", "--max_steps", help="Set the steps around your initial location(DEFAULT 5 mean 25 cells around your location)", type=int, default=50)
parser.add_argument("-it", "--initial_transfer",
help="Transfer all pokemon with same ID on bot start, except pokemon with highest CP. It works with -c", type=bool, default=False)
parser.add_argument("-d", "--debug", help="Debug Mode",
type=bool, default=False)
"-ms",
"--max_steps",
help=
"Set the steps around your initial location(DEFAULT 5 mean 25 cells around your location)",
type=int,
default=50)
parser.add_argument(
"-t", "--test", help="Only parse the specified location", type=bool, default=False)
parser.add_argument("-du", "--distance_unit",
help="Set the unit to display distance in (e.g, km for kilometers, mi for miles, ft for feet)", type=str, default="km")
"-it",
"--initial_transfer",
help=
"Transfer all pokemon with same ID on bot start, except pokemon with highest CP. It works with -c",
type=bool,
default=False)
parser.add_argument("-d",
"--debug",
help="Debug Mode",
type=bool,
default=False)
parser.add_argument("-t",
"--test",
help="Only parse the specified location",
type=bool,
default=False)
parser.add_argument(
"-du",
"--distance_unit",
help=
"Set the unit to display distance in (e.g, km for kilometers, mi for miles, ft for feet)",
type=str,
default="km")
config = parser.parse_args()
if not config.username and not 'username' in load:
config.username = raw_input("Username: ")
Expand Down Expand Up @@ -126,13 +170,14 @@ def main():

logger.log('[x] Starting PokemonGo Bot....', 'green')

while(True):
while (True):
bot.take_step()

except KeyboardInterrupt:
logger.log('[x] Exiting PokemonGo Bot','red')
logger.log('[x] Exiting PokemonGo Bot', 'red')
# TODO Add number of pokemon catched, pokestops visited, highest CP
# pokemon catched, etc.


if __name__ == '__main__':
main()
Loading

0 comments on commit a021cba

Please sign in to comment.