Guest User

Untitled

a guest
Jul 29th, 2016
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.05 KB | None | 0 0
  1. Walk.kt line 79
  2. bot.runLoop(timeout, "WalkingLoop") { cancel ->
  3. Thread.sleep(200)
  4. // don't run away when there are still Pokemon around
  5. if(walking) {
  6. if(bot.api.map.getCatchablePokemon(ctx.blacklistedEncounters).size > 0 && settings.shouldCatchPokemons) {
  7. // Stop walking
  8. walking = false
  9. Log.normal("Pausing to catch pokemon...")
  10. } // Else continue walking.
  11. } else {
  12. if(bot.api.map.getCatchablePokemon(ctx.blacklistedEncounters).size <= 0) {
  13. walking = true
  14. Log.normal("Resuming walk.")
  15. ......
  16.  
  17. Bot.kt line 104
  18. runLoop(TimeUnit.SECONDS.toMillis(settings.profileUpdateTimer), "ProfileLoop") {
  19. task(profile)
  20. Thread.sleep(500)
  21. task(hatchEggs)
  22. Thread.sleep(500)
  23. }
  24.  
  25. runLoop(TimeUnit.SECONDS.toMillis(5), "BotLoop") {
  26. task(keepalive)
  27. Thread.sleep(200)
  28. if (settings.shouldCatchPokemons){
  29. task(catch)
  30. Thread.sleep(200)
  31. }
  32. if (settings.shouldDropItems) {
  33. task(drop)
  34. Thread.sleep(200)
  35. }
  36. if (settings.shouldAutoTransfer) {
  37. task(release)
  38. Thread.sleep(200)
  39. }
  40.  
  41. task(process)
  42. Thread.sleep(200)
  43. }
  44. .......
  45.  
  46. Bot.kt fun runLoop
  47. while (!cancelled && isRunning()) {
  48. Thread.sleep(200)
  49. val start = api.currentTimeMillis()
  50.  
  51. try {
  52. block({ cancelled = true })
  53. } catch (t: Throwable) {
  54. Log.red("Error running loop $name!")
  55. t.printStackTrace()
  56. }
  57. ......
  58.  
  59. Main.kt line 34
  60. val auth = if (username.contains('@')) {
  61. if (token.isBlank()) {
  62. GoogleAutoCredentialProvider(http, username, password, time)
  63. } else {
  64. GoogleUserCredentialProvider(http, token, time)
  65. }
  66. ......
  67.  
  68. config.properties
  69. # PTC/Google login credentials
  70. username=<using google login>
  71.  
  72. # Choose plaintext or base64'd password
  73. password=
  74. #base64_password=
  75.  
  76. # Token to login directly
  77. token=
  78.  
  79. latitude=-6.174721
  80. longitude=106.827129
  81.  
  82. # desired probability to catch Pokemon with 1 throw
  83. desired_catch_probability=0.8
  84.  
  85. # desired probability to catch unwanted Pokemon (obligatory_transfer; low IV; low CP)
  86. # set to -1 to not attempt catching at all
  87. desired_catch_probability_unwanted=0.8
  88.  
  89. # number of nearest unused pokestops to randomly select
  90. # the next pokestop from (1/infinite)
  91. random_next_pokestop_selection=5
  92.  
  93. ## Walking
  94. # Meters per second
  95. speed=2
  96.  
  97. # Should the bot loot the pokestops (true/false)
  98. loot_pokestop=true
  99.  
  100. # Should the bot catch pokemons (true/false)
  101. catch_pokemon=true
  102.  
  103. # Should the bot auto fill incubators with eggs (true/false)
  104. auto_fill_incubator=true
  105.  
  106. ## Items drop
  107. # should the bot EVER drop items (true/false)
  108. drop_items=true
  109.  
  110. # max number of each item that the bot should keep if "drop_items" is enabled
  111. # use -1 in a item to never drop this specific item
  112. item_revive=20
  113. item_max_revive=10
  114. item_potion=0
  115. item_super_potion=0
  116. item_hyper_potion=50
  117. item_max_potion=50
  118. item_poke_ball=50
  119. item_great_ball=50
  120. item_ultra_ball=-1
  121. item_master_ball=-1
  122. item_razz_berry=50
  123.  
  124. ## Extra Info
  125. # should the bot display rewards pokestop (true/false)
  126. display_pokestop_rewards=true
  127.  
  128. # should the bot display rewards when catching pokemon (true/false)
  129. display_pokemon_catch_rewards=true
  130.  
  131. # Display Keepalive Coordinates
  132. display_keepalive=true
  133.  
  134. # should the bot display information of where it's walking to (true/false)
  135. # this will show the name of the pokestop that it's walking to and
  136. # replace on the loot log the pokestop id for its name
  137. # WARNING: this will increase the https requests without any need. if
  138. # the servers are slow it's recommended to turn off this setting
  139. display_pokestop_name=false
  140.  
  141. ## Pokemon Transfer
  142. # should the bot auto transfer duplicate pokemon
  143. autotransfer=true
  144.  
  145. # minimum amount of pokemon type to keep
  146. keep_pokemon_amount=2
  147.  
  148. # maximum amount of pokemon type to keep (-1 to keep all)
  149. max_pokemon_amount=-1
  150.  
  151. # Sort by IV first instead of CP
  152. sort_by_iv=false
  153.  
  154. # Always throw curveballs
  155. always_curve=false
  156.  
  157. # Never use berries
  158. never_use_berries=true
  159.  
  160. # Allow leaving the starting area
  161. allow_leave_start_area=false
  162.  
  163. # Max distance from starting point the bot should ever go in meters
  164. # (-1: only limited by the initial pokestops (~3*3km); with allow_leave_start_area=true unlimited)
  165. spawn_radius=-1
  166.  
  167. # Set Profile Update Timer (Default: 60)
  168. profile_update_timer=60
  169.  
  170. # Minimum IV percentage to keep a pokemon (to ignore IV: use -1)
  171. # between 0 and 100, suggested 80
  172. transfer_iv_threshold=-1
  173.  
  174. # Minimum CP to keep a pokemon (to ignore CP: use -1)
  175. transfer_cp_threshold=2000
  176.  
  177. # list of pokemon you don't want to transfer regardless of CP
  178. # the names must be divided by a ","
  179. # if you want all pokemons to be transferred just leave it blank
  180. ignored_pokemon=MEW,MEWTWO
  181.  
  182. # list of pokemon you always want to transfer regardless of CP
  183. obligatory_transfer=DODUO,RATTATA,CATERPIE,PIDGEY,ZUBAT,WEEDLE
  184.  
  185. # port where the webserver (gui) should listen, 0 = do not listen
  186. gui_port=0
  187. # port where the socketserver should listen, 0 = do not listen
  188. gui_port_socket=0
  189.  
  190. #List of pokemon names
  191. #MISSINGNO
  192. #BULBASAUR
  193. #IVYSAUR
  194. #VENUSAUR
  195. #CHARMANDER
  196. #CHARMELEON
  197. #CHARIZARD
  198. #SQUIRTLE
  199. #WARTORTLE
  200. #BLASTOISE
  201. #CATERPIE
  202. #METAPOD
  203. #BUTTERFREE
  204. #WEEDLE
  205. #KAKUNA
  206. #BEEDRILL
  207. #PIDGEY
  208. #PIDGEOTTO
  209. #PIDGEOT
  210. #RATTATA
  211. #RATICATE
  212. #SPEAROW
  213. #FEAROW
  214. #EKANS
  215. #ARBOK
  216. #PIKACHU
  217. #RAICHU
  218. #SANDSHREW
  219. #SANDSLASH
  220. #NIDORAN_FEMALE
  221. #NIDORINA
  222. #NIDOQUEEN
  223. #NIDORAN_MALE
  224. #NIDORINO
  225. #NIDOKING
  226. #CLEFAIRY
  227. #CLEFABLE
  228. #VULPIX
  229. #NINETALES
  230. #JIGGLYPUFF
  231. #WIGGLYTUFF
  232. #ZUBAT
  233. #GOLBAT
  234. #ODDISH
  235. #GLOOM
  236. #VILEPLUME
  237. #PARAS
  238. #PARASECT
  239. #VENONAT
  240. #VENOMOTH
  241. #DIGLETT
  242. #DUGTRIO
  243. #MEOWTH
  244. #PERSIAN
  245. #PSYDUCK
  246. #GOLDUCK
  247. #MANKEY
  248. #PRIMEAPE
  249. #GROWLITHE
  250. #ARCANINE
  251. #POLIWAG
  252. #POLIWHIRL
  253. #POLIWRATH
  254. #ABRA
  255. #KADABRA
  256. #ALAKAZAM
  257. #MACHOP
  258. #MACHOKE
  259. #MACHAMP
  260. #BELLSPROUT
  261. #WEEPINBELL
  262. #VICTREEBEL
  263. #TENTACOOL
  264. #TENTACRUEL
  265. #GEODUDE
  266. #GRAVELER
  267. #GOLEM
  268. #PONYTA
  269. #RAPIDASH
  270. #SLOWPOKE
  271. #SLOWBRO
  272. #MAGNEMITE
  273. #MAGNETON
  274. #FARFETCHD
  275. #DODUO
  276. #DODRIO
  277. #SEEL
  278. #DEWGONG
  279. #GRIMER
  280. #MUK
  281. #SHELLDER
  282. #CLOYSTER
  283. #GASTLY
  284. #HAUNTER
  285. #GENGAR
  286. #ONIX
  287. #DROWZEE
  288. #HYPNO
  289. #KRABBY
  290. #KINGLER
  291. #VOLTORB
  292. #ELECTRODE
  293. #EXEGGCUTE
  294. #EXEGGUTOR
  295. #CUBONE
  296. #MAROWAK
  297. #HITMONLEE
  298. #HITMONCHAN
  299. #LICKITUNG
  300. #KOFFING
  301. #WEEZING
  302. #RHYHORN
  303. #RHYDON
  304. #CHANSEY
  305. #TANGELA
  306. #KANGASKHAN
  307. #HORSEA
  308. #SEADRA
  309. #GOLDEEN
  310. #SEAKING
  311. #STARYU
  312. #STARMIE
  313. #MR_MIME
  314. #SCYTHER
  315. #JYNX
  316. #ELECTABUZZ
  317. #MAGMAR
  318. #PINSIR
  319. #TAUROS
  320. #MAGIKARP
  321. #GYARADOS
  322. #LAPRAS
  323. #DITTO
  324. #EEVEE
  325. #VAPOREON
  326. #JOLTEON
  327. #FLAREON
  328. #PORYGON
  329. #OMANYTE
  330. #OMASTAR
  331. #KABUTO
  332. #KABUTOPS
  333. #AERODACTYL
  334. #SNORLAX
  335. #ARTICUNO
  336. #ZAPDOS
  337. #MOLTRES
  338. #DRATINI
  339. #DRAGONAIR
  340. #DRAGONITE
  341. #MEWTWO
  342. #MEW
Add Comment
Please, Sign In to add comment