|
Você não é registrado, por favor registre-se para ter acesso ao conteúdo completo. Caso seja registrado, efetue login. Esqueceu sua senha? Clique aqui Recomendamos o uso do Mozilla Firefox para uma melhor visualização. |
|
| Início | Postados Hoje | Marcar Fóruns Como Lidos | Álbums | Banidos | SE Team | Medalhas |
|
|||||||
| Registrar | Loteria VIP | Staff SE | Regras do fórum | Comunidade | Arcade | Postados Hoje | Pesquisar | Experience |
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
![]() |
|
|
LinkBack | Ferramentas do Tópico | Modos de Exibição |
|
|
#11 (permalink) |
|
Banido
![]() Registrado em: Mar 2010
Posts: 99
Agradeceu: 97
Agradecido 4 Vezes em 4 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
![]()
|
Código:
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
1 Passo: Adicionar SQL no Navicat
2 Passo: Colocar os Arquivos na Pasta data\scripts\custom
3 Passo: Adicionar no __init__py da pasta Custom a seguinte Linha
Citação:
__all__ = [
'3995_echo',
'4000_ShadowWeapons',
'5000_MissQueen',
'7000_HeroItems',
'8000_RaidbossInfo',
'8001_NpcLocationInfo',
'6050_KetraOrcSupport',
'6051_VarkaSilenosSupport',
'8804_NpcHero',
'9999_NPCBuffer',
'9912_NPCBuffer',
'9998_PetBuffer',
'50300_PKlist',<<--- Onde vai isso se eu nao achei no init.py
'8204_NpcNoblesse',
'99940_SafeEnchant'
olhei e re olhei tudo la dentro e nao achei onde vai isso
da uma olhada ve se vc acha onde eu mudo!! por favor...
to desistindo ja desse npc
ultima tentativa nao vo ficar te enchendo com minha ignorancia..
# *************************
# PKlist Online
# Editado por ->Luca<-
# Mi primer gran programa en Python, 4 de Julio del 2008
# Este Script es para mostrar Online y por orden, los PKs del server.
# El problema que viene luego es la longitud del HTML, uno demasiado grande crasheara al cliente.
# *************************
import sys
from java.util import Iterator
from net.sf.l2j.gameserver.util import Rnd
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
print "importing custom: 50300_PKlist"
# ***************************************
# Inicializacion de Variables del Quest *
# ***************************************
NPC=[50300]
Precio_ID = 57
QuestId = 50300
QuestName = "PKlist"
QuestDesc = "custom"
InitialHtml = "1.htm"
# ************************
# Creando la Clase Quest *
# ************************
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
# ***********************
# Si hablas con el NPC: *
# ***********************
def onTalk (self,npc,player):
return InitialHtml
# ***********************
# *****************************************************
# Ahora gobernamos los eventos que vienen desde el HTML
# *****************************************************
def onEvent(self,event,st):
htmltext = event
cantidad_pago = st.getQuestItemsCount(Precio_ID)
# *********
# PK info *
# *********
if event == "1" and cantidad_pago >= 3000 :
st.takeItems(Precio_ID,3000)
total_asesinados = 0
htmltext_ini = "<html><head><title>Pk Info Online</title></head><body><table width=300><tr><td><font color =\"FF00FF\">Pos.</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(None)
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
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" and cantidad_pago >= 3000 :
st.takeItems(Precio_ID,3000)
total_asesinados = 0
htmltext_ini = "<html><head><title>PvP info Online</title></head><body><table width=300><tr><td><font color =\"FF00FF\">Pos.</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(None)
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_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 < 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" and cantidad_pago >= 100000 :
st.takeItems(Precio_ID,100000)
total_cantidad = 0
htmltext_ini = "<html><head><title>Adena info Online</title></head><body><table width=300><tr><td><font color =\"FF00FF\">Pos.</td><td><center><font color =\"FFFF00\">*** Name ***</color></center></td><td><center>*** Adenas ***</center></td></tr>"
htmltext_info =""
color = 1
pos = 0
con = L2DatabaseFactory.getInstance().getConnection(None)
pks = con.prepareStatement("SELECT count,owner_id FROM items WHERE item_id=57 order by count desc limit 50")
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 =\"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>" + cantidad + "</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>" + cantidad + "</center></td></tr>"
htmltext_end = "</table><center><font color=\"FFFFFF\">" + "Los TOPS suman " + str(total_cantidad) + " adenas.</center></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
# *************************************************
# Insertando Quest en la lista de Quest disponibles
# *************************************************
QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)
[COLOR="DarkRed"][B]
eu devo ser uma anta.. mas nao achei
|
|
|
|
| Links Patrocinados |
|
|
#12 (permalink) | |
|
Banido
![]() Registrado em: Sep 2009
Localização: Na Frente do PC =p
Posts: 2,094
Agradeceu: 701
Agradecido 1,875 Vezes em 902 Posts
Nome Real: Rodrigo R. Camellini
|
Citação:
|
|
|
|
|
|
|
#13 (permalink) |
|
Banido
![]() Registrado em: Mar 2010
Posts: 99
Agradeceu: 97
Agradecido 4 Vezes em 4 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
![]()
|
ok ok devo ter me expressado mal novamente...
eu quero saber em q lugar eu adiciono a linha q vc postou anteriormente... em q lugar eu coloco isso-->> '50300_PKlist' onde eu tenho q adicionar?? eu nao posso adicionar em qualquer lugar ![]() eu preciso saber onde colocar essa linha '50300_PKlist' Código:
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
# *************************
# PKlist Online
# Editado por ->Luca<-
# Mi primer gran programa en Python, 4 de Julio del 2008
# Este Script es para mostrar Online y por orden, los PKs del server.
# El problema que viene luego es la longitud del HTML, uno demasiado grande crasheara al cliente.
# *************************
import sys
from java.util import Iterator
from net.sf.l2j.gameserver.util import Rnd
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
print "importing custom: 50300_PKlist"
# ***************************************
# Inicializacion de Variables del Quest *
# ***************************************
NPC=[50300]
Precio_ID = 57
QuestId = 50300
QuestName = "PKlist"
QuestDesc = "custom"
InitialHtml = "1.htm"
# ************************
# Creando la Clase Quest *
# ************************
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
# ***********************
# Si hablas con el NPC: *
# ***********************
def onTalk (self,npc,player):
return InitialHtml
# ***********************
# *****************************************************
# Ahora gobernamos los eventos que vienen desde el HTML
# *****************************************************
def onEvent(self,event,st):
htmltext = event
cantidad_pago = st.getQuestItemsCount(Precio_ID)
# *********
# PK info *
# *********
if event == "1" and cantidad_pago >= 3000 :
st.takeItems(Precio_ID,3000)
total_asesinados = 0
htmltext_ini = "<html><head><title>Pk Info Online</title></head><body><table width=300><tr><td><font color =\"FF00FF\">Pos.</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(None)
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
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" and cantidad_pago >= 3000 :
st.takeItems(Precio_ID,3000)
total_asesinados = 0
htmltext_ini = "<html><head><title>PvP info Online</title></head><body><table width=300><tr><td><font color =\"FF00FF\">Pos.</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(None)
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_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 < 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" and cantidad_pago >= 100000 :
st.takeItems(Precio_ID,100000)
total_cantidad = 0
htmltext_ini = "<html><head><title>Adena info Online</title></head><body><table width=300><tr><td><font color =\"FF00FF\">Pos.</td><td><center><font color =\"FFFF00\">*** Name ***</color></center></td><td><center>*** Adenas ***</center></td></tr>"
htmltext_info =""
color = 1
pos = 0
con = L2DatabaseFactory.getInstance().getConnection(None)
pks = con.prepareStatement("SELECT count,owner_id FROM items WHERE item_id=57 order by count desc limit 50")
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 =\"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>" + cantidad + "</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>" + cantidad + "</center></td></tr>"
htmltext_end = "</table><center><font color=\"FFFFFF\">" + "Los TOPS suman " + str(total_cantidad) + " adenas.</center></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
# *************************************************
# Insertando Quest en la lista de Quest disponibles
# *************************************************
QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)# *************************
# PKlist Online
# Editado por ->Luca<-
# Mi primer gran programa en Python, 4 de Julio del 2008
# Este Script es para mostrar Online y por orden, los PKs del server.
# El problema que viene luego es la longitud del HTML, uno demasiado grande crasheara al cliente.
# *************************
import sys
from java.util import Iterator
from net.sf.l2j.gameserver.util import Rnd
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
print "importing custom: 50300_PKlist"
# ***************************************
# Inicializacion de Variables del Quest *
# ***************************************
NPC=[50300]
Precio_ID = 57
QuestId = 50300
QuestName = "PKlist"
QuestDesc = "custom"
InitialHtml = "1.htm"
# ************************
# Creando la Clase Quest *
# ************************
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
# ***********************
# Si hablas con el NPC: *
# ***********************
def onTalk (self,npc,player):
return InitialHtml
# ***********************
# *****************************************************
# Ahora gobernamos los eventos que vienen desde el HTML
# *****************************************************
def onEvent(self,event,st):
htmltext = event
cantidad_pago = st.getQuestItemsCount(Precio_ID)
# *********
# PK info *
# *********
if event == "1" and cantidad_pago >= 3000 :
st.takeItems(Precio_ID,3000)
total_asesinados = 0
htmltext_ini = "<html><head><title>Pk Info Online</title></head><body><table width=300><tr><td><font color =\"FF00FF\">Pos.</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(None)
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
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" and cantidad_pago >= 3000 :
st.takeItems(Precio_ID,3000)
total_asesinados = 0
htmltext_ini = "<html><head><title>PvP info Online</title></head><body><table width=300><tr><td><font color =\"FF00FF\">Pos.</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(None)
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_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 < 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" and cantidad_pago >= 100000 :
st.takeItems(Precio_ID,100000)
total_cantidad = 0
htmltext_ini = "<html><head><title>Adena info Online</title></head><body><table width=300><tr><td><font color =\"FF00FF\">Pos.</td><td><center><font color =\"FFFF00\">*** Name ***</color></center></td><td><center>*** Adenas ***</center></td></tr>"
htmltext_info =""
color = 1
pos = 0
con = L2DatabaseFactory.getInstance().getConnection(None)
pks = con.prepareStatement("SELECT count,owner_id FROM items WHERE item_id=57 order by count desc limit 50")
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 =\"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>" + cantidad + "</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>" + cantidad + "</center></td></tr>"
htmltext_end = "</table><center><font color=\"FFFFFF\">" + "Los TOPS suman " + str(total_cantidad) + " adenas.</center></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
# *************************************************
# Insertando Quest en la lista de Quest disponibles
# *************************************************
QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)
|
|
|
|
|
|
#14 (permalink) |
|
Membro - Veterano
![]() Registrado em: Mar 2009
Localização: Rio Verde
Posts: 689
Agradeceu: 422
Agradecido 366 Vezes em 161 Posts
Nome Real: Danillo Silva Nascimento
|
mais inspector esse linha aonde ele deve coloca que seria no __init__py que ficaria dentro da pasta custom nao tem o ten nao tem esse arquivo
|
|
|
|
| O seguinte membro ao lado disse Obrigado(a) a : DS-Dazzel por gostar deste Post : |
BrunoCrusher (30-05-2010) |
|
|
#15 (permalink) | ||||||||||||||
|
Membro - Veterano
![]() Registrado em: Mar 2009
Localização: Cabeça Dentro dos Livros
Posts: 1,322
Agradeceu: 15
Agradecido 474 Vezes em 306 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Nome Real: Daniel Santos
|
bom eu vou ser bem legal vou te dar o npc ja pronto
bom mano o interlude tem o jscript que vc tem que add nele essa linha assim Código:
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
__all__ = [
'3995_echo',
'4000_ShadowWeapons',
'5000_MissQueen',
'7000_HeroItems',
'8000_RaidbossInfo',
'6050_KetraOrcSupport',
'6051_VarkaSilenosSupport',
'50300_PKlist'
]
print ""
print "importing custom data ..."
for name in __all__ :
try :
__import__('data.jscript.custom.'+name,globals(), locals(), ['__init__'], -1)
except:
print "failed to import quest : ",name
print "... done"
print ""
![]() Spoiler
olhe bem esse script ele ta funfando 100% sem nem um erro testado ![]()
|
||||||||||||||
|
|
|
||||||||||||||
| O seguinte membro ao lado disse Obrigado(a) a : Daniel2 por gostar deste Post : |
BrunoCrusher (31-05-2010) |
|
|
#16 (permalink) | ||||||
|
Membro - Veterano
![]() Registrado em: Dec 2009
Posts: 1,335
Agradeceu: 490
Agradecido 803 Vezes em 427 Posts
Nome Real: Roberto
|
Certo Muito Facil Essa Pergunta Ja Tive Plobema Tbm
1 Passo: Adicionar SQL no Navicat 2 Passo: Colocar os Arquivos na Pasta data\scripts\custom na Pasta __init__.py Citação:
Citação:
Depois Disso Retira Essa Linha Citação:
Citação:
e colok Asim. Citação:
|
||||||
|
|
|
| O seguinte membro ao lado disse Obrigado(a) a : Mazokista por gostar deste Post : |
BrunoCrusher (31-05-2010) |
|
|
#17 (permalink) | ||||||||||||||
|
Membro - Veterano
![]() Registrado em: Mar 2009
Localização: Cabeça Dentro dos Livros
Posts: 1,322
Agradeceu: 15
Agradecido 474 Vezes em 306 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Nome Real: Daniel Santos
|
mano tudo que vc falou aii eu fiz acima e se é pra teon pode pegar o meu codigo que ta 100%
|
||||||||||||||
|
|
|
||||||||||||||
| O seguinte membro ao lado disse Obrigado(a) a : Daniel2 por gostar deste Post : |
BrunoCrusher (31-05-2010) |
|
|
#18 (permalink) |
|
Banido
![]() Registrado em: Mar 2010
Posts: 99
Agradeceu: 97
Agradecido 4 Vezes em 4 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
![]()
|
@Daniel2
usando seu init.py deu erro Error on: C:\Documents and Settings\L2JTeon_gameserver\data\scripts\custom\50 300_PKlist\__init__.py.error.log Line: -1 - Column: -1 Traceback (innermost last): (no code object) at line 0 SyntaxError: ('invalid syntax', ('__init__.py', 38, 1, 'def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)')) ---------- Pessoal acho q sei o erro.... me corrijam se eu estiver errado mas nao era pra ter um arquivo de configuração dentro de L2JTeon_gameserver\data\scripts\custom um q é algo parecido com __all__ ou alguma coisa assim eu lembro q uma vez eu baixei um server q tinha esse arquivo... mas nesse aki veio sem derrepente seja isso q esteja faltando pra funcionar [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar] |
|
|
|
|
|
#19 (permalink) | |||||||||||||||
|
Membro - Veterano
![]() Registrado em: Mar 2009
Localização: Cabeça Dentro dos Livros
Posts: 1,322
Agradeceu: 15
Agradecido 474 Vezes em 306 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Nome Real: Daniel Santos
|
no teon tem um negosinho chamado de script.cfg dentro da pasta data vc tem que add a linha assim
Citação:
|
|||||||||||||||
|
|
|
|||||||||||||||
| O seguinte membro ao lado disse Obrigado(a) a : Daniel2 por gostar deste Post : |
BrunoCrusher (01-06-2010) |
|
|
#20 (permalink) |
|
Banido
![]() Registrado em: Mar 2010
Posts: 99
Agradeceu: 97
Agradecido 4 Vezes em 4 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
![]()
|
essa parte eu ja tinha achado daniel
mas me refiro a isso | V 3 Passo: Adicionar no __init__py da pasta Custom a seguinte Linha Código: '3995_echo', '4000_ShadowWeapons', '5000_MissQueen', '7000_HeroItems', '8000_RaidbossInfo', '6050_KetraOrcSupport', '6051_VarkaSilenosSupport' '50300_PKlist' <----------------- ] print "" print "importing custom data ..." for name in __all__ : try : __import__('data.jscript.custom.'+name,globals(), locals(), ['__init__'], -1) except: print "failed to import quest : ",name print "... done" print "" ISSO AI EU NA ACHEI DENTRO DE init.py DA PASTA CUSTOM |
|
|
|
![]() |
|
|