Skip to content

Commit

Permalink
Merge pull request #5 from PokemonGoF/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
nivong authored Aug 24, 2016
2 parents e1c2a27 + fae2fb2 commit cdd9227
Show file tree
Hide file tree
Showing 33 changed files with 201 additions and 309 deletions.
21 changes: 11 additions & 10 deletions configs/config.json.cluster.example
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
"config": {
"enabled": true,
"min_free_slot": 5,
"transfer_wait_min": 1,
"transfer_wait_max": 4
"transfer_wait_min": 3,
"transfer_wait_max": 5
}
},
{
Expand All @@ -86,7 +86,8 @@
"evolve_above_cp": 500,
"evolve_above_iv": 0.8,
"logic": "or",
"evolve_speed": 20,
"min_evolve_speed": 25,
"max_evolve_speed": 30,
"use_lucky_egg": false
}
},
Expand All @@ -107,8 +108,8 @@
"Revive": { "keep" : 30 },
"Razz Berry": { "keep" : 100 }
},
"recycle_wait_min": 1,
"recycle_wait_max": 4
"recycle_wait_min": 3,
"recycle_wait_max": 5
}
},
{
Expand All @@ -130,12 +131,12 @@
"catch_simulation": {
"flee_count": 3,
"flee_duration": 2,
"catch_wait_min": 2,
"catch_wait_min": 3,
"catch_wait_max": 6,
"berry_wait_min": 2,
"berry_wait_max": 3,
"changeball_wait_min": 2,
"changeball_wait_max": 3
"berry_wait_min": 3,
"berry_wait_max": 5,
"changeball_wait_min": 3,
"changeball_wait_max": 5
}
}
},
Expand Down
21 changes: 11 additions & 10 deletions configs/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
"config": {
"enabled": true,
"min_free_slot": 5,
"transfer_wait_min": 1,
"transfer_wait_max": 4
"transfer_wait_min": 3,
"transfer_wait_max": 5
}
},
{
Expand All @@ -99,7 +99,8 @@
"evolve_above_cp": 500,
"evolve_above_iv": 0.8,
"logic": "or",
"evolve_speed": 20,
"min_evolve_speed": 25,
"max_evolve_speed": 30,
"use_lucky_egg": false
}
},
Expand All @@ -120,8 +121,8 @@
"Revive": { "keep" : 30 },
"Razz Berry": { "keep" : 100 }
},
"recycle_wait_min": 1,
"recycle_wait_max": 4
"recycle_wait_min": 3,
"recycle_wait_max": 5
}
},
{
Expand All @@ -145,12 +146,12 @@
"catch_simulation": {
"flee_count": 3,
"flee_duration": 2,
"catch_wait_min": 2,
"catch_wait_min": 3,
"catch_wait_max": 6,
"berry_wait_min": 2,
"berry_wait_max": 3,
"changeball_wait_min": 2,
"changeball_wait_max": 3
"berry_wait_min": 3,
"berry_wait_max": 5,
"changeball_wait_min": 3,
"changeball_wait_max": 5
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion configs/config.json.map.example
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
"evolve_above_cp": 500,
"evolve_above_iv": 0.8,
"logic": "or",
"evolve_speed": 20,
"min_evolve_speed": 25,
"max_evolve_speed": 30,
"use_lucky_egg": false
}
},
Expand Down
18 changes: 9 additions & 9 deletions configs/config.json.optimizer.example
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
"transfer": true,
"// 'transfer_wait_min' and 'transfer_wait_max' are the minimum and maximum": {},
"// time to wait when transferring a pokemon": {},
"transfer_wait_min": 2,
"transfer_wait_max": 4,
"transfer_wait_min": 3,
"transfer_wait_max": 5,
"// the 'evolve' parameter activate or deactivate the evolution of pokemons": {},
"// at false, no pokemon is going to be evolved, ever": {},
"// at false, you will still get the log information of what the": {},
Expand Down Expand Up @@ -169,8 +169,8 @@
"Revive": { "keep" : 30 },
"Razz Berry": { "keep" : 100 }
},
"recycle_wait_min": 1,
"recycle_wait_max": 4
"recycle_wait_min": 3,
"recycle_wait_max": 5
}
},
{
Expand All @@ -193,12 +193,12 @@
"catch_simulation": {
"flee_count": 3,
"flee_duration": 2,
"catch_wait_min": 2,
"catch_wait_min": 3,
"catch_wait_max": 6,
"berry_wait_min": 2,
"berry_wait_max": 3,
"changeball_wait_min": 2,
"changeball_wait_max": 3
"berry_wait_min": 3,
"berry_wait_max": 5,
"changeball_wait_min": 3,
"changeball_wait_max": 5
}
}
},
Expand Down
22 changes: 12 additions & 10 deletions configs/config.json.path.example
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
"config": {
"enabled": true,
"min_free_slot": 5,
"transfer_wait_min": 1,
"transfer_wait_max": 4
"transfer_wait_min": 3,
"transfer_wait_max": 5
}
},
{
Expand All @@ -86,7 +86,8 @@
"evolve_above_cp": 500,
"evolve_above_iv": 0.8,
"logic": "or",
"evolve_speed": 20,
"min_evolve_speed": 25,
"max_evolve_speed": 30,
"use_lucky_egg": false
}
},
Expand All @@ -107,8 +108,8 @@
"Revive": { "keep" : 30 },
"Razz Berry": { "keep" : 100 }
},
"recycle_wait_min": 1,
"recycle_wait_max": 4
"recycle_wait_min": 3,
"recycle_wait_max": 5
}
},
{
Expand All @@ -131,12 +132,12 @@
"catch_simulation": {
"flee_count": 3,
"flee_duration": 2,
"catch_wait_min": 2,
"catch_wait_min": 3,
"catch_wait_max": 6,
"berry_wait_min": 2,
"berry_wait_max": 3,
"changeball_wait_min": 2,
"changeball_wait_max": 3
"berry_wait_min": 3,
"berry_wait_max": 5,
"changeball_wait_min": 3,
"changeball_wait_max": 5
}
}
},
Expand All @@ -152,6 +153,7 @@
"type": "FollowPath",
"config": {
"enabled": true,
"walker": "StepWalker",
"path_mode": "loop",
"path_start_mode": "first",
"path_file": "configs/path.example.json",
Expand Down
18 changes: 9 additions & 9 deletions configs/config.json.pokemon.example
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
"config": {
"enabled": true,
"min_free_slot": 5,
"transfer_wait_min": 1,
"transfer_wait_max": 4
"transfer_wait_min": 3,
"transfer_wait_max": 5
}
},
{
Expand Down Expand Up @@ -107,8 +107,8 @@
"Revive": { "keep" : 30 },
"Razz Berry": { "keep" : 100 }
},
"recycle_wait_min": 1,
"recycle_wait_max": 4
"recycle_wait_min": 3,
"recycle_wait_max": 5
}
},
{
Expand All @@ -131,12 +131,12 @@
"catch_simulation": {
"flee_count": 3,
"flee_duration": 2,
"catch_wait_min": 2,
"catch_wait_min": 3,
"catch_wait_max": 6,
"berry_wait_min": 2,
"berry_wait_max": 3,
"changeball_wait_min": 2,
"changeball_wait_max": 3
"berry_wait_min": 3,
"berry_wait_max": 5,
"changeball_wait_min": 3,
"changeball_wait_max": 5
}
}
},
Expand Down
5 changes: 3 additions & 2 deletions docs/configuration_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ The behaviors of the bot are configured via the `tasks` key in the `config.json`
* `treat_unseen_as_vip`: Default `"true"` | Set to `"false"` to disable treating pokemons you don't have in your pokedex as VIPs.
* EvolvePokemon
* `evolve_all`: Default `NONE` | Set to `"all"` to evolve Pokémon if possible when the bot starts. Can also be set to individual Pokémon as well as multiple separated by a comma. e.g "Pidgey,Rattata,Weedle,Zubat"
* `evolve_speed`: Default `20`
* `min_evolve_speed`: Default `25` | Minimum seconds to wait between each evolution
* `max_evolve_speed`: Default `30` | Maximum seconds to wait between each evolution
* `use_lucky_egg`: Default: `False`
* FollowPath
* `path_mode`: Default `loop` | Set the mode for the path navigator (loop or linear).
Expand Down Expand Up @@ -494,7 +495,7 @@ If you want to make your bot behave as it did prior to the catch_simulation upda
### Description
[[back to top](#table-of-contents)]

This task will fetch current pokemon spawns from /raw_data of an PokemonGo-Map instance. For information on how to properly setup PokemonGo-Map have a look at the Github page of the project [here](https://github.com/AHAAAAAAA/PokemonGo-Map/). There is an example config in `config/config.json.map.example`
This task will fetch current pokemon spawns from /raw_data of an PokemonGo-Map instance. For information on how to properly setup PokemonGo-Map have a look at the Github page of the project [here](https://github.com/PokemonGoMap/PokemonGo-Map). There is an example config in `config/config.json.map.example`

### Options
[[back to top](#table-of-contents)]
Expand Down
Binary file modified map-chat/images/blue_marker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified map-chat/images/grey_marker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added map-chat/images/p/01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added map-chat/images/p/02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added map-chat/images/p/03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added map-chat/images/p/04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added map-chat/images/p/05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added map-chat/images/p/06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added map-chat/images/p/07.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added map-chat/images/p/08.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added map-chat/images/p/09.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions map-chat/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<body>

<!-- Google translate -->
<!-- Google translate
<div class="translation-wrapper hide-on-small-and-down">
Translation
<div id="google_translate_element" style="float: right; padding-left: 10px"></div>
Expand All @@ -34,11 +34,10 @@
}
</script>
<script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

<div class="navbar">
<nav>
<div class="nav-wrapper blue">
<a class="brand-logo center" href="http://idoco.github.io/map-chat/">MapChat</a>
<a class="brand-logo center" href="https://github.com/PokemonGoF/PokemonGo-Bot/tree/master/map-chat">MapChat</a>
<a id="side-nav-button" href="#" data-activates="side-nav"><i class="mdi-navigation-menu"></i></a>
<ul class="side-nav" id="side-nav">
<li>
Expand All @@ -63,9 +62,10 @@
</div>
</nav>
</div>
-->

<!--fork me link-->
<a href="https://github.com/idoco/map-chat/" class="hide-on-med-and-down">
<a href="https://github.com/PokemonGoF/PokemonGo-Bot/tree/master/map-chat" class="hide-on-med-and-down">
<img src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"
class="fork-me-link" alt="Fork me on GitHub">
</a>
Expand Down Expand Up @@ -111,7 +111,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.96.1/js/materialize.min.js"></script>
<script src="https://cdn.jsdelivr.net/sockjs/1.0.0/sockjs.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vertx/2.0.0/vertxbus.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&language=en"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCbS09u00uAutq-SzZFzwabK0ihFCFCwU0&v=3.exp&language=en"></script>

<script type="text/javascript" src="javascript/modernizr.custom.js"></script>
<script type="text/javascript" src="javascript/html-sanitizer-minified.js"></script>
Expand Down
11 changes: 7 additions & 4 deletions map-chat/javascript/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var urlHashTopic = location.hash ? location.hash.substring(1).toLowerCase() : nu
var topic = urlHashTopic ? urlHashTopic : "pgomapcatch/chat";

function initialiseEventBus(){
window.client = mqtt.connect('ws://test.mosca.io'); // you add a ws:// url here
window.client = mqtt.connect('ws://broker.pikabot.org'); // you add a ws:// url here
client.subscribe("pgomapcatch/#");

client.on("message", function(topic, payload) {
Expand All @@ -18,6 +18,7 @@ function initialiseEventBus(){
if(topic === 'pgomapcatch/chat'){
console.log('Chatting event')
displayChatMessageOnMap(payload)
Materialize.toast(payload, 5000);
} else {

//@ro: let's grab the message and split that shit. (simple for now, maybe we could just parse the json instead)
Expand All @@ -27,12 +28,14 @@ function initialiseEventBus(){
var olong = pLoadR2[1]
var sessid = pLoadR2[2]
var ico = pLoadR2[3]
var expir = pLoadR2[4]
var pokenick = pLoadR2[5]
var path = "./images/p/"
var icon = path+"0"+ico+".png"
var icostr = icon.toString();
//console.log(icostr)
var icostr = icon.toString();
//console.log(icostr)

displayMessageOnMap(payload, olat, olong, sessid, icostr);
displayMessageOnMap(payload, olat, olong, sessid, icostr, expir, pokenick);
}
});

Expand Down
Loading

0 comments on commit cdd9227

Please sign in to comment.