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?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..