Jump to content
  • 0

__init__.py.error.log


cunhado
 Share

Question

I get the following error:

 

Error on: C:\Lineage Server\Epilogue Server\gameserver\data\scripts\custom\7206_CustomInfo\__init__.py.error.log

Line: -1 - Column: -1

 

Traceback (innermost last):

  File "__init__.py", line 4, in ?

ImportError: no module named net

 

My init file looks as follows:

 

#Jython-based Top PvP Manger
import sys
from java.util                                   import Iterator
from net.sf.l2j.gameserver.model.quest           import State
from net.sf.l2j.gameserver.model.quest           import QuestState
from net.sf.l2j.gameserver.model.quest.jython    import QuestJython as JQuest
from net.sf.l2j.gameserver.network.serverpackets import CreatureSay
from net.sf.l2j                                  import L2DatabaseFactory

# ***************************************
# Info of custom quest                  *
# ***************************************

qn = "7206_CustomInfo"

NPCS = [7206]
Precio_ID   = 57

QuestId     = 7206
QuestName   = "CustomInfo"
QuestDesc   = "custom"
InitialHtml = "1.htm"

# ***************************************
# Jython Code                           *
# ***************************************



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" :
		total_asesinados = 0
		htmltext_ini = "<html><head><title>TOP PK</title></head><body><table width=300><tr><td><font color =\"FF0000\"><center>Pos.</center></td><td><center><font color =\"FF0000\">Player name</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 15")
		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 =\"FFFFFF\">"
				color = 2
				htmltext_info = htmltext_info + "<tr><td><center><font color =\"FFFFFF\"><center>" + posstr + "</center></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 == "1" 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

 

		# **********
	# PvP info *
	# **********

	if event == "2" :
		total_asesinados = 0
		htmltext_ini = "<html><head><title>TOP PvP</title></head><body><table width=300><tr><td><font color =\"FF0000\"><center>Pos.</center></td><td><center><font color =\"FF0000\">Player name</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 15")
		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 =\"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 == "2" 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

	# *************
	# Adenas info *
	# *************

	if event == "3" :
		total_cantidad = 0
		htmltext_ini = "<html><head><title>Top Adena</title></head><body><table width=300><tr><td><font color =\"FF0000\"><center>Pos.</center></td><td><center><font color =\"FF0000\">Player name</color></center></td><td><center>Adenas</center></td></tr>"
		htmltext_info =""			
		color = 1
		pos = 0
		con = L2DatabaseFactory.getInstance().getConnection()
		pks = con.prepareStatement("SELECT count,owner_id FROM items WHERE item_id=57 order by count desc limit 20")
		rs = pks.executeQuery()
		while (rs.next()) :
			cantidad = rs.getString("count")
			pj_id = rs.getString("owner_id")
			total_cantidad = total_cantidad + long(cantidad)
			pos = pos + 1
			posstr = str(pos)
			charname = con.prepareStatement("SELECT char_name FROM characters WHERE charId=" + pj_id)
			rs2 = charname.executeQuery()
			while (rs2.next()) :
				char_name = rs2.getString("char_name")
			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>" + cantidad + "</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>" + cantidad + "</center></td></tr>"
		htmltext_end = "</table></body></html>"
		htmltext_pklist = htmltext_ini + htmltext_info + htmltext_end
		con.close()
		return htmltext_pklist
	elif event == "3" and cantidad_pago < 3000 :
		htmltext = "<html><head><title>Adenas info Online</title></head><body><font color =\"FF0000\">Primero pagame...!! son 100k adenas.</body></html>"
		return htmltext

 

		# *************
	# Nobless info *
	# *************

	if event == "4" :
		total_asesinados = 0
		htmltext_ini = "<html><head><title>Top Nobless order by PvP</title></head><body><table width=300><tr><td><center><font color =\"FF0000\">Pos.</td></center><td><center><font color =\"FF0000\">Player name</color></center></td></tr>"
		htmltext_info =""			
		color = 1
		pos = 0
		con = L2DatabaseFactory.getInstance().getConnection()
		pks = con.prepareStatement("SELECT char_name,pkkills,nobless FROM characters WHERE pkkills>0 and accesslevel=0 order by pkkills desc limit 10")
		rs = pks.executeQuery()
		while (rs.next()) :
			char_name = rs.getString("char_name")
			char_pkkills = rs.getString("nobless")
			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></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></tr>"
		htmltext_end = "</table></body></html>"
		htmltext_pklist = htmltext_ini + htmltext_info + htmltext_end
		con.close()
		return htmltext_pklist
	elif event == "4" 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

	# **********
	# Clan Top *
	# **********

	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


QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

