Nic Lin's Blog

喜歡在地上滾的工程師

如何在 MacOS 上運行 pokemon bot (已失效)

打開terminal,安裝一些依賴套件

安裝 HomeBrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

安裝 Wget brew install wget

安裝 Java brew cask install java

切換至家目錄,輸入 cd, 並且創建一個待會要用的資料夾,輸入 mkdir pokebot 並且進入這個資料夾,cd pokebot,輸入 wget https://github.com/jabbink/PokemonGoBot/releases/download/v0.5.0/PokemonGoBot-0.5.0.jar

再來下載設定所需檔案 wget https://raw.githubusercontent.com/jabbink/PokemonGoBot/master/config.properties.template

將範例檔案名稱變更 mv config.properties.template config.properties

輸入 vi config.properties,並且按下i修改其內容


# PTC/Google login credentials
username=xxxx@gmail.com  <--輸入你的pokemon go 使用的google信箱

# Choose plaintext or base64'd password
password=12345678 <-- 輸入密碼

# Token to login directly
token=0
latitude=24.976146 輸入經緯度
longitude=121.515691

....
....

修改好後按下ESC並且:wq存檔

然後執行 java -jar PokemonGoBot-0.5.0.jar

沒意外就會看到程式運行了,如果有一點操作虛擬機的基礎,可以到aws上設置到自動運行,不過還需要搭配screen跟防斷線shell腳本就是了

參考來源: jabbink/PokemonGoBot

comments powered by Disqus