hello friends this script is made with the idea of showing the points of Olympiads in real time the rank of olypoints and competitions works perfectly but the name of char goes out to all the same rankings 1,2,3,4,5 char name though with the points and the competitions of the other if anyone can help I would do a great service thanks
see here the picture:
http://img59.imageshack.us/img59/7922/90236660.jpg
always the same char_name whit the rank from other participants help me please..
this is the rank for adventurer order by olympiad points desc
if name == "olympiad20":
st.takeItems(PRECIO_ID,PRECIO_CANTIDAD)
OLYMPIAD20 = "<html><head><title>OLYMPIAD STATS</title></head><body>"
OLYMPIAD20 += "<center><font color=\"FF0000\">Olympiad List</font></center><table align=\"center\">"
OLYMPIAD20 += "<tr><td align=\"center\" width=60><font color=\"LEVEL\">Class</font></td><td align=\"center\" width=230><font color=\"00FF00\">Olypoints</font></td><td align=\"center\" width=60><font color=\"LEVEL\">Battles</font></td></tr>"
pos = 1
con=L2DatabaseFactory.getInstance().getConnection()
listaclan = con.prepareStatement("SELECT * FROM olympiad_nobles WHERE class_id='93' ORDER BY olympiad_points DESC")
rs=listaclan.executeQuery()
while (rs.next()):
OLYMPIAD20 += "<tr><td align=\"center\" width=110>"+getmaster()+"</td><td align=\"center\" width=180>"+rs.getString(3)+"</td><td align=\"center\" width=60>"+str(rs.getInt(4))+"</td></tr>"
pos=pos+1
rs.close()
con.close()
OLYMPIAD20 += "</table><br><br><center><button value=\"Back\" action=\"bypass -h Quest " +QUEST_INFO+ " razas2\" width=80 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"><br>"
OLYMPIAD20 += "</center></body></html>"
return OLYMPIAD20
def getmaster2():
cn=L2DatabaseFactory.getInstance().getConnection()
nameList = cn.prepareStatement("SELECT * FROM olympiad_nobles WHERE class_id='93' ORDER BY olympiad_points DESC")
nl=nameList.executeQuery()
val = "0"
if nl :
nl.next()
try : val = nl.getString("charId")
except : pass
try : cn.close()
except: pass
return val
def getmaster():
cn=L2DatabaseFactory.getInstance().getConnection()
nameList = cn.prepareStatement("SELECT char_name FROM characters WHERE CharId = \""+getmaster2()+"\"")
nl=nameList.executeQuery()
val = "0"
if nl :
nl.next()
try : val = nl.getString("Char_Name")
except : pass
try : cn.close()
except: pass
return val
if somebody help me i will thank, i know very little about this. :-[