for npcId in NPCS:
    QUEST.addStartNpc(npcId)
    QUEST.addTalkId(npcId)

 

I cant find the problem :/

Thanks for any help received.

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

from net.sf.l2j.gameserver.model.quest          import State

from net.sf.l2j.gameserver.model.quest          import QuestState

from net.sf.l2j.gameserver.model.quest.jython    import QuestJython as JQuest

from net.sf.l2j.gameserver.network.serverpackets import CreatureSay

from net.sf.l2j                                  import L2DatabaseFactory

 

if i remember for epilogue is com.sf.l2j or something like this

Link to comment
Share on other sites

  • 0

from net.sf.l2j.gameserver.model.quest          import State

from net.sf.l2j.gameserver.model.quest          import QuestState

from net.sf.l2j.gameserver.model.quest.jython    import QuestJython as JQuest

from net.sf.l2j.gameserver.network.serverpackets import CreatureSay

from net.sf.l2j                                  import L2DatabaseFactory

 

if i remember for epilogue is com.sf.l2j or something like this

U're wrong ... for epilogue is com.l2jserver
Link to comment
Share on other sites

  • 0

change this

 

from java.util                                   import Iterator
from net.sf.l2j.gameserver.model.quest           import State
from net.sf.l2j.gameserver.model.quest           import QuestState
from net.sf.l2j.gameserver.model.quest.jython    import QuestJython as JQuest
from net.sf.l2j.gameserver.network.serverpackets import CreatureSay
from net.sf.l2j                                  import L2DatabaseFactory

 

for this

 

from java.util                                   import Iterator
from com.l2jserver.gameserver.model.quest           import State
from com.l2jserver.gameserver.model.quest           import QuestState
from com.l2jserver.gameserver.model.quest.jython    import QuestJython as JQuest
from com.l2jserver.gameserver.network.serverpackets import CreatureSay
from com.l2jserver                                 import L2DatabaseFactory

 

 

Link to comment
Share on other sites

  • 0

