Jump to content

Recommended Posts

New Version Out: 1.1.0

 

Change Log

 

1.1.0

- Added Plus, Minus, and Delete Actions (new feature)

- Improved Setup

- Improved Detection of Pokemon whose name starts with 'S'
- Added Double Click prevention for Start/Stop buttons

  • 1 month later...
On 7/28/2024 at 4:03 PM, Jatzbee said:

Poketime Awareness: Implement features to detect and adapt to Poketime for optimal spawn rates.

 

Just letting you know that this is more trivial than you might expect because it doesn't require any OCR at all. Pokétime simply advances 5 times faster than real time and is based off UTC. So midnight UTC is always gonna be midnight in-game. You can simply take the UTC time now, add up how many seconds have passed, multiply them by 4 and add them to the date. The result will be the Pokétime.

My description might be bad, so here is how you would do it in Java:

 

public static String pokeTime() {

    LocalDateTime date = LocalDateTime.now(ZoneId.of("UTC"));

    int secondsPassed = date.getHour() * 3600 + date.getMinute() * 60 + date.getSecond();

    secondsPassed *= 4;

    date = date.plusSeconds(secondsPassed);

    return String.format("%02d:%02d", date.getHour(), date.getMinute());

}

Edited by Karyoplasma
typo
  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...