Forgottenserver: Exiva formula is not correct

Created on 7 Mar 2017  路  9Comments  路  Source: otland/forgottenserver

Before creating an issue, please ensure:

  • [x] This is a bug in the software that resides in this repository, and not a
    support matter (use https://otland.net/forums/support.16/ for support)
  • [x] This issue is reproducible without changes to the code in this repository

Steps to reproduce (include any configuration/script required to reproduce)

  1. Exiva a player that is 32 squares from where you are.
  2. Message says that is far.

Expected behaviour

Should not say that player is far.

According with tibiawiki:

  • is 1 to 4 squares away: [Player] is standing next to you.
  • is 5 to 100 squares away: [Player] is to the north/east/south/west.
  • is 101 to 274 squares away: [Player] is far to the north/east/south/west.
  • is over 275 squares away: [Person] is very far to the north/east/south/west.
  • has moved 5+ squares in any direction away from directly south, north, east or west of you: [Player] is to the north-west/north-east/south-west/south-east.

Actual behaviour

Say that player is far.

Environment

Using Ubuntu 15.04 (64 bits)

bug

All 9 comments

Have you verified these changes?
The "source link" is dead and if you ask me I can't see any atleast major diffrences with out formulas compared to ... .

What changes are you refering? To LUA? If yes, that is exactly what I'm refering about. The old code in C++ you can find here.

The changes are the same, I did that Lua* port.
I ment that did you test it in RL and the changes being what you said, changes to the value of tiles x, y.

I didn't had time to test it yet but three different wikis (english, portuguese and polish) says what I said above about the squares, so it is pretty much legit.

One of them might have made it up and the rest follows and uses them as source, please verify it.
When you have I can update the script.

I really doubt about that.

Away like 40 squares.

Out side Thais.


With our code, if the player is in the depot and the other is in the boat already says far.

Keep in mind that the player is in the Depot:

Credits to @Mkalo for provided the screenshots.

It's because the formula is calculating distances radially, but Tibia is a square game. The formula is actually pretty wrong if you compare to the wiki, and the wiki is probably more correct than old scripts.

This issue won't have a label? @ranisalt

I can take a look at this later (with a thorough research beforehand), but no promises...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EPuncker picture EPuncker  路  5Comments

souzajunior picture souzajunior  路  4Comments

EPuncker picture EPuncker  路  3Comments

Olrios picture Olrios  路  4Comments

marksamman picture marksamman  路  3Comments