adipiciu / Travian-scripts

Userscripts for Travian. Resource bar plus. Wave builder. Task queue.
GNU General Public License v3.0
38 stars 23 forks source link

M+ #35

Closed EmptySD closed 1 year ago

EmptySD commented 1 year ago

Is there a way to make an input in new market place? I tried the following: val, focus+input, trigger: keydown, keypress, keyup, change, text, textInput, ajax post directly to send script, different headers, etc. Nothing seams to work.

adipiciu commented 1 year ago

They added some script functions in the game. I still need to add the market summary back and the memory button at least. But it will take some time.

adipiciu commented 1 year ago

It does not work because extensions are isolated from the page events. You can simulate or break the isolation, but another problem is that travian sends server requests to validate the coordinates. Travian can catch bots and scripts if they validate both X and Y fields in a short time.

adipiciu commented 1 year ago

Added basic M(emory) button on market. Not fully functional. Only autocompletes resources needed. Village coordinates are not updated. The resources in the memory are not cleared after sending.

EmptySD commented 1 year ago

It does not work because extensions are isolated from the page events. You can simulate or break the isolation, but another problem is that travian sends server requests to validate the coordinates. Travian can catch bots and scripts if they validate both X and Y fields in a short time.

Is there a reason why do you fill in XY? That parameters can always be fetched from URL (by marketplace) in format of xy or map id.

adipiciu commented 1 year ago

Because the M function will refresh the page if it's using the url coordinates.

adipiciu commented 1 year ago

Also M stores the coordinates of the village where the resources are needed.

adipiciu commented 1 year ago

Fixed in 2.23.6