Jump to content
  • 0

[Help] with npc


Question

1 answer to this question

Recommended Posts

  • 0
Posted

what error shows you when you changed the imports?

 

Edit:

phyton is not my favorite language, and i dont control it very well, but isnt it strange this:

 

if event == "5" :

total_asesinados = 0

htmltext_ini = "<html><head><title>TOP Clan</title></head><body><table width=300><tr><td><font color =\"FF0000\"><center>Pos.</center></td><td><center><font color =\"FF0000\">Clan name</color></center></td><td><center>Level</center></td></tr>"

htmltext_info =""

color = 1

pos = 0

con = L2DatabaseFactory.getInstance().getConnection()

pks = con.prepareStatement("SELECT clan_name,clan_level,reputation_score FROM clan_data WHERE clan_level>0 order by clan_level desc limit 10")

rs = pks.executeQuery()

while (rs.next()) :

char_name = rs.getString("clan_name")

char_pkkills = rs.getString("clan_level")

total_asesinados = total_asesinados + int(char_pkkills)

pos = pos + 1

posstr = str(pos)

if color == 1:

color_text = "<font color =\"FFFFFF\">"

color = 2

htmltext_info = htmltext_info + "<tr><td><center><font color =\"FFFFFF\">" + posstr + "</td><td><center>" + color_text + char_name +"</center></td><td><center>" + char_pkkills + "</center></td></tr>"

elif color == 2:

color_text = "<font color =\"23ADC2\">"

color = 1

htmltext_info = htmltext_info + "<tr><td><center><font color =\"23ADC2\">" + posstr + "</td><td><center>" + color_text + char_name +"</center></td><td><center>" + char_pkkills + "</center></td></tr>"

htmltext_end = "</table></body></html>"

htmltext_pklist = htmltext_ini + htmltext_info + htmltext_end

con.close()

return htmltext_pklist

elif event == "5" and cantidad_pago < 3000 :

htmltext = "<html><head><title>PK info Online</title></head><body><font color =\"FF0000\">Primero pagame...!! son 3000 adenas.</body></html>"

return htmltext

 

 

blue: the else if will never be executed

red: never used and its adding all the clan lvls?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...