|
@@ -1,4 +1,4 @@
|
|
|
-# Made by Mr. Have fun! Version 0.2
|
|
|
+# Made by Mr. - Version 0.3 by kmarty and DrLecter
|
|
|
import sys
|
|
|
from net.sf.l2j.gameserver.model.quest import State
|
|
|
from net.sf.l2j.gameserver.model.quest import QuestState
|
|
@@ -10,6 +10,8 @@ ELVEN_KNIGHT_BROOCH_ID = 1204
|
|
|
TOPAZ_PIECE_ID = 1205
|
|
|
EMERALD_PIECE_ID = 1206
|
|
|
KLUTO_MEMO_ID = 1276
|
|
|
+#messages
|
|
|
+default="<html><head><body>I have nothing to say you</body></html>"
|
|
|
|
|
|
class Quest (JQuest) :
|
|
|
|
|
@@ -17,88 +19,92 @@ class Quest (JQuest) :
|
|
|
|
|
|
def onEvent (self,event,st) :
|
|
|
htmltext = event
|
|
|
- if event == "406_1" :
|
|
|
- if st.getPlayer().getClassId().getId() != 0x12 :
|
|
|
- if st.getPlayer().getClassId().getId() == 0x13 :
|
|
|
- htmltext = "7327-02a.htm"
|
|
|
- else:
|
|
|
- htmltext = "7327-02.htm"
|
|
|
- st.exitQuest(1)
|
|
|
+ if event == "7327-05.htm" :
|
|
|
+ if st.getPlayer().getClassId().getId() != 0x12 :
|
|
|
+ if st.getPlayer().getClassId().getId() == 0x13 :
|
|
|
+ htmltext = "7327-02a.htm"
|
|
|
else:
|
|
|
- if st.getPlayer().getLevel()<19 :
|
|
|
- htmltext = "7327-03.htm"
|
|
|
- st.exitQuest(1)
|
|
|
- else:
|
|
|
- if st.getQuestItemsCount(ELVEN_KNIGHT_BROOCH_ID) :
|
|
|
+ htmltext = "7327-02.htm"
|
|
|
+ st.exitQuest(1)
|
|
|
+ else:
|
|
|
+ if st.getPlayer().getLevel()<19 :
|
|
|
+ htmltext = "7327-03.htm"
|
|
|
+ st.exitQuest(1)
|
|
|
+ else:
|
|
|
+ if st.getQuestItemsCount(ELVEN_KNIGHT_BROOCH_ID) :
|
|
|
htmltext = "7327-04.htm"
|
|
|
- else:
|
|
|
- htmltext = "7327-05.htm"
|
|
|
- elif event == "1" :
|
|
|
- st.set("cond","1")
|
|
|
- st.setState(STARTED)
|
|
|
- st.playSound("ItemSound.quest_accept")
|
|
|
- htmltext = "7327-06.htm"
|
|
|
- elif event == "406_2" :
|
|
|
- if int(st.get("cond")) != 0 :
|
|
|
- st.takeItems(SORIUS_LETTER1_ID,st.getQuestItemsCount(SORIUS_LETTER1_ID))
|
|
|
- if st.getQuestItemsCount(KLUTO_MEMO_ID) == 0 :
|
|
|
- st.giveItems(KLUTO_MEMO_ID,1)
|
|
|
- st.set("cond","4")
|
|
|
- htmltext = "7317-02.htm"
|
|
|
+ elif event == "7327-06.htm" :
|
|
|
+ st.set("cond","1")
|
|
|
+ st.setState(STARTED)
|
|
|
+ st.playSound("ItemSound.quest_accept")
|
|
|
+ elif event == "7317-02.htm" :
|
|
|
+ if int(st.get("cond")) == 3 :
|
|
|
+ st.takeItems(SORIUS_LETTER1_ID,-1)
|
|
|
+ if st.getQuestItemsCount(KLUTO_MEMO_ID) == 0 :
|
|
|
+ st.giveItems(KLUTO_MEMO_ID,1)
|
|
|
+ st.set("cond","4")
|
|
|
+ else :
|
|
|
+ htmltext = default
|
|
|
+ else :
|
|
|
+ htmltext = default
|
|
|
return htmltext
|
|
|
|
|
|
-
|
|
|
def onTalk (Self,npc,st):
|
|
|
npcId = npc.getNpcId()
|
|
|
- htmltext = "<html><head><body>I have nothing to say you</body></html>"
|
|
|
+ htmltext = default
|
|
|
id = st.getState()
|
|
|
if id == CREATED :
|
|
|
st.set("cond","0")
|
|
|
- if npcId == 7327 and int(st.get("cond"))==0 :
|
|
|
- htmltext = "7327-01.htm"
|
|
|
- elif npcId == 7327 and int(st.get("cond"))!=0 and st.getQuestItemsCount(KLUTO_BOX_ID)==0 and st.getQuestItemsCount(TOPAZ_PIECE_ID)==0 :
|
|
|
- htmltext = "7327-07.htm"
|
|
|
- elif npcId == 7327 and int(st.get("cond"))!=0 and st.getQuestItemsCount(KLUTO_BOX_ID)==0 and st.getQuestItemsCount(TOPAZ_PIECE_ID)>0 and st.getQuestItemsCount(TOPAZ_PIECE_ID)<19 :
|
|
|
- htmltext = "7327-08.htm"
|
|
|
- elif npcId == 7327 and int(st.get("cond"))!=0 and st.getQuestItemsCount(KLUTO_BOX_ID)==0 and st.getQuestItemsCount(TOPAZ_PIECE_ID)>=19 and st.getQuestItemsCount(SORIUS_LETTER1_ID)==0 and st.getQuestItemsCount(KLUTO_MEMO_ID)==0 :
|
|
|
- if st.getQuestItemsCount(SORIUS_LETTER1_ID) == 0 :
|
|
|
- st.giveItems(SORIUS_LETTER1_ID,1)
|
|
|
- st.set("cond","3")
|
|
|
- htmltext = "7327-09.htm"
|
|
|
- elif npcId == 7327 and int(st.get("cond"))!=0 and st.getQuestItemsCount(KLUTO_BOX_ID)==0 and st.getQuestItemsCount(TOPAZ_PIECE_ID)>=19 and st.getQuestItemsCount(SORIUS_LETTER1_ID)!=0 :
|
|
|
- htmltext = "7327-11.htm"
|
|
|
- elif npcId == 7327 and int(st.get("cond"))!=0 and st.getQuestItemsCount(KLUTO_BOX_ID)==0 and st.getQuestItemsCount(TOPAZ_PIECE_ID)>=19 and st.getQuestItemsCount(KLUTO_MEMO_ID)!=0 :
|
|
|
- htmltext = "7327-11.htm"
|
|
|
- elif npcId == 7317 and int(st.get("cond"))!=0 and st.getQuestItemsCount(KLUTO_BOX_ID)==0 and st.getQuestItemsCount(TOPAZ_PIECE_ID)>=20 and st.getQuestItemsCount(SORIUS_LETTER1_ID)!=0 :
|
|
|
- htmltext = "7317-01.htm"
|
|
|
- elif npcId == 7317 and int(st.get("cond"))!=0 and st.getQuestItemsCount(KLUTO_BOX_ID)==0 and st.getQuestItemsCount(TOPAZ_PIECE_ID)>=20 and st.getQuestItemsCount(KLUTO_MEMO_ID)!=0 and st.getQuestItemsCount(EMERALD_PIECE_ID)==0 :
|
|
|
- htmltext = "7317-03.htm"
|
|
|
- elif npcId == 7317 and int(st.get("cond"))!=0 and st.getQuestItemsCount(KLUTO_BOX_ID)==0 and st.getQuestItemsCount(TOPAZ_PIECE_ID)>=20 and st.getQuestItemsCount(KLUTO_MEMO_ID)!=0 and st.getQuestItemsCount(EMERALD_PIECE_ID)>0 and st.getQuestItemsCount(EMERALD_PIECE_ID)<20 :
|
|
|
- htmltext = "7317-04.htm"
|
|
|
- elif npcId == 7317 and int(st.get("cond"))!=0 and st.getQuestItemsCount(KLUTO_BOX_ID)==0 and st.getQuestItemsCount(TOPAZ_PIECE_ID)>=20 and st.getQuestItemsCount(KLUTO_MEMO_ID)!=0 and st.getQuestItemsCount(EMERALD_PIECE_ID)>=20 :
|
|
|
- st.takeItems(EMERALD_PIECE_ID,st.getQuestItemsCount(EMERALD_PIECE_ID))
|
|
|
- st.takeItems(TOPAZ_PIECE_ID,st.getQuestItemsCount(TOPAZ_PIECE_ID))
|
|
|
- if st.getQuestItemsCount(KLUTO_BOX_ID) == 0 :
|
|
|
- st.giveItems(KLUTO_BOX_ID,1)
|
|
|
- st.takeItems(KLUTO_MEMO_ID,1)
|
|
|
- st.set("cond","6")
|
|
|
- htmltext = "7317-05.htm"
|
|
|
- elif npcId == 7317 and int(st.get("cond"))!=0 and st.getQuestItemsCount(KLUTO_BOX_ID)!=0 :
|
|
|
- htmltext = "7317-06.htm"
|
|
|
- elif npcId == 7327 and int(st.get("cond"))!=0 and st.getQuestItemsCount(KLUTO_BOX_ID)!=0 :
|
|
|
- st.takeItems(KLUTO_BOX_ID,st.getQuestItemsCount(KLUTO_BOX_ID))
|
|
|
- st.set("cond","0")
|
|
|
- st.setState(COMPLETED)
|
|
|
- st.playSound("ItemSound.quest_finish")
|
|
|
- if st.getQuestItemsCount(ELVEN_KNIGHT_BROOCH_ID) == 0 :
|
|
|
- st.giveItems(ELVEN_KNIGHT_BROOCH_ID,1)
|
|
|
- htmltext = "7327-10.htm"
|
|
|
+ cond=0
|
|
|
+ else :
|
|
|
+ cond=int(st.get("cond"))
|
|
|
+ if npcId == 7327 :
|
|
|
+ if cond == 0 :
|
|
|
+ htmltext = "7327-01.htm"
|
|
|
+ elif cond == 1 :
|
|
|
+ if st.getQuestItemsCount(TOPAZ_PIECE_ID)==0 :
|
|
|
+ htmltext = "7327-07.htm"
|
|
|
+ else:
|
|
|
+ htmltext = "7327-08.htm"
|
|
|
+ elif cond == 2 :
|
|
|
+ if st.getQuestItemsCount(SORIUS_LETTER1_ID) == 0 :
|
|
|
+ st.giveItems(SORIUS_LETTER1_ID,1)
|
|
|
+ st.set("cond","3")
|
|
|
+ htmltext = "7327-09.htm"
|
|
|
+ elif cond in [3, 4, 5] :
|
|
|
+ htmltext = "7327-11.htm"
|
|
|
+ elif cond == 6 :
|
|
|
+ st.takeItems(KLUTO_BOX_ID,-1)
|
|
|
+ st.set("cond","0")
|
|
|
+ st.setState(COMPLETED)
|
|
|
+ st.playSound("ItemSound.quest_finish")
|
|
|
+ if st.getQuestItemsCount(ELVEN_KNIGHT_BROOCH_ID) == 0 :
|
|
|
+ st.giveItems(ELVEN_KNIGHT_BROOCH_ID,1)
|
|
|
+ htmltext = "7327-10.htm"
|
|
|
+ elif npcId == 7317 :
|
|
|
+ if cond == 3 :
|
|
|
+ htmltext = "7317-01.htm"
|
|
|
+ elif cond == 4 :
|
|
|
+ if st.getQuestItemsCount(EMERALD_PIECE_ID)==0 :
|
|
|
+ htmltext = "7317-03.htm"
|
|
|
+ else:
|
|
|
+ htmltext = "7317-04.htm"
|
|
|
+ elif cond == 5 :
|
|
|
+ st.takeItems(EMERALD_PIECE_ID,-1)
|
|
|
+ st.takeItems(TOPAZ_PIECE_ID,-1)
|
|
|
+ if st.getQuestItemsCount(KLUTO_BOX_ID) == 0 :
|
|
|
+ st.giveItems(KLUTO_BOX_ID,1)
|
|
|
+ st.takeItems(KLUTO_MEMO_ID,-1)
|
|
|
+ st.set("cond","6")
|
|
|
+ htmltext = "7317-05.htm"
|
|
|
+ elif cond == 6 :
|
|
|
+ htmltext = "7317-06.htm"
|
|
|
return htmltext
|
|
|
|
|
|
def onKill (self,npc,st):
|
|
|
npcId = npc.getNpcId()
|
|
|
if npcId != 782 :
|
|
|
- if int(st.get("cond")) and st.getQuestItemsCount(KLUTO_BOX_ID) == 0 and st.getQuestItemsCount(TOPAZ_PIECE_ID)<20 and st.getRandom(100)<70 :
|
|
|
+ if int(st.get("cond"))==1 and st.getQuestItemsCount(TOPAZ_PIECE_ID)<20 and st.getRandom(100)<70 :
|
|
|
st.giveItems(TOPAZ_PIECE_ID,1)
|
|
|
if st.getQuestItemsCount(TOPAZ_PIECE_ID) == 20 :
|
|
|
st.playSound("ItemSound.quest_middle")
|
|
@@ -106,7 +112,7 @@ class Quest (JQuest) :
|
|
|
else:
|
|
|
st.playSound("ItemSound.quest_itemget")
|
|
|
else :
|
|
|
- if int(st.get("cond")) and st.getQuestItemsCount(KLUTO_MEMO_ID) and st.getQuestItemsCount(EMERALD_PIECE_ID)<20 and st.getRandom(100)<50 :
|
|
|
+ if int(st.get("cond"))==4 and st.getQuestItemsCount(EMERALD_PIECE_ID)<20 and st.getRandom(100)<50 :
|
|
|
st.giveItems(EMERALD_PIECE_ID,1)
|
|
|
if st.getQuestItemsCount(EMERALD_PIECE_ID) == 20 :
|
|
|
st.playSound("ItemSound.quest_middle")
|
|
@@ -143,11 +149,6 @@ STARTED.addKillId(782)
|
|
|
STARTED.addQuestDrop(7327,SORIUS_LETTER1_ID,1)
|
|
|
STARTED.addQuestDrop(782,EMERALD_PIECE_ID,1)
|
|
|
STARTED.addQuestDrop(54,TOPAZ_PIECE_ID,1)
|
|
|
-STARTED.addQuestDrop(60,TOPAZ_PIECE_ID,1)
|
|
|
-STARTED.addQuestDrop(35,TOPAZ_PIECE_ID,1)
|
|
|
-STARTED.addQuestDrop(42,TOPAZ_PIECE_ID,1)
|
|
|
-STARTED.addQuestDrop(51,TOPAZ_PIECE_ID,1)
|
|
|
-STARTED.addQuestDrop(45,TOPAZ_PIECE_ID,1)
|
|
|
STARTED.addQuestDrop(7317,KLUTO_MEMO_ID,1)
|
|
|
STARTED.addQuestDrop(7317,KLUTO_BOX_ID,1)
|
|
|
|