TA的每日心情 | 开心 17 小时前 |
|---|
签到天数: 649 天 [LV.9]以坛为家II
论坛元老
 
- 积分
- 9426
|

楼主 |
发表于 2025-9-27 23:36:12
|
显示全部楼层
import sys
from lineage.game.model.quest import State
from lineage.game.model.quest import QuestState
from lineage.game.model.quest.jython import QuestJython as JQuest
qn = "417_PathToScavenger"
RING_OF_RAVEN = 1642
PIPIS_LETTER = 1643
ROUTS_TP_SCROLL = 1644
SUCCUBUS_UNDIES = 1645
MIONS_LETTER = 1646
BRONKS_INGOT = 1647
CHALIS_AXE = 1648
ZIMENFS_POTION = 1649
BRONKS_PAY = 1650
CHALIS_PAY = 1651
ZIMENFS_PAY = 1652
BEAR_PIC = 1653
TARANTULA_PIC = 1654
HONEY_JAR = 1655
BEAD = 1656
BEAD_PARCEL = 1657
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()
classId = st.getPlayer().getClassId().getId()
if event == "1" :
st.set("id","0")
if level >= 19 and classId == 0x35 and st.getQuestItemsCount(RING_OF_RAVEN) == 0 :
st.set("cond","1")
st.setState(STARTED)
st.playSound("ItemSound.quest_accept")
st.giveItems(PIPIS_LETTER,1)
htmltext = "30524-05.htm"
elif classId != 0x35 :
if classId == 0x36 :
htmltext = "30524-02a.htm"
else:
htmltext = "30524-08.htm"
elif level < 19 and classId == 0x35 :
htmltext = "30524-02.htm"
elif level >= 19 and classId == 0x35 and st.getQuestItemsCount(RING_OF_RAVEN) == 1 :
htmltext = "30524-04.htm"
elif event == "30519_1" :
if st.getQuestItemsCount(PIPIS_LETTER):
st.takeItems(PIPIS_LETTER,1)
st.set("cond","2")
n = st.getRandom(3)
if n == 0:
htmltext = "30519-02.htm"
st.giveItems(ZIMENFS_POTION,1)
elif n == 1:
htmltext = "30519-03.htm"
st.giveItems(CHALIS_AXE,1)
elif n == 2:
htmltext = "30519-04.htm"
st.giveItems(BRONKS_INGOT,1)
else:
htmltext = "<html><body>You are either not carrying out your quest or don't meet the criteria.</body></html>"
elif event == "30519_2" :
htmltext = "30519-06.htm"
elif event == "30519_3" :
htmltext = "30519-07.htm"
st.set("id",str(st.getInt("id")+1))
elif event == "30519_4" :
n = st.getRandom(2)
if n == 0:
htmltext = "30519-06.htm"
if n == 1:
htmltext = "30519-11.htm"
elif event == "30519_5" :
if st.getQuestItemsCount(ZIMENFS_POTION) or st.getQuestItemsCount(CHALIS_AXE) or st.getQuestItemsCount(BRONKS_INGOT):
if st.getInt("id") / 10 < 2 :
htmltext = "30519-07.htm"
st.set("id",str(st.getInt("id")+1))
elif st.getInt("id") / 10 >= 2 and st.getInt("cond") == 0 :
htmltext = "30519-09.htm"
if st.getInt("id") / 10 < 3 :
st.set("id",str(st.getInt("id")+1))
elif st.getInt("id") / 10 >= 3 and st.getInt("cond") > 0 :
htmltext = "30519-10.htm"
st.giveItems(MIONS_LETTER,1)
st.takeItems(CHALIS_AXE,1)
st.takeItems(ZIMENFS_POTION,1)
st.takeItems(BRONKS_INGOT,1)
else:
htmltext = "<html><body>You are either not carrying out your quest or don't meet the criteria.</body></html>"
elif event == "30519_6" :
if st.getQuestItemsCount(ZIMENFS_PAY) or st.getQuestItemsCount(CHALIS_PAY) or st.getQuestItemsCount(BRONKS_PAY):
n = st.getRandom(3)
st.takeItems(ZIMENFS_PAY,1)
st.takeItems(CHALIS_PAY,1)
st.takeItems(BRONKS_PAY,1)
if n == 0:
htmltext = "30519-02.htm"
st.giveItems(ZIMENFS_POTION,1)
elif n == 1:
htmltext = "30519-03.htm"
st.giveItems(CHALIS_AXE,1)
elif n == 2:
htmltext = "30519-04.htm"
st.giveItems(BRONKS_INGOT,1)
else:
htmltext = "<html><body>You are either not carrying out your quest or don't meet the criteria.</body></html>"
elif event == "30316_1" :
if st.getQuestItemsCount(BEAD_PARCEL):
htmltext = "30316-02.htm"
st.takeItems(BEAD_PARCEL,1)
st.giveItems(ROUTS_TP_SCROLL,1)
st.set("cond","10")
else:
htmltext = "<html><body>You are either not carrying out your quest or don't meet the criteria.</body></html>"
elif event == "30316_2" :
if st.getQuestItemsCount(BEAD_PARCEL):
htmltext = "30316-03.htm"
st.takeItems(BEAD_PARCEL,1)
st.giveItems(ROUTS_TP_SCROLL,1)
st.set("cond","10")
else:
htmltext = "<html><body>You are either not carrying out your quest or don't meet the criteria.</body></html>"
elif event == "30557_1" :
htmltext = "30557-02.htm"
elif event == "30557_2" :
if st.getQuestItemsCount(ROUTS_TP_SCROLL):
htmltext = "30557-03.htm"
st.takeItems(ROUTS_TP_SCROLL,1)
st.giveItems(SUCCUBUS_UNDIES,1)
st.set("cond","11")
else:
htmltext = "<html><body>You are either not carrying out your quest or don't meet the criteria.</body></html>"
return htmltext
|
|