Hello i search forum for my problem but i don't find sth.. so i post it here...
i updated my server pack L2J server Beta to a new revirsion and i have problem with my custom npcs... like toplist npc
the code is this .
import sys
from java.util import Iterator
from com.l2jserver import L2DatabaseFactory
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
qn = "36601_Toplist"
NPC = 36601
QuestId = 36601
MIN_LEVEL = 0
MAX_LEVEL = 86
QuestName = "Toplist"
QuestDesc = "custom"
InitialHtml = "1.htm"
DonateMaster = "This ain't no free service nubblet! Now get out of my hare... Get it, 'hare'? - That gets me every time!"
class Quest (JQuest):
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onEvent(self,event,st):
htmltext = event
level = st.getPlayer().getLevel()
levelup = 86 - level
if level < MIN_LEVEL :
return"<html><head><body>No quicky for you! - Your to young shorty!</body></html>"
if level > MAX_LEVEL :
return"<html><head><body>No quicky for you! - Your to old fatty!</body></html>"
else:
#PK INFO
if event == "01":
con = L2DatabaseFactory.getInstance().getConnection()
total_asesinados = 0
htmltext_ini = "<html><head><title>PK List</title></head><body><table width=300><tr><td><font color =\"FF00FF\">Pos.</td><td><center><font color =\"FFFF00\">*** Player ***</color></center></td><td><center>*** Kill's ***</center></td></tr>"
htmltext_info =""
color = 1
pos = 0
pks = con.prepareStatement("SELECT char_name,pkkills FROM characters WHERE pkkills>0 and accesslevel=0 order by pkkills desc limit 50")
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
L2DatabaseFactory.close(con)
return htmltext_pklist
#PVP INFO
if event == "02":
con = L2DatabaseFactory.getInstance().getConnection()
total_asesinados = 0
htmltext_ini = "<html><head><title>PvP List</title></head><body><table width=300><tr><td><font color =\"FF00FF\">Pos.</td><td><center><font color =\"FFFF00\">*** Player ***</color></center></td><td><center>*** Kill's ***</center></td></tr>"
htmltext_info =""
color = 1
pos = 0
pks = con.prepareStatement("SELECT char_name,pvpkills FROM characters WHERE pvpkills>0 and accesslevel=0 order by pvpkills desc limit 50")
rs = pks.executeQuery()
while (rs.next()) :
char_name = rs.getString("char_name")
char_pvpkills = rs.getString("pvpkills")
total_asesinados = total_asesinados + int(char_pvpkills)
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_pvpkills + "</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_pvpkills + "</center></td></tr>"
htmltext_end = "</table><center><font color=\"FFFFFF\">" + "A Total of " + str(total_asesinados) + " PvP's.</center></body></html>"
htmltext_pklist = htmltext_ini + htmltext_info + htmltext_end
L2DatabaseFactory.close(con)
return htmltext_pklist
if htmltext != event:
st.exitQuest(1)
return htmltext
def onFirstTalk (self,npc,player):
st = player.getQuestState(qn)
if not st : st = self.newQuestState(player)
return InitialHtml
QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
QUEST.addStartNpc(NPC)
QUEST.addFirstTalkId(NPC)
QUEST.addTalkId(NPC)
print "###############################"
print "# Top Lists - Loaded #"
print "# #"
and when i start my gameserver.bat show me an error . i go to __init__.py error,log and i see this
Error on: C:\server new\game\data\scripts\custom\36601_Toplist\__init__.py.error.log
Line: -1 - Column: -1
Traceback (innermost last):
File "custom/36601_Toplist/__init__.py", line 6, in ?
ImportError: no module named jython
and its true because no jython moduls is at com.l2jserver.gameserver.model.quest.jython .....
and here is a foto of my java
any solution ... to change com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest to sth else location that will exist jython??
Website design Lineage 2 GTHWEB 5
I bought it on order, but now I don't need it anymore
Link: https://www.mediafire.com/file/tubvcl73p23u6na/Smarty.exe/file
If you do not know how to choose the right service to play slots, I recommend that you choose one that offers you a huge selection of colors as well as attractive bonuses and fast payouts. In the country all these criteria for myself found only one platform and it is https://slotscity.ua/ru/game-hall . Join this platform today to get as many bonuses as possible for your next game
Want to experience a unique selection for real players? Then I when you this service https://slotscity.com/ . Only this service offers you popular slots with high odds of winning and good game features. The variety of bonuses and promotions in this service will pleasantly surprise you. I re-run was in my time a lot of different services and this stands out among them very much and stands out in the first place.
L2ES x3(x7)
Epics: QA/Zaken/Tezza/Freya (PM for additional info +enchant)
Items: Vorpal Leather/Heavy/Robe sets
Moirai Heavy set
Vesper Noble Robe set
Vorpal L/H/R parts
(PM for additional info element+enchant)
Adena: 1 Billion+ available
Reply to topic or pm me directly on the forum for info 🙂
Added new Updates/Fixes: 28-05-2023.
Fixed: Issue with buffs system on debuffs not showing.
Fixed: a bug when you have party not showing the buffs properly.
Fixed: small issue on skills bar.
Fixed: issue on pvp mages curses on target player not showing properly.
Fixed: issue on target when uses geodata.
Updated: L2Server threads because sometimes not moving to the correct core, running with better perfomance now.
You download the update from here :
L2Server: https://esl2.org/pts_classic_updates/L2Server/
if you find any problems report -> bugs here: https://discord.gg/GzNMZ9EHGK
Question
~!M@R@SL@K0SsS!~
Hello i search forum for my problem but i don't find sth.. so i post it here...
i updated my server pack L2J server Beta to a new revirsion and i have problem with my custom npcs... like toplist npc
the code is this .
and when i start my gameserver.bat show me an error . i go to __init__.py error,log and i see this
and its true because no jython moduls is at com.l2jserver.gameserver.model.quest.jython .....
and here is a foto of my java
any solution ... to change com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest to sth else location that will exist jython??
thn'x in advance
Link to comment
Share on other sites
19 answers to this question
Recommended Posts