SHOW:
|
|
- or go back to the newest paste.
1 | - | PokemonGoMITM = require './lib/pokemon-go-mitm' |
1 | + | TheNeonKiwi = require './lib/TheNeonKiwi' |
2 | ||
3 | interrested = ['Encounter', 'EvolvePokemon', 'CatchPokemon', 'GetInventory'] | |
4 | - | addPokemon = false |
4 | + | addPokemon = true |
5 | pokemontoevolve = 0 | |
6 | cnt = 0 | |
7 | ||
8 | server = new PokemonGoMITM port: 8090 | |
9 | .addRequestHandler "*", (data, action) -> | |
10 | console.log "[<-] Request for #{action} ", data, "\n" unless action not in interrested | |
11 | false | |
12 | ||
13 | .addResponseHandler "*", (data, action) -> | |
14 | console.log "[->] Response for #{action} ", JSON.stringify(data, null, 4), "\n" unless action not in interrested | |
15 | false | |
16 | ||
17 | .addResponseHandler "GetInventory", (data) -> | |
18 | cnt++ | |
19 | console.log "Update number ", cnt | |
20 | if addPokemon | |
21 | console.log "Going to add Pokemon!" | |
22 | if data.inventory_delta | |
23 | if cnt > 5 | |
24 | console.log "Adding candy!" | |
25 | - | data.inventory_delta.new_timestamp_ms += 50 |
25 | + | data.inventory_delta.new_timestamp_ms += 1000000 |
26 | data.inventory_delta.inventory_items.push | |
27 | modified_timestamp_ms: data.inventory_delta.new_timestamp_ms | |
28 | inventory_item_data: | |
29 | candy: { | |
30 | family_id: "MEW" | |
31 | candy: 3 | |
32 | } | |
33 | data.inventory_delta.inventory_items.push | |
34 | modified_timestamp_ms: data.inventory_delta.new_timestamp_ms | |
35 | inventory_item_data: | |
36 | candy: { | |
37 | - | family_id: "EKANS" |
37 | + | family_id: "Pidgey" |
38 | candy: 73 | |
39 | } | |
40 | ||
41 | if addPokemon | |
42 | console.log "Going to add Pokemon!" | |
43 | data.inventory_delta.new_timestamp_ms += 500 | |
44 | data.inventory_delta.inventory_items.push | |
45 | modified_timestamp_ms: data.inventory_delta.new_timestamp_ms | |
46 | inventory_item_data: | |
47 | pokemon_data: { | |
48 | id: pokemontoevolve | |
49 | pokemon_id: "MEWTWO" | |
50 | cp: 3299 | |
51 | stamina: 714 | |
52 | stamina_max: 714 | |
53 | move_1: "PSYSHOCK" | |
54 | move_2: "HYPER_BEAM" | |
55 | height_m: 1.1 | |
56 | weight_kg: 0.91 | |
57 | captured_cell_id: 5064635525547163648 | |
58 | creation_time_ms: 1469196525585 | |
59 | pokeball: "ITEM_GREAT_BALL" | |
60 | individual_attack: 15 | |
61 | individual_deffence: 15 | |
62 | individual_stamina: 15 | |
63 | cp_multiplier: 1.0 | |
64 | num_upgrades: 1 | |
65 | } | |
66 | data.inventory_delta.inventory_items.push | |
67 | modified_timestamp_ms: data.inventory_delta.new_timestamp_ms | |
68 | inventory_item_data: | |
69 | pokedex_entry: { | |
70 | pokemon_id: "MEW" | |
71 | times_encountered: 1 | |
72 | times_captured: 1 | |
73 | } | |
74 | addPokemon = false | |
75 | data | |
76 | ||
77 | .addRequestHandler "EvolvePokemon", (data) -> | |
78 | console.log "Trying to evolve!" | |
79 | pokemontoevolve = parseInt(data.pokemon_id)+20 | |
80 | addPokemon = true | |
81 | data | |
82 | ||
83 | .addResponseHandler "EvolvePokemon", (data) -> | |
84 | console.log "Evolve Responce!" | |
85 | data.result = "SUCCESS" | |
86 | data.experience_awarded = 1000 | |
87 | data.candy_awarded = 3 | |
88 | data.evolved_pokemon_data = { | |
89 | id: pokemontoevolve | |
90 | pokemon_id: "MEWTWO" | |
91 | cp: 3299 | |
92 | stamina: 714 | |
93 | stamina_max: 714 | |
94 | move_1: "PSYSHOCK" | |
95 | move_2: "HYPER_BEAM" | |
96 | height_m: 1.1 | |
97 | weight_kg: 0.91 | |
98 | captured_cell_id: "5064635525547163648" | |
99 | creation_time_ms: "1469196525585" | |
100 | pokeball: "ITEM_GREAT_BALL" | |
101 | individual_attack: 15 | |
102 | individual_deffence: 15 | |
103 | individual_stamina: 15 | |
104 | cp_multiplier: 1.0 | |
105 | num_upgrades: 1 | |
106 | } | |
107 | console.log data | |
108 | data |