game/img.new-combats.com/i/commoninf.js

26 lines
1.5 KiB
JavaScript
Raw Normal View History

2022-12-19 20:22:19 +00:00
function getalign(al) {
var n = parseFloat(al);
if (n >= 1 && n < 2) return ("<22><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
if (n >= 2 && n < 3) return ("<22><><EFBFBD><EFBFBD><EFBFBD>");
if (n >= 3 && n < 4) return ("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
if (n == 7) return ("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
if (n > 7 && n < 8) return ("<22><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
if (n >= 50 && n < 51) return ("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
return ("");
}
function getalignurl(al) {
var n = parseFloat(al);
if (n == 50) return "https://new-combats.com/encicl/alchemist.html";
return "https://new-combats.com/encicl/alignment.html";
}
function drwfl(name, id, level, align, klan, img, sex) {
var s = "";
if (align != "0") s += `<A HREF='${getalignurl(align)}' target=_blank><IMG SRC='https://img.new-combats.com/i/align/align${align}.gif' WIDTH=12 HEIGHT=15 ALT=\"${getalign(align)}\"></A>`;
if (klan) s += `<A HREF='/clans_info/${klan}' target=_blank><IMG SRC='https://img.new-combats.com/i/clan/${klan}.gif' WIDTH=24 HEIGHT=15 ALT=''></A>`;
s += `<B>${name}</B>`;
if (level != -1) s += ` [${level}]`;
if (id != -1 && !img) s += `<A HREF='https://new-combats.com/info/${id}' target='_blank'><IMG SRC=https://img.new-combats.com/i/inf_capitalcity.gif WIDTH=12 HEIGHT=11 ALT='<27><><EFBFBD>. <20> ${name}'></A>`;
if (img) s += `<A HREF='https://capitalcity.new-combats.com/encicl/obraz_${(sex ? "w" : "m")}1.html?l=${img}' target='_blank'><IMG SRC=https://capitalcity.img.new-combats.com/i/inf.gif WIDTH=12 HEIGHT=11 ALT='<27><><EFBFBD><EFBFBD><EFBFBD> ${name}'></A>`;
document.write(s);
}