FreakbuZz Posted September 16, 2012 Posted September 16, 2012 Γεια σας... προσπαθώ να βάλω ένα npc που να δείχνει το top 10 στα pvp pk...το έχω περάσει μέσα το npc όταν πατάω πάνω μου το ανοίγει κανονικά αλλά κάτι μου λέει μετά οτι δεν διαβάζει ένα q... ορίστε και φωτογραφίες... όποιος μπορεί ας βοηθείσει...
0 Devilfenix Posted September 16, 2012 Posted September 16, 2012 kati pezei me to script , ti sou lei stin console?
0 Devilfenix Posted September 16, 2012 Posted September 16, 2012 " See init___pvp.py.error.log for details." pigene des ti s lei k kanto paste edw
0 FreakbuZz Posted September 16, 2012 Author Posted September 16, 2012 Error on: C:\l2server\gameserver\data\scripts\custom\90000_list\__init__pvp.py.error.log Line: -1 - Column: -1 Traceback (innermost last): File "__init__pvp.py", line 2, in ? ImportError: no module named it
0 Devilfenix Posted September 16, 2012 Posted September 16, 2012 Error on: C:\l2server\gameserver\data\scripts\custom\90000_list\__init__pvp.py.error.log Line: -1 - Column: -1 Traceback (innermost last): File "__init__pvp.py", line 2, in ? ImportError: no module named it bsk gia kane paste to init.py na to dw, giati etsi dn ginete
0 FreakbuZz Posted September 16, 2012 Author Posted September 16, 2012 import sys from com.it.br.gameserver.model.actor.instance import L2PcInstance from java.util import Iterator from com.it.br.gameserver.datatables import SkillTable from com.it.br import L2DatabaseFactory from com.it.br.gameserver.model.quest import State from com.it.br.gameserver.model.quest import QuestState from com.it.br.gameserver.model.quest.jython import QuestJython as JQuest print "importing custom: TOP PVP/PK LIST" NPC=[90000] Precio_ID = 57 QuestId = 90000 QuestName = "list" QuestDesc = "custom" InitialHtml = "1.htm" # ************************ # Creando la Clase Quest * # ************************ class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) def onTalk (self,npc,player): return InitialHtml def onEvent(self,event,st): htmltext = event cantidad_pago = st.getQuestItemsCount(Precio_ID) #PK Info if event == "1" and cantidad_pago >= 0 : st.takeItems(Precio_ID,0) total_asesinados = 0 htmltext_ini = "<html><head><title>Pk Info</title></head><body><table width=300><tr><td><font color =\"FF00FF\"></td><td><center><font color =\"FFFF00\">Player</color></center></td><td><center>Kills</center></td></tr>" htmltext_info ="" color = 1 pos = 0 con = L2DatabaseFactory.getInstance().getConnection() pks = con.prepareStatement("SELECT char_name,pkkills FROM characters WHERE pkkills>0 and accesslevel=0 order by pkkills desc limit 30") rs = pks.executeQuery() while (rs.next()) : char_name = rs.getString("char_name") char_pkkills = rs.getString("pkkills") total_asesinados = total_asesinados + int(char_pkkills) pos = pos + 1 posstr = str(pos) if color == 1: color_text = "<font color =\"00FFFF\">" color = 2 htmltext_info = htmltext_info + "<tr><td><center><font color =\"FF00FF\">" + posstr + "</td><td><center>" + color_text + char_name +"</center></td><td><center>" + char_pkkills + "</center></td></tr>" elif color == 2: color_text = "<font color =\"FF0000\">" color = 1 htmltext_info = htmltext_info + "<tr><td><center><font color =\"FF00FF\">" + posstr + "</td><td><center>" + color_text + char_name +"</center></td><td><center>" + char_pkkills + "</center></td></tr>" htmltext_end = "</table><center><font color=\"FFFFFF\">" + "A Total of " + str(total_asesinados) + " Pk's.</center></body></html>" htmltext_pklist = htmltext_ini + htmltext_info + htmltext_end con.close() return htmltext_pklist elif event == "1" and cantidad_pago < 0 : htmltext = "<html><head><title>PK info Online</title></head><body><font color =\"FF0000\">Primero pagame...!! son 0 adenas.</body></html>" return htmltext # PvP info if event == "2" and cantidad_pago >= 0 : st.takeItems(Precio_ID,0) total_asesinados = 0 htmltext_ini = "<html><head><title>PvP info</title></head><body><table width=300><tr><td><font color =\"FF00FF\"></td><td><center><font color =\"FFFF00\">Player</color></center></td><td><center>Kills</center></td></tr>" htmltext_info ="" color = 1 pos = 0 con = L2DatabaseFactory.getInstance().getConnection() pks = con.prepareStatement("SELECT char_name,pvpkills FROM characters WHERE pvpkills>0 and accesslevel=0 order by pvpkills desc limit 30") rs = pks.executeQuery() while (rs.next()) : char_name = rs.getString("char_name") char_pkkills = rs.getString("pvpkills") total_asesinados = total_asesinados + int(char_pkkills) pos = pos + 1 posstr = str(pos) if color == 1: color_text = "<font color =\"00FFFF\">" color = 2 htmltext_info = htmltext_info + "<tr><td><center><font color =\"FF00FF\">" + posstr + "</td><td><center>" + color_text + char_name +"</center></td><td><center>" + char_pkkills + "</center></td></tr>" elif color == 2: color_text = "<font color =\"FF0000\">" color = 1 htmltext_info = htmltext_info + "<tr><td><center><font color =\"FF00FF\">" + posstr + "</td><td><center>" + color_text + char_name +"</center></td><td><center>" + char_pkkills + "</center></td></tr>" htmltext_end = "</table><center><font color=\"FFFFFF\">" + "A Total of " + str(total_asesinados) + " Kills.</center></body></html>" htmltext_pklist = htmltext_ini + htmltext_info + htmltext_end con.close() return htmltext_pklist elif event == "2" and cantidad_pago < 0 : htmltext = "<html><head><title>PK info</title></head><body><font color =\"FF0000\">Primero pagame...!! son 0 adenas.</body></html>" return htmltext QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc) CREATED=State('Start',QUEST) STARTED=State('Started',QUEST) COMPLETED=State('Completed',QUEST) QUEST.setInitialState(CREATED) for npcId in NPC: QUEST.addStartNpc(npcId) QUEST.addTalkId(npcId)
0 Fanky Posted September 16, 2012 Posted September 16, 2012 τι project έχεις; εάν έχεις brasil,είναι οκ τα imports σου.
0 Devilfenix Posted September 16, 2012 Posted September 16, 2012 logika exeis frozen/acis gia auto allakse ta imports
0 FreakbuZz Posted September 16, 2012 Author Posted September 16, 2012 logika exeis frozen/acis gia auto allakse ta imports Και πως να τα κάνω??? :Ρ
0 Devilfenix Posted September 16, 2012 Posted September 16, 2012 to frozen exw... vale auta import sys from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance from java.util import Iterator from com.l2jfrozen.gameserver.datatables import SkillTable from com.l2jfrozen.util.database import L2DatabaseFactory from com.l2jfrozen.gameserver.model.quest import State from com.l2jfrozen.gameserver.model.quest import QuestState from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest
0 FreakbuZz Posted September 16, 2012 Author Posted September 16, 2012 παπάρια μάντολες...μπορείς να σου στείλω σε πμ ID και pass απο tv να το δεις?
0 Fanky Posted September 16, 2012 Posted September 16, 2012 μπορείς να κάνεις paste εδώ αυτό το αρχείο? datapack/data/_init_.py
0 Devilfenix Posted September 16, 2012 Posted September 16, 2012 παπάρια μάντολες...μπορείς να σου στείλω σε πμ ID και pass απο tv να το δεις? ti sou lei pali?
Question
FreakbuZz
Γεια σας... προσπαθώ να βάλω ένα npc που να δείχνει το top 10 στα pvp pk...το έχω περάσει μέσα το npc όταν πατάω πάνω μου το ανοίγει κανονικά αλλά κάτι μου λέει μετά οτι δεν διαβάζει ένα q... ορίστε και φωτογραφίες...
όποιος μπορεί ας βοηθείσει...
28 answers to this question
Recommended Posts