Fruit Walk Waypoints

KakLo

Old
Joined
May 18, 2012
Posts
63
Location
n00bs Corner
Avatar Name
Kaka kLara Lost
Hello EU,

I want to share a script with those of you who spend a lot of time in searching for fruit and stones. It's amateurish and ugly written, but it works (most of the time).

In short - the script reads the EU's chat log and registers the finds of fruit, stones or dung. Also (when you have some data, already), it will show a waypoint to the closest location where you have ever found something.
That doesn't guarantee anything. It just will lead you to the places that may be good to be checked.

https://drive.google.com/open?id=1zLWEmDsksd-HYszX7TSckFZpoiwsQ82C

With the fruit price, falling everyday, maybe it not worth at all.
However, if you are interested, here is some more explanation.

To run the script, you will need:
- latest Python 3 (3.8 currently);
- pywin32 module as addition to the Python;
- "Enable Main Chat Logging" option in the EU interface;

- "walk_wps.py" - the main script.
When you pick up something, the script registers your position, pressing "position key" and saves the data to an <area>.wps file.
The script also shows the closest waypoint of interest to the point or area, where you have found fruit, stones or dung before. When you reach (or manually remove) that point/area, the next will be shown.
(to start a waypoint chain, you must get your position with pressing a "position" key).

- "wps_register.py" - assisting script.
This script only registers (in the main chat), the "pick up" positions, by pressing the "position key".

- "wps_from_chat.py" - assisting script.
This script can rebuild the <area>.wps files from the main or saved "chat.log"s. (the chat must contain a "position" in less than 5 seconds after the "pick up" time. The position may be entered manually or by using of "walk_wps.py" or "wps_register.py" scripts).

- "directkeys.py" - a necessary file with functions, responsible for simulating a key press/release. Used in the main "walk_wps.py" script.

- "cfg.py" - a file with configuration settings:
* 'chat_log' - full path to the main 'chat.log' (if the scripts are not placed in the same directory where the chat is);
* 'startup_shutdown_delay' in seconds - the time the script will wait for the EU to be started or restarted (on crash) and the time before the script to automatically closes, when the EU is stopped (or crashed);
* 'position_key' - your 'position' key in EU settings;
* 'spot_radius' in meters - when the two or more waypoints are in distance of given radius from each other, a center point (SPOT) will be calculated and shown. If two or more SPOTs are in a radius distance, a SQUARE (a wider spot) point will be calculated.
* 'dates' - here you can filter (by date) the waypoints shown. Will be shown only points which are found on dates between 'start' and 'end' 'week's or 'day's back. Zero means no filter. The present day is excluded by default.
* 'materials' - here you can filter (by type) the waypoints shown. 'yes' to be included, something else, to be excluded (when SPOTs are calculated, all types are considered/included, regardless the filter).
* VK_CODE - some virtual key codes (in case you are using a different 'position' key). 'Enter', 'Ctrl' and 'v' are necessary for the script to work.

- "Calypso.wps" - a file with few sample points for testing purposes. (I have almost 4k points and no exact matches for now).

- 'daily.wps' - there will be a file holding your waypoints reached for the day, and they will be skipped, if/when the script reloads.

Additional notes:

- to place the waypoints on the EU map, the script hits 'Enter' (to bring chat window on focus), 'Ctrl+v' (to paste the waypoint in the chat window) and 'Enter' again (to place the waypoint on the map). That way, if the chat window lose the focus somewhere in the process, the waypoint may fail to appear. In that case, just press the 'position' key again.

- the script doesn't read your keyboard or send any data over the net. It just simulate key press/release when needed. Of course, it will need permissions to write to the disk.

- if you press the 'session' key, the script will restart.

- if you don't want to skip a specific waypoint, because of mobs or something else, you must remove it from the map manually. This will give you a new one.

- sometime, the map window get bugged and stops working. You must close and reopen it.

- to avoid a lag, it will be good to keep the main 'chat.log' as small as possible. Delete or rename it once a week or two.

- if you find a bug or want to advise me about programming, let me know.

- if you buy all my fruit at 3 p/k, I will give you my data collection (I'm leaving the game, anyway).

Good luck.
 
Seems your script interact with game directly which is not allowed you need to get permission from MA.
 
Back
Top