jabbink / PokemonGoBot

DEFUNCT - Bot that plays Pokemon Go
https://www.pogobot.club/
GNU General Public License v3.0
558 stars 232 forks source link

Request: Bot should start random places #1174

Open parnunu opened 8 years ago

parnunu commented 8 years ago

Description: Bot should random start from any location that are in radius.

Steps to reproduce:

  1. Start bot without modify location Expected behavior: Bot use location in config as a center only not the spawn location and spawn at place within radius.

Actual behavior: Everytime start bot it spawn at center

Stacktrace (If it's a crash): [Please use pastebin if it's too long]

Version: [The version of the bot you used; when self-compiled: :exclamation: the commit hash :exclamation:]

Operating System: [Your operating system]

Java version: [Full output of java -version]

Leave this sentence in your issue as proof that you have read and used this template.

Mixone-FinallyHere commented 8 years ago

What would be the use of that?

Taraegon commented 8 years ago

That would be nice and I take that precaution anyway. But crucially, trainers are getting caught out starting too far from their most recent location IF insufficient time has elapsed. I think your request would be useful but it won't protect us from that condition.

CryptoCombat commented 8 years ago

Randomizing position by a few hundred meters won't result in teleport softbans, but will look the same as someone starting up the app in/around their home/apartment. Cell phone GPS fixes are not accurate to the meter, so if a client is reporting the exact same start coords every launch, it's a big red flag.

I've just changed my launch shell script to edit the the coords starting at the 4th decimal point randomly.

The following bash script edits your config file with updated coords, then launches your bot and the web UI. Press any key to terminate both:

#!/bin/bash
cd $(dirname $0)
LATITUDE="START_COORD_HERE$(jot -r 1 0 999999)"
LONGITUDE="START_COORD_HERE$(jot -r 1 0 999999)"
echo $LATITUDE, $LONGITUDE
sed -i.bak "s/\(latitude *= *\).*/\1$LATITUDE/" config.properties
sed -i.bak "s/\(longitude *= *\).*/\1$LONGITUDE/" config.properties
java -jar PokemonGoBot-*.jar &
  gulp serve &
  read -n1 -r
pkill -P $$

If you want to copy/paste that into a shell script, be aware that it is for Mac OS X, requires that you have your bot, launching script, and the RocketTheme ui all in the same folder - and the UI has its dips already met and configured. (npm, bower, gulp) - and that you've put your base coords in the START_COORD_HERE spots.

patzor commented 8 years ago

all include this at the end of your script

it will run for 30 minutes only

timeout -k 1m 1800s java -jar PokemonGoBot-*.jar

FrancYescO commented 8 years ago

this will cause softbans if you close and restart fast (random points fetched are faraway, and spawn_radius big enough)

the bot will save the last location on exit (that not for sure is the same "stored" to the server, as it have a sort of local cache) so on start its already not identical to the one in the old session