{"action":"opened","issue":{"url":"https://api.github.com/repos/rastapasta/pokemon-go-mitm/issues/225","repository_url":"https://api.github.com/repos/rastapasta/pokemon-go-mitm","labels_url":"https://api.github.com/repos/rastapasta/pokemon-go-mitm/issues/225/labels{/name}","comments_url":"https://api.github.com/repos/rastapasta/pokemon-go-mitm/issues/225/comments","events_url":"https://api.github.com/repos/rastapasta/pokemon-go-mitm/issues/225/events","html_url":"https://github.com/rastapasta/pokemon-go-mitm/issues/225","id":174567412,"number":225,"title":"Script dosent work","user":{"login":"AlexTheCoder007","id":20967559,"avatar_url":"https://avatars.githubusercontent.com/u/20967559?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexTheCoder007","html_url":"https://github.com/AlexTheCoder007","followers_url":"https://api.github.com/users/AlexTheCoder007/followers","following_url":"https://api.github.com/users/AlexTheCoder007/following{/other_user}","gists_url":"https://api.github.com/users/AlexTheCoder007/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexTheCoder007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexTheCoder007/subscriptions","organizations_url":"https://api.github.com/users/AlexTheCoder007/orgs","repos_url":"https://api.github.com/users/AlexTheCoder007/repos","events_url":"https://api.github.com/users/AlexTheCoder007/events{/privacy}","received_events_url":"https://api.github.com/users/AlexTheCoder007/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-01T16:23:41Z","updated_at":"2016-09-01T16:23:41Z","closed_at":null,"body":"PokemonGoMITM = require './lib/pokemon-go-mitm'\r\nserver = new PokemonGoMITM port: 8081\r\n\r\n\r\n    .addRequestHandler \"*\", (data, action) ->\r\n        console.log \"[<-] Request for #{action} \", data, \"\\n\" unless action not in interrested\r\n        false\r\n \r\n    .addResponseHandler \"*\", (data, action) ->\r\n        console.log \"[->] Response for #{action} \", JSON.stringify(data, null, 4), \"\\n\" unless action not in interrested\r\n        false\r\n   \r\n    .addResponseHandler \"GetInventory\", (data) ->\r\n        cnt++\r\n        console.log \"Update number \", cnt\r\n        if addPokemon\r\n            console.log \"Going to add Pokemon!\"\r\n        if data.inventory_delta\r\n            if cnt > 5\r\n                console.log \"Adding candy!\"\r\n                data.inventory_delta.new_timestamp_ms += 50\r\n                data.inventory_delta.inventory_items.push  \r\n                    modified_timestamp_ms: data.inventory_delta.new_timestamp_ms\r\n                    inventory_item_data:\r\n                        candy: {\r\n                            family_id: \"MEW\"\r\n                            candy: 3       \r\n                        }\r\n                data.inventory_delta.inventory_items.push  \r\n                    modified_timestamp_ms: data.inventory_delta.new_timestamp_ms\r\n                    inventory_item_data:\r\n                        candy: {\r\n                            family_id: \"EKANS\"\r\n                            candy: 73      \r\n                        }\r\n               \r\n            if addPokemon\r\n                console.log \"Going to add Pokemon!\"\r\n                data.inventory_delta.new_timestamp_ms += 500\r\n                data.inventory_delta.inventory_items.push\r\n                    modified_timestamp_ms: data.inventory_delta.new_timestamp_ms\r\n                    inventory_item_data:\r\n                        pokemon_data: {\r\n                            id: pokemontoevolve\r\n                            pokemon_id: \"MEWTWO\"\r\n                            cp: 3299\r\n                            stamina: 714\r\n                            stamina_max: 714\r\n                            move_1: \"PSYSHOCK\"\r\n                            move_2: \"HYPER_BEAM\"\r\n                            height_m: 1.1\r\n                            weight_kg: 0.91\r\n                            captured_cell_id: 5064635525547163648\r\n                            creation_time_ms: 1469196525585\r\n                            pokeball: \"ITEM_GREAT_BALL\"\r\n                            individual_attack: 15\r\n                            individual_deffence: 15\r\n                            individual_stamina: 15 \r\n                            cp_multiplier: 1.0     \r\n                            num_upgrades: 1        \r\n                        }\r\n                data.inventory_delta.inventory_items.push\r\n                    modified_timestamp_ms: data.inventory_delta.new_timestamp_ms               \r\n                    inventory_item_data:\r\n                        pokedex_entry: {\r\n                            pokemon_id: \"MEW\"\r\n                            times_encountered: 1                       \r\n                            times_captured: 1\r\n                        }\r\n                addPokemon = false\r\n        data\r\n   \r\n    .addRequestHandler \"EvolvePokemon\", (data) ->\r\n        console.log \"Trying to evolve!\"\r\n        pokemontoevolve = parseInt(data.pokemon_id)+20\r\n        addPokemon = true\r\n        data\r\n   \r\n    .addResponseHandler \"EvolvePokemon\", (data) ->\r\n        console.log \"Evolve Responce!\"\r\n        data.result = \"SUCCESS\"\r\n        data.experience_awarded = 1000\r\n        data.candy_awarded = 3\r\n        data.evolved_pokemon_data = {\r\n            id: pokemontoevolve\r\n            pokemon_id: \"MEWTWO\"\r\n            cp: 3299\r\n            stamina: 714\r\n            stamina_max: 714\r\n            move_1: \"PSYSHOCK\"\r\n            move_2: \"HYPER_BEAM\"\r\n            height_m: 1.1\r\n            weight_kg: 0.91\r\n            captured_cell_id: \"5064635525547163648\"\r\n            creation_time_ms: \"1469196525585\"\r\n            pokeball: \"ITEM_GREAT_BALL\"\r\n            individual_attack: 15\r\n            individual_deffence: 15\r\n            individual_stamina: 15 \r\n            cp_multiplier: 1.0     \r\n            num_upgrades: 1\r\n        }\r\n        console.log data\r\n        data\r\n\r\nany advice?"}}
{"actor":{"display_login":"AlexTheCoder007"}}