from net.sf.l2j.gameserver.datatables import CharTemplateTable
from net.sf.l2j.gameserver.model.base import ClassType
from net.sf.l2j.gameserver.model.base import Race
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 import SystemMessageId
from net.sf.l2j.gameserver.network.serverpackets import SystemMessage
def getClassIndex(player):
if player.getClassId().getId() in WARRIORCLASSES:
return 0
if player.getClassId().getId() in KNIGHTCLASSES:
return 1
if player.getClassId().getId() in ROGUECLASSES:
return 2
if player.getClassId().getId() in ENCHANTERCLASSES:
return 3
if player.getClassId().getId() in WIZARDCLASSES:
return 4
if player.getClassId().getId() in SUMMONERCLASSES:
return 5
if player.getClassId().getId() in HEALERCLASSES:
return 6
return -1
def onAdvEvent (self, event, npc, player) :
st = player.getQuestState(qn)
htmltext = event
if event == "GetCertified":
if player.isSubClassActive():
if isCorrectMaster(npc, player):
if player.getLevel() >= 90:
return "CertificationList.htm"
else:
return "9002-08.htm"
else:
return "9002-04.htm"
else:
return "9002-03.htm"
elif event == "Obtain90":
html = "<html><body>Subclass Skill Certification:<br>You are trying to obtain level %level% certification of %class%, %skilltype%. Remember that once this subclass is certified, it cannot be re-certified -- even if you delete this class and develop another one -- without a special and expensive cancellation process.<br>Do you still want to be certified?<br><a action=\"bypass -h Quest 9002_SubClassCertification %event%\">Obtain certification.</a><br><a action=\"bypass -h Quest 9002_SubClassCertification 9002-05.htm\">Do not obtain certification.</a></body></html>
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Hi, i'm looking for java developper for our project. Classic chronicles
I pay before fixes depends the task and its a long term project so many fixes to do during months.
Usually its simple tasks but i would prefer skilled java developpers.
I won't take everybody just for some screens, i want quotes if possible from previous customers or high ranked members on this website that can give me advices about them.
Thank you
I created a window that shows the new item in the inventory, I added a movement downwards, I would like that when it disappears and appears again, it appears in its initial position.How can I create this?
Instant Delivery - Full warranty
1 Month Server Boosts
Level 1 : 2 Server Boosts $2.00
Level 2 : 7 Server Boosts $6.00
Level 3 : 14 Server Boosts $10.00
3 Months Server Boosts
Level 1 : 2 Server Boosts $3.00
Level 2 : 7 Server Boosts $10.00
Level 3 : 14 Server Boosts $15.00
How to Buy ?
reach out our store for full automated process : https://utchihamkt.mysellix.io/
after purchasing you provide me your permanent server Invite Link , Entry is via a bot, you need to add our Discord Bot to your server The Bot Invite link will be provided to you after "payment completed" (Bot needs "Create Invite" permission only) our accounts will join your server and boost the server
. if you kick our accounts from the server will cause you to lose the boost
Before you place order, please make sure you have turned off anti-spam/anti-raid Discord Bot
. if our bots get banned / kicked from the server, we will not provide refill or refund
Question
TheOlympus
#
# Created by Gigiikun on 2009.06.01.
import sys
from net.sf.l2j.gameserver.datatables import CharTemplateTable
from net.sf.l2j.gameserver.model.base import ClassType
from net.sf.l2j.gameserver.model.base import Race
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 import SystemMessageId
from net.sf.l2j.gameserver.network.serverpackets import SystemMessage
qn = "9002_SubClassCertification"
NPC=[30026,30031,30037,30066,30070,30109,30115,30120,30154,30174,30175,30176,30187, \
30191,30195,30288,30289,30290,30297,30358,30373,30462,30474,30498,30499,30500, \
30503,30504,30505,30508,30511,30512,30513,30520,30525,30565,30594,30595,30676, \
30677,30681,30685,30687,30689,30694,30699,30704,30845,30847,30849,30854,30857, \
30862,30865,30894,30897,30900,30905,30910,30913,31269,31272,31276,31279,31285, \
31288,31314,31317,31321,31324,31326,31328,31331,31334,31336,31755,31958,31961, \
31965,31968,31974,31977,31996,32092,32093,32094,32095,32096,32097,32098,32145, \
32146,32147,32150,32153,32154,32157,32158,32160,32171,32193,32199,32202,32213, \
32214,32221,32222,32229,32230,32233,32234]
WARRIORCLASSES=[3,88,2,89,46,48,113,114,55,117,56,118,127,131,128,129,132,133]
ROGUECLASSES=[9,92,24,102,37,109,130,134,8,93,23,101,36,108]
KNIGHTCLASSES=[5,90,6,91,20,99,33,106]
SUMMONERCLASSES=[14,96,28,104,41,111]
WIZARDCLASSES=[12,94,13,95,27,103,40,110]
HEALERCLASSES=[16,97,30,105,43,112]
ENCHANTERCLASSES=[17,98,21,100,34,107,51,115,52,116,135,136]
COMMONITEM=10280
ENHANCEDITEM=10612
CLASSITEMS={
0:10281, # Warriors
1:10282, # Knights
2:10283, # Rogues
3:10287, # Enchanters
4:10284, # Wizards
5:10286, # Summoners
6:10285 # Healers
}
TRANSFORMITEMS={
0:10289, # Warriors
1:10288, # Knights
2:10290, # Rogues
3:10293, # Enchanters
4:10292, # Wizards
5:10294, # Summoners
6:10291 # Healers
}
def isCorrectMaster(npc, player):
return True
def getClassIndex(player):
if player.getClassId().getId() in WARRIORCLASSES:
return 0
if player.getClassId().getId() in KNIGHTCLASSES:
return 1
if player.getClassId().getId() in ROGUECLASSES:
return 2
if player.getClassId().getId() in ENCHANTERCLASSES:
return 3
if player.getClassId().getId() in WIZARDCLASSES:
return 4
if player.getClassId().getId() in SUMMONERCLASSES:
return 5
if player.getClassId().getId() in HEALERCLASSES:
return 6
return -1
def getCertified(player, itemId, var):
st = player.getQuestState(qn)
qvar = st.getGlobalQuestVar(var)
if qvar != "" and qvar != "0" :
return ""
item = player.getInventory().addItem("Quest", itemId, 1, player, player.getTarget())
st.saveGlobalQuestVar(var,str(item.getObjectId()))
smsg = SystemMessage(SystemMessageId.EARNED_ITEM)
smsg.addItemName(item)
player.sendPacket(smsg)
return
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onAdvEvent (self, event, npc, player) :
st = player.getQuestState(qn)
htmltext = event
if event == "GetCertified":
if player.isSubClassActive():
if isCorrectMaster(npc, player):
if player.getLevel() >= 90:
return "CertificationList.htm"
else:
return "9002-08.htm"
else:
return "9002-04.htm"
else:
return "9002-03.htm"
elif event == "Obtain90":
html = "<html><body>Subclass Skill Certification:<br>You are trying to obtain level %level% certification of %class%, %skilltype%. Remember that once this subclass is certified, it cannot be re-certified -- even if you delete this class and develop another one -- without a special and expensive cancellation process.<br>Do you still want to be certified?<br><a action=\"bypass -h Quest 9002_SubClassCertification %event%\">Obtain certification.</a><br><a action=\"bypass -h Quest 9002_SubClassCertification 9002-05.htm\">Do not obtain certification.</a></body></html>
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.