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
Account Features
➡ EARLY SUPPORTER BADGE
➡ NO QUEST BADGE
➡ 24 MONTHS BOOST BADGE
➡ 1 YEAR NITRO SUBSCRIPTION
➡ CREATION DATE IS 2017
➡ ACCOUNT STANDING STATUS IS ALL GOOD
➡ CLEAN BILLING
➡ OGE MAIL OUTLOOK
PAYMENT METHODS
➡ CRYPTO
➡ PAYPAL
➡ CASHAPP
➡ BANK TRANSFER
➡ GIFTCARDS
➡ ZELLE
➡ VENMO
CONTACTS
➡ DISCORD : crh11s
➡ TELEGRAM : crh11s
CONTACT WITH ME IF YOU ARE SERIOUS BUYE
To check the operation of npc movement. You can turn off all movement in the game and move only the npc you want using the move to package. This way you will reduce a lot of unnecessary code and understand where the problem is.
And all your maps are not thread safe and you are using multithreading
startQuestTimer("move", 5000, npc, null);
Verify if following is supposed to be the way to handle movement
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(point.getX(), point.getY(), point.getZ()));
For me, it's not enough. And if it's the case, whole AI system is probably buggy.
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