tibiamaps / tibia-map

:earth_americas: Online Tibia map viewer that uses the data from the tibia-map-data project.
https://tibiamaps.io/map
MIT License
25 stars 13 forks source link

[REQUEST] Range from selected coordinate #37

Open muriloricci opened 3 years ago

muriloricci commented 3 years ago

In Tibia, while in idle state, most NPCs will walk around in a random pattern however in a limited area. This area is set with a parameter on server side files for each NPC that compares the NPC start coording with N, where N is the "radius" in all directions from the starting coordinate.

For example, Cipfried, located at Rookgaard's temple (32088, 32217, 7), has a range set to 1, meaning he can only walk in the top 9 tiles from the temple (1 tile from the starting coordinate plus 8 tiles surrounding the starting coordinate).

Sem título

I believe a feature that a user could toggle a radius view of the selected point could be interesting. Perhaps not that much for the general public but fansite like TibiaWiki could benefit from that and make information richer. With that said, it should be possible for whoever is embedding the map to be able to toggle this feature via URL, similar to how one can just edit the selected coordinates.

Thank you for reading.

mathiasbynens commented 3 years ago

I like the idea!

Note that people can often drag NPCs (like Cipfried) out of their designated area. So even if the NPC would never walk there by himself, he could still end up there.

muriloricci commented 3 years ago

I like the idea!

Note that people can often drag NPCs (like Cipfried) out of their designated area. So even if the NPC would never walk there by himself, he could still end up there.

If you try to drag a NPC outside of the range the client will tell you "There is not enough room."

muriloricci commented 3 years ago

Another screenshot to perhaps make it more visual. Billy has a range of 3, so you can see his starting coordinate with the gold coin and the blueberries represent how far he can walk or be dragged to.

2021-05-04_205619133_Pictures_Hotkey

mathiasbynens commented 3 years ago

If you try to drag a NPC outside of the range the client will tell you "There is not enough room."

I might have gotten that wrong then. I was thinking of the temple NPC in Thais, who can be dragged pretty far. But then again maybe his area is just that wide?

muriloricci commented 3 years ago

If you try to drag a NPC outside of the range the client will tell you "There is not enough room."

I might have gotten that wrong then. I was thinking of the temple NPC in Thais, who can be dragged pretty far. But then again maybe his area is just that wide?

Just tested it now. Quentin's range is 4, so his limit is shown in the image below (I'm standing on his starting coordinate).

2021-05-04_234305258_Proost_Hotkey

mathiasbynens commented 1 year ago

@tiagomartines11 is this something you’d be interested in? It would be awesome to control this via a URL parameter.