Which means that you are using this version. So the imports have to stay as "net.sf.l2j" and not "com.l2jserver". BUT! The Error log says: "ImportError: no module named net". This means that you are using another Gracia Final Pack. The only thing you'll have to do, will be to change the imports depending on the imports of your serverpack.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



  • Posts

    • A ability known as "lost target" is one that causes your opponent to shift their focus away from you. If he does not retarget, the effect will be permanent. Naturally, ncSoft didn't think things through very well, thus in interlude you can auto-target, which pretty much nullifies the impact they were going for. Nerdle is not just a math puzzle game, but also a challenge for your brain. Find hidden calculations within 6 tries. You can find both numerical and alphabetical characters.  
    • Welcome new members to this World's Hardest Game forum. So excited.
    • I also have a character on this server. Hope to connect with everyone. Please contact me via nick: Sonic exe.
    • Does that mean we won't be able to find anything here?we become what we behold
    • Mrs Poindexter CBD Gummies Reviews : Truth or Blind-Faith Introducing the CBD gummies from Mrs. Poindexter, which are more than simply tasty treats. They are a type of health supplement that contains hemp to help you unwind both physically and mentally. More than 20,000 clinical investigations have shown them to be effective at reducing anxiety, depression, and inflammation. <<OFFICIAL WEBSITE-” CLICK HERE ORDER NOW>> VISITING OFFICIAL WEBSITE MRS POINDEXTER CBD GUMMIES [TAP TO ORDER] Other Article Link Below: https://groups.google.com/g/exposed-mrs-poindexter-cbd-gummies/c/56rSTvtN9U4 https://groups.google.com/g/exposed-mrs-poindexter-cbd-gummies/c/z9sqlhQTpWc https://sites.google.com/view/new-update-mrs-poindexter-cbdg/home https://forum.ppr.pl/index.php?/topic/20021-green-spectra-cbd-gummies-reviews/ https://forum.playragnarokonlinebr.com/index.php?/topic/104798-mrs-poindexter-cbd-gummies-reviews/ https://forum.techtudo.globo.com/perguntas/582713/mrs-poindexter-cbd-gummies-reviews-is-it-effective-in-reducing-weight-quickly https://xtibia.com/forum/topic/258176-green-spectra-cbd-gummies-reviews/ https://sites.google.com/view/new-update-mrs-poindexter-cbdg/home https://sites.google.com/view/mrs-poindexter-cbd-buy-now/home https://forum.ppr.pl/index.php?/topic/20114-mrs-poindexter-cbd-gummies-why-should-we-buy/ https://sites.google.com/view/usa-mrs-poindexter-cbd-gummy-r/home https://www.dibiz.com/liam-2 https://www.carforums.com/forums/topic/212223-mrs-poindexter-cbd-gummies-reviews/ https://liam143.cgsociety.org/bz0o/mrs-poindexter-cbd-g https://www.toyorigin.com/community/index.php?threads/mrs-poindexter-cbd-gummies-reviews-true-or-fake.32119/ https://community.backtrader.com/topic/61652/mrs-poindexter-cbd-gummies-reviews-scam-or-true https://community.backtrader.com/topic/61666/mrs-poindexter-cbd-gummies-reviews-scam-or-true https://dribbble.com/shots/20563651-Mrs-Poindexter-CBD-Gummies-Reviews-made-in-USA?added_first_shot=true https://www.deviantart.com/nadal2343/art/Pelican-CBD-Gummies-cover-948038876 https://socialsocial.social/pin/mrs-poindexter-cbd-gummies-reviews-scam-or-true/ https://socialsocial.social/pin/mrs-poindexter-cbd-gummies-reviews-side-effects-or-scam/ https://www.scoop.it/topic/mrs-poindexter-cbd-gummies-reviews-side-effects-or-scam?&kind=crawled&fId=1807291 https://discuss.selfmade.ninja/d/10531-mrs-poindexter-cbd-gummies-reviews-good-or-bad-for-health https://www.scoop.it/topic/terry-bradshaw-cbd-gummies-by-terrybradshaw   https://sites.google.com/view/terry-bradshaw-cbd-gummies-t/home https://sites.google.com/view/terry-bradshaw-cbd-gummi/home https://groups.google.com/g/terrybradshawcbdgummiies/c/dZZOWAIKNxs https://sites.google.com/view/lois-griffin-cbd-gummies-/home https://sites.google.com/view/lois-griffin-cbd-gummies-cbd/home https://groups.google.com/g/loisgriffincb/c/dB5ZxOAoaDA https://www.dibiz.com/loisgriffincbdgummies-1 https://www.dibiz.com/loisgriffin https://www.dibiz.com/terrybradshaw45 https://www.dibiz.com/terrybradshawcbdgummies https://www.toyorigin.com/community/index.php?threads/terry-bradshaw-cbd-gummies-ingredients-of-live-well-cbd-gummy-bars.31855/ https://www.toyorigin.com/community/index.php?threads/terry-bradshaw-cbd-gummies-does-this-powerful-chronic-pain-relief-gummies-really-work.31856/ https://www.toyorigin.com/community/index.php?threads/lois-griffin-cbd-chewy-goodies-understanding.31859/ https://www.toyorigin.com/community/index.php?threads/lois-griffin-cbd-gummies-side-effects-results-order.31863/ https://www.sympla.com.br/produtor/terrybradshawcbdgummi https://www.sympla.com.br/produtor/terrybradshawcbd https://www.sympla.com.br/produtor/loisgriffincbdgummies https://www.sympla.com.br/produtor/loisgriffincbdgummiespowerful https://community.backtrader.com/topic/61456/terry-bradshaw-cbd-gummies-cbd-gummies-are-made-with-natural-components https://community.backtrader.com/topic/61460/lois-griffin-cbd-gummies-these-are-assembled-with-superior-co2-extraction-and-triple-filtration-era https://community.thermaltake.com/index.php?/topic/312708-terry-bradshaw-cbd-gummies-are-made-with-natural-components/ https://terrybradshaw01.hashnode.dev/terry-bradshaw-cbd-gummies-relieve-pain-aches-as-theyve-ache-relieving-houses https://loisgriffincbdgummies4.hashnode.dev/lois-griffin-cbd-gummies-you-have-more-potent-immunity-metabolism-and-digestion-as-a-result https://terrybradshaw01.hashnode.dev/terry-bradshaw-cbd-gummies-does-this-powerful-chronic-pain-relief-gummies-really-work https://loisgriffincbdgummies4.hashnode.dev/lois-griffin-cbd-gummies-superior-co2-extraction-and-triple-filtration-era https://www.facebook.com/people/Terry-Bradshaw-CBD-Gummies/100089775202720/ https://www.facebook.com/people/Lois-Griffin-CBD-Gummies/100089676325598/ https://infogram.com/terry-bradshaw-cbd-gummies-1h7g6k0gp3vx02o https://infogram.com/lois-griffin-cbd-gummies-1ho16vokle88x4n https://infogram.com/terry-bradshaw-cbd-gummies-1h7g6k0gp3vx02o https://infogram.com/lois-griffin-cbd-gummies-1ho16vokle88x4n https://www.scoop.it/topic/terry-bradshaw-cbd-gummies-by-terrybradshaw     
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock