Travian NPC-AddIn

By Toxon Last update Aug 11, 2008 — Installed 117,195 times.

leseSpielerNamen speed increase

in
Subscribe to leseSpielerNamen speed increase 2 posts, 1 voice



anderman User

This is much faster:

function leseSpielerNamen() {
// liest den Spielernamen aus dem Chat - Link aus

spieler = String( find('//td[@class="menu"]/a[@target="_blank"][2]',XPFirst) ).split('|')[1];
}

The problem is that its kind of tied to the target attribute "_blank". It could be changed to use the href attribute instead of the target attribute looking for "/chat/?chatname=".

 
anderman User

This looks for the chat instead of using indexing:


spieler = String( find('//td[@class="menu"]/a[contains(@href,"/chat/?chatname=")]',XPFirst) )split('|')[1];