Good evening. I downloaded the script for "olympiad rank" by "RedHot" . I want to be visible or accessable only from vip players, i tried several things but without success .
well here is the _init_ :
Spoiler
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.actor.appearance import PcAppearance
from com.l2jfrozen.gameserver.model.quest import State
from com.l2jfrozen.gameserver.model.actor.appearance import PcAppearance
from com.l2jfrozen.gameserver.model.quest import QuestState
from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest
Γεια σε ολους, προσπαθω εδω και 2 μερες να κανω αυτο το πραγμα να λειτουργει. το καταφερα για ενα διαστημα 5 ωρων. αλλα φαινεται οτι το discord μου κανει block to dll. ή κατι αλλο που δεν μπορω να ειμαι σιγουρος για το τι φταιει... αν καποιος γνωριζει κατι ας στειλει ενα pm να το δουμε μαζι.
*το source το εφιαξα εγω.
https://youtu.be/kMvrbo9VBZc
ενα βιντεο που δειχνει πως δουλευε πριν σταματησει να δουλευει...
Unlock Unlimited Access with GoProxy's Residential Proxies!
Experience seamless, secure, and unrestricted connectivity worldwide with GoProxy's Unlimited Residential Proxies.
Our service offers access to a global network of rotating residential IPs, ensuring top performance for your large-scale data collection, streaming, and more.
✔️Unlimited Traffic & IPs: Enjoy unrestricted access with our rotating residential proxies, delivering high performance through a vast global IP pool.
✔️High Success Rate: Achieve a 99.96% success rate with a rapid 0.6-second response time, ensuring efficient and reliable operations.
✔️Flexible Sessions: Customize IP rotation to fit your project needs, with options for automatic rotation and sticky sessions lasting up to 60 minutes.
✔️Global Coverage: Access IPs from over 120 countries, making it ideal for businesses requiring high bandwidth without region-specific constraints.
All plans include unlimited traffic and IPs, unlimited concurrent requests, and access to real residential IP addresses.
Elevate your online operations with GoProxy's Unlimited Residential Proxies—your smart choice for large-scale projects.
👉 Learn more and get started today: GoProxy Unlimited Proxies
Question
Irrelevant
Good evening. I downloaded the script for "olympiad rank" by "RedHot" . I want to be visible or accessable only from vip players, i tried several things but without success .
well here is the _init_ :
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.actor.appearance import PcAppearance
from com.l2jfrozen.gameserver.model.quest import State
from com.l2jfrozen.gameserver.model.actor.appearance import PcAppearance
from com.l2jfrozen.gameserver.model.quest import QuestState
from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest
qn = "20012_OlyRank"
NPC = [47]
QuestId = 20012
QuestName = "OlyRank"
QuestDesc = "custom"
InitialHtml = "1.htm"
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
# Duelist
if event == "88" :
INITIAL_HTML = "<html><head><title>Grand Olympiad Ranking</title></head><body><center><font color=66cc00>Olympiad Ranking Online System</font></center><br><center><img src=\"L2UI.SquareWhite\" width=300 height=1><img src=\"L2UI.SquareBlank\" width=1 height=3></center><table width=300 border=0 bgcolor=\"000000\"><tr><td>Position</td><center><td>|</td></center><td><center>Name</center></td><center><td>|</td></center><td><center>Points</center></td><center><td>|</td></center><td><center>Matches</center></td></tr>"
HTML_INFO =""
POSITION_VALUE_INITIAL = 0
CONNECTION = L2DatabaseFactory.getInstance().getConnection()
pts = CONNECTION.prepareStatement("SELECT char_name, olympiad_points, competitions_done from olympiad_nobles where class_id=88 and competitions_done>=9 order by olympiad_points desc, competitions_done desc");
rs = pts.executeQuery()
while (rs.next()) :
CHAR_NAME = rs.getString("char_name")
POINTS = rs.getString("olympiad_points")
COMP_DONE = rs.getString("competitions_done")
POSITION_VALUE_INITIAL = POSITION_VALUE_INITIAL + 1
STRING_POSITION = str(POSITION_VALUE_INITIAL)
HTML_INFO = HTML_INFO + "<tr><td><center>" + STRING_POSITION + "</td><center><td></td></center><td><center>" + CHAR_NAME +"</center></td><center><td></td></center><td><center>" + POINTS + "</center></td><center><td></td></center><td><center>" + COMP_DONE + "</center></td></tr>"
HTML_END = "</table></body></html>
in l2jfrozen vip member in java is ~> .isDonator()
2.html= an html i created which contains to non vip members.
i tried to add:
====================
def onTalk (self,npc,player):
+ st = player.getQuestState(qn)
return InitialHtml
def onEvent(self,event,st):
htmltext = event
+ if st.getPlayer().isVip() < 1 : <~Also tried with "isDonator()"
+ htmltext ="2.htm"
+ else:
+ st.getPlayer().setTarget(st.getPlayer())
any help ?
EDIT: I managed to do that only for vip with just add:
def onTalk (self,npc,player):
+ if player.isDonator()==1:
return InitialHtml
But i feel isn't right that way :/
1 answer to this question
Recommended Posts