kahopoon / Pokemon-Go-Controller

play pokemon go safely or at unavailable area
2.47k stars 275 forks source link

Does autoclick script work when running the controller on simulator? #19

Open wangjunji opened 8 years ago

wangjunji commented 8 years ago

I successfully run the controller on the simulator cuz I have only one ios device, but have to manually refresh the simulated location in Xcode by several clicks. I just wonder whether the autoclick script still works when running the controller on simulator cuz I have to click direction arrows to make movements. (Haven't tried that yet cuz it takes time to adjust x,y)

neoblizz commented 8 years ago

@wangjunji Can you post better instructions on how to run this? I am confused on how to start, but would like to try it out.

wangjunji commented 8 years ago

@neoblizz First set the controller ip to localhost http://127.0.0.1:8080 in readAndChangeXML.py (the default 80 port is disabled on Mac),and modify the according line in ViewController.swift

webServer.startWithPort(8080, bonjourName: "pokemonController")

then run the controller app in simulator and run readAndChangeXML.py in the terminal, you will see the gps logs in the terminal when make movements in the controller.(You'd better add an try..catch.. block in python script or it will raise timeout error if you don't operate the controller for a while) Then start a new single page application project in Xcode and connect your iphone to Mac with a usb cable. Add the gpx file generate by the python script to the project then run the app on your iphone just leave it at background then open Pokemon go. There is a location symbol(an arrow) at the bottom of Xcode for you to simulate location ,choose the pokemonLocation to refresh the location in Pokemon go when you make movements in the controller. Have a try.

neoblizz commented 8 years ago

Thank you so much @wangjunji, will try it out.

EmDee commented 8 years ago

@wangjunji I'm pretty sure that you cannot, which is why it is recommended to use a second iDevice. As you've already said, you have to use the arrow keys in the simulator to move around, but all the autoclick script does is click at the given (x,y) position. So you can't move and refresh the location at the same time, at least not with the autoclicker.