Jump to content

Question

Posted

re magkes dn ktlvenw gt apla otan pataw panw sto npc m dixnei Quest me mple grammata tpt allo

 

 

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 = "50300_PKlist"

 

NPC        = 36601

QuestId    = 50300

MIN_LEVEL  = 1

MAX_LEVEL  = 85

QuestName  = "PKlist"

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>PG-L2 PK INFO</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>PG-L2 PVP INFO</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 "# PVP PK INFO Loaded"

3 answers to this question

Recommended Posts

  • 0
Posted

ayto edw einai to htm onomaseto 1.htm kai balto mazi me to __init__.py

 

<html>

  <head>

    <title>Top PvP-Pk Rank's</title>

  </head>

<body>

<center><img src="L2UI_CH3.herotower_deco" width=256 height=32>

<center>

<br>

<td><center><font color="FFFFFF">Hello Stranger,<br> I can inform you about Pk-PvP Stats of the server!</font></center></td>

<br>

<br>

<br>

<tr><td width=270 align="center">

<button action="bypass -h Quest 50300_PKlist 01" value="*Pk Stats*" width=130 height=25 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">

</td>

</tr>

<tr><td width=270 align="center">

 </td>

</tr>

<tr><td width=270 align="center">

<button action="bypass -h Quest 50300_PKlist 02" value="*PvP Stats*" width=130 height=25 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">

</td>

</tr>

<tr><td width=270 align="center">

 </td>

</tr>

<center><img src="L2UI_CH3.herotower_deco" width=256 height=32></center>

</body>

</html>

 

 

ayto edw einai to script onomase to __init__.py kai balto sto game/data/script/50300_pklist

 

 

 

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 = "50300_PKlist"

 

NPC        = 36601

QuestId    = 50300

MIN_LEVEL  = 0

MAX_LEVEL  = 86

QuestName  = "PKlist"

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>PG-L2 PK INFO</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>PG-L2 PVP INFO</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 "# PVP PK INFO Loaded"

