adipiciu / Travian-scripts

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

Bug in links #9

Closed Qussayyon closed 2 years ago

Qussayyon commented 2 years ago

Hi @adipiciu,

There is a bug when using script in latest version of travian 4.4 if you are in hero view but not in main view, so you are at: travian.com/hero/attributes, or travian.com/hero/attributes, or travian.com/hero/adventures, or travian.com/hero/auction, but not: travian.com/hero then you click on any link from links provided by script, then it will not go to desired target. because the link is broken, it become like this: travian.com/hero/karte.php?d=71622 . Which keeps you in hero view, I think because it's only cutting last part of URL.

Thanks in advance.

adipiciu commented 2 years ago

Hi,

This seems to be a bug in travian. You can see they have the same problem with the links from the village links in the right menu. The script is just using the travian links it gets from the game.

Qussayyon commented 2 years ago

Hi,

You mean the links they have in Travian plus?

I did not try it actually, nonetheless, we can fix it in script.

BTW: Do you use any specific IDE to help you developing this script?

Qussayyon commented 2 years ago

I just tried travian's links system: As you see in picture, you need put whole link, if it is a link to another village.

Screenshot 2021-11-16

adipiciu commented 2 years ago

I am speaking about the travian village list. It has the same behavior. The script just reads what travian puts in the village list links. image

Qussayyon commented 2 years ago

I'm talking about the links from (+) feature 2021-11-19__12-46-15__+0800 :

if you have a link to: travian.com/karte.php?d=71622

It will become: travian.com/hero/karte.php?d=71622

adipiciu commented 2 years ago

Ok, I will try to fix the bug in the next version.

Qussayyon commented 2 years ago

Thank you very much @adipiciu,

if you do not mind: Do you use any specific IDE/application to help you developing this script?

adipiciu commented 2 years ago

if you do not mind: Do you use any specific IDE/application to help you developing this script?

Started with Notepad++, now using Visual Code with various extensions.

Qussayyon commented 2 years ago

great, is it possible to share the extensions related to developing scripts? 😅

adipiciu commented 2 years ago

I don't use any javascript extension, as Visual Code has syntax highlighting by default. Bu there are many extension that you can use, like ESLint for code validation.

Qussayyon commented 2 years ago

ok, great, thank you very much.

adipiciu commented 2 years ago

Fixed.

Qussayyon commented 2 years ago

Thanks. Appreciated.