RocketBot icon indicating copy to clipboard operation
RocketBot copied to clipboard

Egg Hatching and Incubating

Open Energex22 opened this issue 10 years ago • 4 comments

I think this would be a lovely setting to add...

I think that it is a major function/tool thing that could be added in. A bot that has the function working good is: https://github.com/NecronomiconCoding/NecroBot

Not sure if you could use the system there using or, make ur own...

Energex22 avatar Jul 30 '16 16:07 Energex22

Any ideas on how we can get this to work in current version?

raotskuhh avatar Jul 30 '16 21:07 raotskuhh

I'm not sure if this grabs the same JSON data as the python alternative script, but if so, its under GET_INVENTORY->inventory_delta->inventory_item_data->egg_incubators->egg_incubator.. start_km_walked is the total distance in km the player walked when this egg was incubated and target_km_walked is the total needed before it hatches.. you can do basic algebra to find out what distance egg it is and use the player stats to determine how much longer you need to walk. From what i could tell, this seems to be the only egg object even when multiple incubators are running, but it seems to be the last egg i incubated.. hope this helps save time digging through other's code.

Reisyukaku avatar Jul 31 '16 06:07 Reisyukaku

Would something like this do the trick or is this a false request?

var customRequest = new EggIncubator { ItemId = incubator.ItemId, IncubatorType = incubator.IncubatorType, ItemType = incubator.ItemType, PokemonId = egg.Id, StartKmWalked = totalWalkedDistance, TargetKmWalked = totalWalkedDistance + eggDistance, UsesRemaining = incubator.UsesRemaining - 1 };

        var useIncubatorRequest = RequestBuilder.GetRequest(_unknownAuth, _currentLat, _currentLng, 30,
            new Request.Types.Requests
            {
                Type = (int)RequestType.USE_ITEM_EGG_INCUBATOR,
                Message = customRequest.ToByteString()
            });
        return
            await
                _httpClient.PostProtoPayload<Request, EggIncubator>($"https://{_apiUrl}/rpc",
                    useIncubatorRequest);

raotskuhh avatar Jul 31 '16 08:07 raotskuhh

What version of pokemongo rocketapi is being used btw? Cause feroxrev has more features now a days

raotskuhh avatar Jul 31 '16 08:07 raotskuhh