Guest
This topic is now closed to further replies.


  • Posts

    • SOCNET — is a universal service combining a digital goods store, an SMM panel, and a Telegram bot for purchasing Telegram Stars; here you will find TikTok, Instagram, Reddit, Twitter, Telegram, Facebook, LinkedIn, WhatsApp, SnapChat, YouTube, Google, Discord accounts, emails (Outlook, Hotmail, Gmail, Rambler, Firstmail, and others), access to ChatGPT 5, gift cards, and premium subscriptions to many services — all at the best prices! We are currently actively looking for new suppliers for various product categories, which include: Priority list of positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old accounts (brute or cracked origin, self-regs) with post and comment karma from 100 up to 100,000+ | Full access with email included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full email access + active 2FA password — Instagram old accounts (2010-2023) | Full email access (possibly with attached 2FA password) — Facebook old accounts (2010-2023) | Full email access (possibly with attached 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full email access (possibly with attached 2FA password) — TikTok/Facebook/Google ADS Agency advertising accounts We are also open to considering other product categories from you, feel free to contact us through the details listed below in this thread! ⚡ Terms of cooperation: ⚡ 1. You prepare a preliminary description of your product 2. We publish your product in our online store and Telegram bots (in both Russian and English). 3. After the product is sold in our stores, we transfer the funds to you by any convenient method within 24 hours from the moment of sale (any cryptocurrency, PayPal, Payeer, TG Stars, and other methods)   ‼ If you have doubts about working with us or are afraid to send the product first, we agree to work through an escrow service of a trusted provider, or you can simply check out the huge base of reviews about our services in this Google document (reviews from our website, Telegram bot, and other platforms where our products are listed). Document ⭐ We invite you to COOPERATE and EARN with us ⭐ Do you want to sell your product or service in our stores and earn money? Become our partner or propose mutually beneficial cooperation? Become our wholesale client and receive the best conditions and discounts? You can contact us through the CONTACTS listed in this thread. We build a reliable partnership network in all areas of online business. We are ready to participate in joint content creation, giveaways, and events! If you work in digital, traffic, accounts, or media and other fields — let’s discuss possible cooperation. We value quality, transparency, and growth. If this resonates with you — write to us, we are open to dialogue! Our current list of partners ⭐ Our contacts ⭐ ➡ Telegram ➡ WhatsApp ➡ Email: solomonbog@socnet.store ➡ Discord: socnet_support ⭐ Our online store ⭐ SOCNET.STORE ⭐ Our Telegram bot for purchasing Telegram Stars ⭐ SOCNET.CC ⭐ Our SMM Panel for social media promotion ⭐ SOCNET.PRO ⭐ Telegram shop ⭐ SOCNET.SHOP   ✅ News resources ➡ Telegram channel ➡ Discord server ➡ WhatsApp channel
    • SOCNET — is a universal service combining a digital goods store, an SMM panel, and a Telegram bot for purchasing Telegram Stars; here you will find TikTok, Instagram, Reddit, Twitter, Telegram, Facebook, LinkedIn, WhatsApp, SnapChat, YouTube, Google, Discord accounts, emails (Outlook, Hotmail, Gmail, Rambler, Firstmail, and others), access to ChatGPT 5, gift cards, and premium subscriptions to many services — all at the best prices! We are currently actively looking for new suppliers for various product categories, which include: Priority list of positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old accounts (brute or cracked origin, self-regs) with post and comment karma from 100 up to 100,000+ | Full access with email included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full email access + active 2FA password — Instagram old accounts (2010-2023) | Full email access (possibly with attached 2FA password) — Facebook old accounts (2010-2023) | Full email access (possibly with attached 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full email access (possibly with attached 2FA password) — TikTok/Facebook/Google ADS Agency advertising accounts We are also open to considering other product categories from you, feel free to contact us through the details listed below in this thread! ⚡ Terms of cooperation: ⚡ 1. You prepare a preliminary description of your product 2. We publish your product in our online store and Telegram bots (in both Russian and English). 3. After the product is sold in our stores, we transfer the funds to you by any convenient method within 24 hours from the moment of sale (any cryptocurrency, PayPal, Payeer, TG Stars, and other methods)   ‼ If you have doubts about working with us or are afraid to send the product first, we agree to work through an escrow service of a trusted provider, or you can simply check out the huge base of reviews about our services in this Google document (reviews from our website, Telegram bot, and other platforms where our products are listed). Document ⭐ We invite you to COOPERATE and EARN with us ⭐ Do you want to sell your product or service in our stores and earn money? Become our partner or propose mutually beneficial cooperation? Become our wholesale client and receive the best conditions and discounts? You can contact us through the CONTACTS listed in this thread. We build a reliable partnership network in all areas of online business. We are ready to participate in joint content creation, giveaways, and events! If you work in digital, traffic, accounts, or media and other fields — let’s discuss possible cooperation. We value quality, transparency, and growth. If this resonates with you — write to us, we are open to dialogue! Our current list of partners ⭐ Our contacts ⭐ ➡ Telegram ➡ WhatsApp ➡ Email: solomonbog@socnet.store ➡ Discord: socnet_support ⭐ Our online store ⭐ SOCNET.STORE ⭐ Our Telegram bot for purchasing Telegram Stars ⭐ SOCNET.CC ⭐ Our SMM Panel for social media promotion ⭐ SOCNET.PRO ⭐ Telegram shop ⭐ SOCNET.SHOP   ✅ News resources ➡ Telegram channel ➡ Discord server ➡ WhatsApp channel
    • sell adena, items, account l2rebon signature x1 - 1kk = 1 dollars l2reborn x10 - 500kk = 4 dollars E-Global x Lu4 - 1kk = 2 dollars BOHPTS - x20-x500 TOP PRICE DISCORD - GODDARDSHOP TELEGRAM - MMOPROMO THE BEST PRICES IN THE WORLD OF LINEAGE 2
    • Can you reupload system patch?
    • he was my customer many years ago, i setup his acp and some statistics on his website, plus some security it is big difference than "friend"   its more dissapointment than hate, take example acis, how many years still development. PS: you know i was selling websites and i still sell donate panels for l2 servers right?
  • 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