return htmltext def onKill (self,npc,st): npcId = npc.getNpcId() random = st.getRandom(100) if random<=CHANCE : st.giveItems(LIENRIK_EGG1,1) if random<=CHANCE2 : st.giveItems(LIENRIK_EGG2,1) return QUEST = Quest(352,"352_HelpRoodRaiseANewPet","Help Rood Raise A New Pet") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(8067) CREATED.addTalkId(8067) STARTED.addTalkId(8067) STARTED.addQuestDrop(8067,LIENRIK_EGG1,1) STARTED.addQuestDrop(8067,LIENRIK_EGG2,1) STARTED.addKillId(786) STARTED.addKillId(787) print "importing quests: 352: Help Rood Raise A New Pet"
elif st.getQuestItemsCount(TALINS_PERIDOT_ID) == 0: st.giveItems(TALINS_PERIDOT_ID, 1) st.playSound("ItemSound.quest_middle") return QUEST = Quest(218, "218_TestimonyOfLife", "Testimony of Life") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7460) STARTING.addTalkId(7460) STARTED.addTalkId(7154) STARTED.addTalkId(7300) STARTED.addTalkId(7371) STARTED.addTalkId(7375) STARTED.addTalkId(7419) STARTED.addTalkId(7460) STARTED.addTalkId(7655) STARTED.addKillId(145) STARTED.addKillId(176) STARTED.addKillId(233) STARTED.addKillId(5077) STARTED.addKillId(550) STARTED.addKillId(581)
st.playSound("ItemSound.quest_itemget") else: st.playSound("ItemSound.quest_middle") st.set("cond","2") st.giveItems(MARAKU_WEREWOLF_HEAD,1) if st.getRandom(100) <= 5 : st.giveItems(MARAKU_WOLFMEN_TOTEM,1) return QUEST = Quest(274,"274_AgainstWolfMen","Against Wolf Men") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7569) CREATED.addTalkId(7569) STARTING.addTalkId(7569) STARTED.addTalkId(7569) COMPLETED.addTalkId(7569) STARTED.addKillId(363) STARTED.addKillId(364) STARTED.addQuestDrop(363,MARAKU_WEREWOLF_HEAD,1) STARTED.addQuestDrop(364,MARAKU_WEREWOLF_HEAD,1) print "importing quests: 274: Against Wolf Men"
htmltext = "Trade has been canceled." if htmltext != event: st.setState(COMPLETED) st.exitQuest(1) return htmltext def onTalk (Self,npc,st): npcId = npc.getNpcId() htmltext = "<html><head><body>I have nothing to say to you.</body></html>" st.set("cond","0") st.setState(STARTED) return "1.htm" QUEST = Quest(1005,"1005_unseal","Blacksmith") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(8126) STARTED.addTalkId(8126)
if chance > 0: if st.getRandom(100) < chance and st.getQuestItemsCount(dropId) == 0: st.giveItems(dropId,1) st.playSound("Itemsound.quest_itemget") if npcId == 12372: st.takeItems(PIPETTE_KNIFE,1) if spawnId > 0 : st.getPcSpawn().addSpawn(spawnId,npc.getX(),npc.getY(),npc.getZ(),120000) return QUEST = Quest(234,"234_FatesWhisper","Fate's Whisper") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(NPC[0]) CREATED.addTalkId(NPC[0]) for npcId in NPC: STARTED.addTalkId(npcId) for mobId in DROPLIST.keys() : STARTED.addKillId(mobId) STARTED.addAttackId(12372) print "importing quests: 234: Fate's Whisper"
st.set("cond", "2") st.set("id", "2") st.playSound("ItemSound.quest_middle") return htmltext QUEST = Quest(5, "5_MinersFavor", "Miner's Favor") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(BOLTER) STARTING.addTalkId(BOLTER) STARTED.addTalkId(SHARI) STARTED.addTalkId(GARITA) STARTED.addTalkId(REED) STARTED.addTalkId(BRUNON) STARTED.addTalkId(BOLTER) STARTED.addQuestDrop(BOLTER, MINING_BOOTS, 1) STARTED.addQuestDrop(BOLTER, MINERS_PICK, 1) STARTED.addQuestDrop(BOLTER, BOOMBOOM_POWDER, 1) STARTED.addQuestDrop(BOLTER, REDSTONE_BEER, 1) STARTED.addQuestDrop(BOLTER, BOLTERS_LIST, 1) STARTED.addQuestDrop(BOLTER, BOLTERS_SMELLY_SOCKS, 1) print "importing quests: 5: Miner's Favor"
htmltext = "7066-38.htm" if ClassId in [ClassId.templeKnight, ClassId.plainsWalker, ClassId.swordSinger, ClassId.silverRanger]: htmltext = "7066-39.htm" if ClassId in [ClassId.warlord, ClassId.paladin, ClassId.treasureHunter]: htmltext = "7066-39.htm" if ClassId in [ClassId.gladiator, ClassId.darkAvenger, ClassId.hawkeye]: htmltext = "7066-39.htm" else: htmltext = "7066-40.htm" st.setState(COMPLETED) st.exitQuest(1) return htmltext # All other Races must be out if npcId == GRAND_MASTER_PABRIS and Race in [Race.dwarf, Race.darkelf, Race.orc]: st.setState(COMPLETED) st.exitQuest(1) return "7066-40.htm" QUEST = Quest(7066,"7066_pabris_occupation_change","village_master") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7066) STARTED.addTalkId(7066)
if ClassId in [ ClassId.gladiator, ClassId.darkAvenger, ClassId.hawkeye ]: st.setState(COMPLETED) st.exitQuest(1) return "7288-39.htm" else: st.setState(COMPLETED) st.exitQuest(1) return "7288-40.htm" # All other Races must be out if npcId == GRAND_MASTER_RAINS and Race in [ Race.dwarf, Race.darkelf, Race.orc ]: st.setState(COMPLETED) st.exitQuest(1) return "7288-40.htm" QUEST = Quest(7288, "7288_rains_occupation_change", "village_master") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7288) STARTED.addTalkId(7288)
st.exitQuest(1) return "7120-24.htm" else: st.setState(COMPLETED) st.exitQuest(1) return "7120-26.htm" # All other Races must be out else: st.setState(COMPLETED) st.exitQuest(1) return "7120-26.htm" QUEST = Quest(7120, "7120_maximilian_occupation_change", "village_master") CREATED = State("Start", QUEST) STARTED = State("Started", QUEST) COMPLETED = State("Completed", QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7120) QUEST.addStartNpc(7191) QUEST.addStartNpc(7857) QUEST.addStartNpc(7905) STARTED.addTalkId(7120) STARTED.addTalkId(7191) STARTED.addTalkId(7857) STARTED.addTalkId(7905)
htmltext = "7957_6.htm" elif npcId == 7956 and cond == 4 and st.getQuestItemsCount( 4316) and st.getQuestItemsCount(4317): st.takeItems(4316, 1) st.takeItems(4317, 1) st.set("cond", "5") htmltext = "7956_1.htm" elif npcId == 7957 and cond == 5: htmltext = "7957_4.htm" return htmltext QUEST = Quest(362, "362_BardsMandolin", "Bards Mandolin") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7957) CREATED.addTalkId(7957) STARTED.addTalkId(7957) STARTED.addTalkId(7956) STARTED.addTalkId(7958) STARTED.addTalkId(7837) STARTED.addQuestDrop(7957, 4316, 1) STARTED.addQuestDrop(7957, 4317, 1) print "importing quests: 362: Bards Mandolin"
st.set("cond", "12") else: st.giveItems(FELIM_TOOTH_ID, 1) st.playSound("ItemSound.quest_itemget") return QUEST = Quest(415, "415_PathToOrcMonk", "Path To Orc Monk") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7587) STARTING.addTalkId(7587) STARTED.addTalkId(7501) STARTED.addTalkId(7587) STARTED.addTalkId(7590) STARTED.addTalkId(7591) STARTED.addKillId(14) STARTED.addKillId(17) STARTED.addKillId(24) STARTED.addKillId(359) STARTED.addKillId(415) STARTED.addKillId(478) STARTED.addKillId(479)
if st.getQuestItemsCount( HATOSS_ORDER3_ID) and st.getQuestItemsCount( LETTER_TO_ELF_ID) == 0: st.giveItems(LETTER_TO_ELF_ID, 1) st.playSound("ItemSound.quest_itemget") return QUEST = Quest(107, "107_ShowNoMercy", "Show No Mercy") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7568) STARTING.addTalkId(7568) STARTED.addTalkId(7568) STARTED.addTalkId(7580) STARTED.addKillId(5041) STARTED.addQuestDrop(7568, HATOSS_ORDER2_ID, 1) STARTED.addQuestDrop(5041, LETTER_TO_DARKELF_ID, 1) STARTED.addQuestDrop(5041, LETTER_TO_HUMAN_ID, 1) STARTED.addQuestDrop(5041, LETTER_TO_ELF_ID, 1) STARTED.addQuestDrop(7568, HATOSS_ORDER1_ID, 1) STARTED.addQuestDrop(7568, HATOSS_ORDER3_ID, 1)
else: htmltext = "7511-11.htm" st.setState(COMPLETED) st.exitQuest(1) return htmltext # All other Races must be out else: st.setState(COMPLETED) st.exitQuest(1) return "7511-11.htm" QUEST = Quest(7511,"7511_gesto_occupation_change","village_master") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7511) QUEST.addStartNpc(7676) QUEST.addStartNpc(7685) QUEST.addStartNpc(7845) QUEST.addStartNpc(7894) STARTED.addTalkId(7511) STARTED.addTalkId(7676) STARTED.addTalkId(7685) STARTED.addTalkId(7845) STARTED.addTalkId(7894)
def onTalk(Self, npc, st): npcId = npc.getNpcId() htmltext = "<html><head><body>I have nothing to say with you</body></html>" st.setState(STARTED) if InitialHtml == "onEvent": return do_RequestEvent(str(npcId), st) elif InitialHtml != "": return InitialHtml return htmltext ### Quest class and state definition QUEST = Quest(QuestId, str(QuestId) + "_" + QuestName, QuestDesc) CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) ### Quest initialization QUEST.setInitialState(CREATED) for item in NPC: ### Quest NPC starter initialization QUEST.addStartNpc(item) ### Quest NPC initialization STARTED.addTalkId(item) print ": Loaded " + str(len(Items)) + " item(s)"
htmltext = "7305-05.htm" return htmltext def onKill (self,npc,st): npcId = npc.getNpcId() if int(st.get("cond")) == 1 : st.giveItems(NIGHTMARE_CRYSTAL,1) st.playSound("ItemSound.quest_middle") st.set("cond","2") return QUEST = Quest(170,"170_DangerousAllure","Dangerous Allure") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7305) CREATED.addTalkId(7305) STARTING.addTalkId(7305) STARTED.addTalkId(7305) COMPLETED.addTalkId(7305) STARTED.addKillId(5022) STARTED.addQuestDrop(5022,NIGHTMARE_CRYSTAL,1) print "importing quests: 170: Dangerous Allure"
htmltext = "7148-01.htm" else: htmltext = "7148-03.htm" elif npcId == ASTERIOS and cond == 2 and st.getQuestItemsCount( ARIELS_RECOMMENDATION) > 0: htmltext = "7154-01.htm" elif npcId == MIRABEL and cond == 3: htmltext = "7146-05.htm" return htmltext QUEST = Quest(7, "7_ATripBegins", "A Trip Begins") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(MIRABEL) CREATED.addTalkId(MIRABEL) COMPLETED.addTalkId(MIRABEL) STARTED.addTalkId(MIRABEL) STARTED.addTalkId(ARIEL) STARTED.addTalkId(ASTERIOS) STARTED.addQuestDrop(MIRABEL, ARIELS_RECOMMENDATION, 1) print "importing quests: 7: A Trip Begins"
htmltext = "7026-09.htm" #gladiator, darkAvenger, hawkeye if pcId == 0x02 or pcId == 0x06 or pcId == 0x09: htmltext = "7026-09.htm" #mage, wizard, cleric]: if pcId == 0x0a or pcId == 0x0b or pcId == 0x0f: htmltext = "7026-10.htm" #sorceror, necromancer, warlock, bishop, prophet if pcId == 0x0c or pcId == 0x0d or pcId == 0x0e or pcId == 0x10 or pcId == 0x11: htmltext = "7026-10.htm" st.setState(STARTED) return htmltext # All other Races must be out if npcId == GRAND_MASTER_BITZ and Race in [Race.dwarf, Race.darkelf, Race.elf, Race.orc]: st.setState(COMPLETED) st.exitQuest(1) return "7026-10.htm" QUEST = Quest(7026,"7026_bitz_occupation_change","village_master") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7026) STARTED.addTalkId(7026)
st.giveItems(DARK_BEZOAR_ID,1) if st.getQuestItemsCount(DARK_BEZOAR_ID) == 13 : st.playSound("ItemSound.quest_middle") else: st.playSound("ItemSound.quest_itemget") return QUEST = Quest(165,"165_WildHunt","Wild Hunt") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7348) STARTING.addTalkId(7348) STARTED.addTalkId(7348) STARTED.addKillId(456) STARTED.addKillId(529) STARTED.addKillId(532) STARTED.addKillId(536) STARTED.addQuestDrop(529,DARK_BEZOAR_ID,1) STARTED.addQuestDrop(532,DARK_BEZOAR_ID,1) STARTED.addQuestDrop(536,DARK_BEZOAR_ID,1) STARTED.addQuestDrop(456,DARK_BEZOAR_ID,1)
if cond == 25: st.playSound("ItemSound.quest_finish") st.exitQuest(1) if npcId == ANGEL_KILLER: return "Ha, that was fun! If you wish to find the key, search the corpse" return # Quest class and state definition QUEST = Quest(QUEST_NUMBER, str(QUEST_NUMBER) + "_" + QUEST_NAME, QUEST_DESCRIPTION) CREATED = State('Start', QUEST) PROGRESS = State('Progress', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(HANELLIN) CREATED.addTalkId(HANELLIN) PROGRESS.addTalkId(HANELLIN) PROGRESS.addTalkId(ARK_GUARDIANS_CORPSE) for i in ARK_OWNERS.keys(): PROGRESS.addTalkId(i) for i in ARKS.keys(): PROGRESS.addTalkId(i) for i in DROPS.keys(): PROGRESS.addKillId(i) print str(QUEST_NUMBER) + ": " + QUEST_DESCRIPTION
st.giveItems(CHAPTER_OF_WIND, 1) st.playSound("ItemSound.quest_itemget") elif chance in range(75, 90) and st.getQuestItemsCount(CHAPTER_OF_EARTH) == 0: st.giveItems(CHAPTER_OF_EARTH, 1) st.playSound("ItemSound.quest_itemget") if ( st.getQuestItemsCount(CHAPTER_OF_FIRE) and st.getQuestItemsCount(CHAPTER_OF_WATER) and st.getQuestItemsCount(CHAPTER_OF_WIND) and st.getQuestItemsCount(CHAPTER_OF_EARTH) ): st.playSound("ItemSound.quest_middle") return QUEST = Quest(370, "370_AWisemanSowsSeeds", "A Wiseman Sows Seeds") CREATED = State("Start", QUEST) STARTED = State("Started", QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(CASIAN) CREATED.addTalkId(CASIAN) STARTED.addTalkId(CASIAN) for i in MOBS: STARTED.addKillId(i) for i in range(5917, 5921): STARTED.addQuestDrop(CASIAN, i, 1) print "importing quests: 370: A Wiseman Sows Seeds"
htmltext = "<html><head><body>I have nothing to say you</body></html>" id = st.getState() if id == CREATED : if st.getPlayer().getLevel() >= 42: if st.getQuestItemsCount(PIRATES_TREASURE_MAP) : htmltext = "7890-01.htm" else : htmltext = "7890-00.htm" st.exitQuest(1) else : htmltext = "7890-01a.htm" st.exitQuest(1) elif npcId == ESPEN : htmltext = "7890-03a.htm" elif npcId == PIRATES_CHEST and st.getInt("cond") == 2 : htmltext = "8148-01.htm" return htmltext QUEST = Quest(383,"383_SearchingForTreasure","Searching For Treasure") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(ESPEN) CREATED.addTalkId(ESPEN) STARTED.addTalkId(ESPEN) STARTED.addTalkId(PIRATES_CHEST) print "importing quests: 383: Searching For Treasure"
st.getPcSpawn().addSpawn(12372) npc.reduceCurrentHp(9999999, npc) st.exitQuest(1) else: st.exitQuest(1) return "Conditions are not right to wake up Baium" elif npcId == 12571: if st.getQuestItemsCount(4295) > 0: # bloody fabric st.takeItems(4295, 1) st.getPlayer().teleToLocation(113100, 14500, 10077) st.set("ok", "1") else: return '<html><head><body>Angelic Vortex:<br>You do not have enough items</body></html>' return # Quest class and state definition QUEST = Quest(12535, "12535_WakeBaium", "Wake Baium") CREATED = State('Start', QUEST) COMPLETED = State('Completed', QUEST) # Quest initialization QUEST.setInitialState(CREATED) # Quest NPC starter initialization QUEST.addStartNpc(12535) QUEST.addStartNpc(12571) CREATED.addTalkId(12535) CREATED.addTalkId(12571) print "importing quests: 12535: Wake Up Baium"
PENDANT_OF_MOTHER_ID) == 0: st.giveItems(PENDANT_OF_MOTHER_ID, 1) st.playSound("ItemSound.quest_middle") return QUEST = Quest(405, "405_PathToCleric", "Path To Cleric") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7022) STARTING.addTalkId(7022) STARTED.addTalkId(7017) STARTED.addTalkId(7022) STARTED.addTalkId(7030) STARTED.addTalkId(7253) STARTED.addTalkId(7333) STARTED.addTalkId(7408) STARTED.addKillId(26) STARTED.addKillId(29) STARTED.addQuestDrop(7408, LEMONIELLS_COVENANT_ID, 1) STARTED.addQuestDrop(7022, LETTER_OF_ORDER2_ID, 1) STARTED.addQuestDrop(7333, BOOK_OF_PRAGA_ID, 1) STARTED.addQuestDrop(7030, BOOK_OF_VIVI_ID, 1)
st.playSound("ItemSound.quest_middle") if part == 1: count = 0 for items in [GOLDEN_SEED1_ID, GOLDEN_SEED2_ID, GOLDEN_SEED3_ID]: count += st.getQuestItemsCount(items) if count > 2: st.set("cond", "5") else: st.giveItems(item, 1) st.playSound("ItemSound.quest_itemget") return QUEST = Quest(228, "228_TestOfMagus", "Test Of Magus") CREATED = State("Start", QUEST) STARTING = State("Starting", QUEST) STARTED = State("Started", QUEST) COMPLETED = State("Completed", QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7629) STARTING.addTalkId(7629) for npcId in [7391, 7409, 7411, 7412, 7413, 7612, 7629]: STARTED.addTalkId(npcId) for mobId in [145, 157, 176, 230, 231, 232, 234, 5095, 5096, 5097, 5098, 553, 564, 565, 566]: STARTED.addKillId(mobId)
st.exitQuest(1) return "7289-33.htm" # ClassId.mage seems buggy !? if ClassId not in [ClassId.fighter]: st.setState(STARTED) return "7289-08.htm" else: st.setState(COMPLETED) st.exitQuest(1) return "7289-33.htm" # All other Races must be out if npcId == HIGH_PRIEST_RAYMOND and Race in [ Race.dwarf, Race.darkelf, Race.orc ]: st.setState(COMPLETED) st.exitQuest(1) return "7289-33.htm" QUEST = Quest(7289, "7289_raymond_occupation_change", "village_master") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7289) STARTED.addTalkId(7289)
if timer1 != None: timer1.cancel() if timer2 != None: timer2.cancel() st.exitQuest(1) QUEST = Quest(501, qn, qd) CREATED = State('Start', QUEST) PART2 = State('Part2', QUEST) PART3 = State('Part3', QUEST) PART4 = State('Part4', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) for i in [SIR_KRISTOF_RODEMAI, STATUE_OF_OFFERING]: QUEST.addStartNpc(i) CREATED.addTalkId(i) for i in [WITCH_KALIS, WITCH_ATHREA]: CREATED.addTalkId(i) for i in [SIR_KRISTOF_RODEMAI, WITCH_KALIS]: PART2.addTalkId(i) PART3.addTalkId(i) PART4.addTalkId(i) CREATED.addQuestDrop(STATUE_OF_OFFERING, SYMBOL_OF_LOYALTY, 1) PART3.addQuestDrop(WITCH_KALIS, ANTIDOTE_RECIPE, 1) PART4.addQuestDrop(WITCH_KALIS, VOUCHER_OF_FAITH, 1) PART4.addQuestDrop(WITCH_KALIS, POTION_OF_RECOVERY, 1) PART4.addQuestDrop(WITCH_KALIS, ANTIDOTE_RECIPE, 1)
st.giveItems(MST_BK,1) st.playSound("ItemSound.quest_middle") return # Quest class and state definition QUEST = Quest(QUEST_NUMBER, str(QUEST_NUMBER)+"_"+QUEST_NAME, QUEST_DESCRIPTION) CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) # Quest NPC starter initialization QUEST.addStartNpc(HR_SOBLING) # Quest initialization CREATED.addTalkId(HR_SOBLING) STARTING.addTalkId(HR_SOBLING) STARTED.addTalkId(HR_SOBLING) STARTED.addTalkId(WF_CLIFF) for i in MOBS : STARTING.addKillId(i) STARTED.addKillId(i) STARTED.addQuestDrop(HR_SOBLING,DICT1,1) STARTED.addQuestDrop(HR_SOBLING,MST_BK,1) print str(QUEST_NUMBER)+": "+QUEST_DESCRIPTION
else: if npcId == 5181: # Imperial Gravekeeper st.getPcSpawn().addSpawn(7765,6000000,["Curse of the gods on the one that defiles the property of the empire!"],0) setLeaderVar(st,"ImpGraveKeeper","3") else: st.getPcSpawn().addSpawn(5179) return QUEST = Quest(503,qn,"Pursuit of Clan Ambition") CREATED = State('Start', QUEST) PROGRESS = State('Progress', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(NPC[3]) CREATED.addTalkId(NPC[3]) for npcId in NPC: PROGRESS.addTalkId(npcId) for mobId in DROPLIST.keys(): PROGRESS.addKillId(mobId) PROGRESS.addAttackId(5181) for i in range(3839,3848)+range(3866,3870): PROGRESS.addQuestDrop(5181,i,1) print "importing quests: 503: " + qd
htmltext = "7503-01.htm" st.setState(STARTED) return htmltext if ClassId in [ClassId.scavenger, ClassId.artisan]: htmltext = "7503-09.htm" st.setState(COMPLETED) st.exitQuest(1) return htmltext if ClassId in [ClassId.bountyHunter, ClassId.warsmith]: htmltext = "7503-10.htm" st.setState(COMPLETED) st.exitQuest(1) return htmltext # All other Races must be out if npcId == WAREHOUSE_CHIEF_RIKADIO and Race in [Race.elf, Race.darkelf, Race.orc, Race.human]: st.setState(COMPLETED) st.exitQuest(1) return "7503-11.htm" QUEST = Quest(7503,"7503_rikadio_occupation_change","village_master") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7503) STARTED.addTalkId(7503)
else: st.giveItems(LETO_OVERLORD_SKULL_ID,1) st.playSound("Itemsound.quest_itemget") return QUEST = Quest(219,"219_TestimonyOfFate","Testimony Of Fate") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7476) STARTING.addTalkId(7476) STARTED.addTalkId(12084) STARTED.addTalkId(12089) STARTED.addTalkId(7114) STARTED.addTalkId(7210) STARTED.addTalkId(7358) STARTED.addTalkId(7419) STARTED.addTalkId(7463) STARTED.addTalkId(7476) STARTED.addTalkId(7613) STARTED.addTalkId(7614) STARTED.addKillId(144) STARTED.addKillId(157) STARTED.addKillId(158)
st.set("cond", "3") st.playSound("ItemSound.quest_middle") else: st.playSound("ItemSound.quest_itemget") return QUEST = Quest(104, "104_SpiritOfMirror", "Spirit Of Mirror") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7017) CREATED.addTalkId(7017) STARTED.addTalkId(7017) STARTED.addTalkId(7041) STARTED.addTalkId(7043) STARTED.addTalkId(7045) for mobId in DROPLIST.keys(): STARTED.addKillId(mobId) STARTED.addQuestDrop(mobId, DROPLIST[mobId], 1) STARTED.addQuestDrop(7017, GALLINS_OAK_WAND_ID, 1) STARTED.addQuestDrop(7017, GALLINS_OAK_WAND_ID, 1) STARTED.addQuestDrop(7017, GALLINS_OAK_WAND_ID, 1) print "importing quests: 104: Spirit Of Mirror"
elif npcId == 7116 and int(st.get("cond"))==5 : htmltext = "7116-01.htm" elif npcId == 7116 and int(st.get("cond"))==6 : htmltext = "7116-03.htm" return htmltext QUEST = Quest(46,"46_OnceMoreInTheArmsOfTheMotherTree","Once More In The Arms Of The Mother Tree") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7097) CREATED.addTalkId(7097) COMPLETED.addTalkId(7097) STARTED.addTalkId(7097) STARTED.addTalkId(7094) STARTED.addTalkId(7090) STARTED.addTalkId(7116) STARTED.addQuestDrop(7097,GALLADUCCIS_ORDER_DOCUMENT_ID_1,1) STARTED.addQuestDrop(7097,GALLADUCCIS_ORDER_DOCUMENT_ID_2,1) STARTED.addQuestDrop(7097,GALLADUCCIS_ORDER_DOCUMENT_ID_3,1) STARTED.addQuestDrop(7094,MAGIC_SWORD_HILT_ID,1) STARTED.addQuestDrop(7090,GEMSTONE_POWDER_ID,1) STARTED.addQuestDrop(7116,PURIFIED_MAGIC_NECKLACE_ID,1) print "importing quests: 46: Once More In The Arms of the Mother Tree"
st.giveItems(ANCIENT_CLAY_TABLET, 1) st.playSound("ItemSound.quest_middle") st.set("cond", "3") return QUEST = Quest(106, "106_ForgottenTruth", "Forgotten Truth") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7358) CREATED.addTalkId(7358) STARTING.addTalkId(7358) COMPLETED.addTalkId(7358) STARTED.addTalkId(7133) STARTED.addTalkId(7358) STARTED.addKillId(5070) STARTED.addQuestDrop(7133, KARTAS_TRANSLATION, 1) STARTED.addQuestDrop(7358, ONYX_TALISMAN1, 1) STARTED.addQuestDrop(7133, ONYX_TALISMAN2, 1) STARTED.addQuestDrop(5070, ANCIENT_SCROLL, 1) STARTED.addQuestDrop(5070, ANCIENT_CLAY_TABLET, 1) print "importing quests: 106: Forgotten Truth"
htmltext = "7095-0a.htm" st.exitQuest(1) elif cond == 1: if not st.getQuestItemsCount(TREASURE_CHEST): htmltext = "7095-2.htm" else: htmltext = "7095-4.htm" return htmltext def onKill(self, npc, st): chance = st.getRandom(100) if chance < CHANCE_OF_DROP: st.giveItems(TREASURE_CHEST, 1) st.playSound("ItemSound.quest_itemget") return QUEST = Quest(365, "365_DevilsLegacy", "Devil's Legacy") CREATED = State("Start", QUEST) STARTED = State("Started", QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(RANDOLF) CREATED.addTalkId(RANDOLF) STARTED.addTalkId(RANDOLF) for mob in MOBS: STARTED.addKillId(mob) STARTED.addQuestDrop(RANDOLF, TREASURE_CHEST, 1) print "importing quests: 365: Devil's Legacy"
elif int(st.get("cond"))==1 and st.getQuestItemsCount(COLLETTE_LETTER) : htmltext = "7350-05.htm" elif npcId == 7255 : if int(st.get("cond"))==1 and st.getQuestItemsCount(COLLETTE_LETTER) : htmltext = "7255-01.htm" elif int(st.get("cond"))==2 and st.getQuestItemsCount(NORMANS_LETTER) : htmltext = "7255-05.htm" elif npcId == 7210 and int(st.get("cond"))==2 and st.getQuestItemsCount(NORMANS_LETTER) : htmltext = "7210-01.htm" return htmltext QUEST = Quest(167,"167_DwarvenKinship","Dwarven Kinship") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7350) CREATED.addTalkId(7350) COMPLETED.addTalkId(7350) STARTED.addTalkId(7210) STARTED.addTalkId(7255) STARTED.addTalkId(7350) STARTED.addQuestDrop(7350,COLLETTE_LETTER,1) STARTED.addQuestDrop(7255,NORMANS_LETTER,1) print "importing quests: 167: Dwarven Kinship"
st.playSound("ItemSound.quest_itemget") if npcId in [922,923,924] : count = st.getQuestItemsCount(SHINING_GEM) if count < 50 : st.giveItems(SHINING_GEM,1) if count == 49 and st.getQuestItemsCount(SHINING_RED_GEM) == 50 : st.playSound("ItemSound.quest_middle") st.set("cond","3") else : st.playSound("ItemSound.quest_itemget") return QUEST = Quest(298,"298_LizardmensConspiracy","Lizardmen's Conspiracy") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7333) CREATED.addTalkId(7333) STARTED.addTalkId(7333) STARTED.addTalkId(7344) for i in range(922,927) : STARTED.addKillId(i) STARTED.addQuestDrop(925,SHINING_RED_GEM,1) STARTED.addQuestDrop(924,SHINING_GEM,1) print "importing quests: 298: Lizardmen's Conspiracy"
htmltext = "7512-11.htm" st.setState(COMPLETED) st.exitQuest(1) return htmltext # All other Races must be out else: st.setState(COMPLETED) st.exitQuest(1) return "7512-11.htm" QUEST = Quest(7512, "7512_kusto_occupation_change", "village_master") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7512) QUEST.addStartNpc(7677) QUEST.addStartNpc(7687) QUEST.addStartNpc(7847) QUEST.addStartNpc(7897) STARTED.addTalkId(7512) STARTED.addTalkId(7677) STARTED.addTalkId(7687) STARTED.addTalkId(7847) STARTED.addTalkId(7897)
if st.getRandom(100) < chance: st.giveItems(item, 1) st.playSound("ItemSound.quest_itemget") return QUEST = Quest(326, "326_VanquishRemnants", "Vanquish Remnants") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7435) CREATED.addTalkId(7435) STARTING.addTalkId(7435) STARTED.addTalkId(7435) COMPLETED.addTalkId(7435) STARTED.addKillId(436) STARTED.addKillId(437) STARTED.addKillId(438) STARTED.addKillId(439) STARTED.addKillId(53) STARTED.addKillId(58) STARTED.addKillId(61) STARTED.addKillId(63) STARTED.addKillId(66) STARTED.addQuestDrop(53, RED_CROSS_BADGE, 1)
htmltext = "Trade has been cancelled." st.setState(COMPLETED) st.exitQuest(1) return htmltext # this just return new html, if the player can talk with this npc about that enhance stuff def onTalk(self, npc, st): npcId = npc.getNpcId() htmltext = "<html><head><body>I have nothing to say to you.</body></html>" st.set("cond", "0") st.setState(STARTED) return "1.htm" QUEST = Quest(1007, "1007_enhance", "Blacksmith") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) # init all npc to the correct stats for npcId in SMITHS: QUEST.addStartNpc(npcId) STARTED.addTalkId(npcId) # always at the end, then it shows only up if anything is correct in the code.. no jython error.. because we cant check jython errors with idle print "importing blacksmith data: 1007_enhance"
st.exitQuest(1) return "7120-24.htm" else: st.setState(COMPLETED) st.exitQuest(1) return "7120-26.htm" # All other Races must be out else: st.setState(COMPLETED) st.exitQuest(1) return "7120-26.htm" QUEST = Quest(7120, "7120_maximilian_occupation_change", "village_master") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7120) QUEST.addStartNpc(7191) QUEST.addStartNpc(7857) QUEST.addStartNpc(7905) STARTED.addTalkId(7120) STARTED.addTalkId(7191) STARTED.addTalkId(7857) STARTED.addTalkId(7905)
st.playSound("ItemSound.quest_itemget") elif n < 5 : st.giveItems(TORN_MAP_FRAGMENT,1) st.playSound("ItemSound.quest_itemget") return QUEST = Quest(293,"293_HiddenVein","Hidden Vein") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7535) CREATED.addTalkId(7535) STARTING.addTalkId(7535) STARTED.addTalkId(7535) COMPLETED.addTalkId(7535) STARTED.addTalkId(7539) STARTED.addKillId(446) STARTED.addKillId(447) STARTED.addKillId(448) STARTED.addQuestDrop(7539,HIDDEN_VEIN_MAP,1) STARTED.addQuestDrop(446,CHRYSOLITE_ORE,1) STARTED.addQuestDrop(447,TORN_MAP_FRAGMENT,1) print "importing quests: 293: Hidden Vein"
htmltext = event if event == "0" : return InitialHtml for item in Items : if event == str(item[1]): htmltext = do_RequestedEvent(event, st, item[1], item[2], item[3], item[4], item[5], item[6]) if htmltext != event : st.setState(COMPLETED) st.exitQuest(1) return htmltext def onTalk (Self,npc,st): htmltext = "<html><head><body>I have nothing to say with you</body></html>" return InitialHtml ### Quest class and state definition QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc) CREATED = State('Start', QUEST) COMPLETED = State('Completed', QUEST) ### Quest initialization QUEST.setInitialState(CREATED) for item in NPC: ### Quest NPC starter initialization QUEST.addStartNpc(item) ### Quest NPC initialization CREATED.addTalkId(item) print "...done"
st.getPcSpawn().addSpawn(5044) st.takeItems(KASHA_PARASITE_ID,count) else : st.giveItems(KASHA_PARASITE_ID,1) st.playSound("ItemSound.quest_itemget") elif npcId == 5044 : if int(st.get("cond"))==1 and st.getQuestItemsCount(KASHA_CRYSTAL_ID) == 0 : st.giveItems(KASHA_CRYSTAL_ID,1) st.playSound("ItemSound.quest_middle") st.set("cond","2") return QUEST = Quest(276,"276_HestuiTotem","Hestui Totem") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7571) CREATED.addTalkId(7571) STARTED.addTalkId(7571) STARTED.addKillId(479) STARTED.addKillId(5044) STARTED.addQuestDrop(5044,KASHA_CRYSTAL_ID,1) STARTED.addQuestDrop(479,KASHA_PARASITE_ID,1) print "importing quests: 276: Hestui Totem"
st.addExpAndSp(1000, 0) st.takeItems(MOTHERTREE_FRUIT, 1) st.unset("cond") st.setState(COMPLETED) st.playSound("ItemSound.quest_finish") elif npcId == 7371 and st.getQuestItemsCount(MOTHERTREE_FRUIT): htmltext = "7371-02.htm" return htmltext QUEST = Quest(161, "161_FruitsOfMothertree", "Fruits Of Mothertree") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7362) CREATED.addTalkId(7362) STARTING.addTalkId(7362) COMPLETED.addTalkId(7362) STARTED.addTalkId(7362) STARTED.addTalkId(7371) STARTED.addQuestDrop(7371, MOTHERTREE_FRUIT, 1) STARTED.addQuestDrop(7362, ANDELLRIAS_LETTER, 1) print "importing quests: 161: Fruits Of Mothertree"
htmltext = "<html><head><body>I have nothing to say to you</body></html>" id = st.getState() if id == CREATED : st.set("cond","0") if int(st.get("cond")) == 0: htmltext = npcId+"-01.htm" elif check(st) : htmltext = npcId+"-03.htm" elif st.getQuestItemsCount(RED_SOUL_CRYSTAL0_ID) == st.getQuestItemsCount(GREEN_SOUL_CRYSTAL0_ID) == st.getQuestItemsCount(BLUE_SOUL_CRYSTAL0_ID) == 0 : htmltext = npcId+"-21.htm" return htmltext QUEST = Quest(350,"350_EnhanceYourWeapon","Enhance Your Weapon") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) for npcId in NPC: QUEST.addStartNpc(npcId) CREATED.addTalkId(npcId) STARTING.addTalkId(npcId) STARTED.addTalkId(npcId) STARTED.addQuestDrop(4629,RED_SOUL_CRYSTAL0_ID,1) STARTED.addQuestDrop(4640,GREEN_SOUL_CRYSTAL0_ID,1) STARTED.addQuestDrop(4651,BLUE_SOUL_CRYSTAL0_ID,1) print "importing quests: 350: Enhance Your Weapon"
if count+qty==100 : st.playSound("ItemSound.quest_middle") st.set("cond","2") else : st.playSound("ItemSound.quest_itemget") st.giveItems(PREDATORS_FANG,qty) return QUEST = Quest(266,"266_PleaOfPixies","Plea Of Pixies") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(12091) CREATED.addTalkId(12091) STARTING.addTalkId(12091) STARTED.addTalkId(12091) COMPLETED.addTalkId(12091) STARTED.addKillId(525) STARTED.addKillId(530) STARTED.addKillId(534) STARTED.addKillId(537) STARTED.addQuestDrop(530,PREDATORS_FANG,1) print "importing quests: 266: Plea Of Pixies"
def onKill(self, npc, st): npcId = npc.getNpcId() if st.getRandom(100) < CHANCE: st.giveItems(ORB, 1) st.playSound("ItemSound.quest_itemget") return QUEST = Quest(343, "343_UnderTheShadowOfTheIvoryTower", "Under The Shadow Of The Ivory Tower") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7834) CREATED.addTalkId(7834) CREATED.addTalkId(7835) STARTED.addTalkId(7834) STARTED.addTalkId(7835) STARTED.addTalkId(7934) STARTED.addTalkId(7935) for i in range(563, 567): STARTED.addKillId(i) STARTED.addQuestDrop(7834, ORB, 1) print "importing quests: 343: Under The Shadow Of The Ivory Tower"
htmltext = "7143-01.htm" else: htmltext = "7143-02.htm" return htmltext QUEST = Quest(166, "166_DarkMass", "Dark Mass") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7130) CREATED.addTalkId(7130) STARTING.addTalkId(7130) COMPLETED.addTalkId(7130) STARTED.addTalkId(7130) STARTED.addTalkId(7135) STARTED.addTalkId(7139) STARTED.addTalkId(7143) STARTED.addQuestDrop(7135, CEREMONIAL_DAGGER_ID, 1) STARTED.addQuestDrop(7139, DREVIANT_WINE_ID, 1) STARTED.addQuestDrop(7143, GARMIELS_SCRIPTURE_ID, 1) STARTED.addQuestDrop(7130, UNDRES_LETTER_ID, 1) print "importing quests: 166: Dark Mass"
if count < 40: st.giveItems(WOLF_PELT, 1) if count == 39: st.playSound("ItemSound.quest_middle") st.set("cond", "2") else: st.playSound("ItemSound.quest_itemget") return QUEST = Quest(258, "258_BringWolfPelt1", "Bring Wolf Pelt1") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7001) CREATED.addTalkId(7001) STARTING.addTalkId(7001) STARTED.addTalkId(7001) COMPLETED.addTalkId(7001) STARTED.addKillId(120) STARTED.addKillId(442) STARTED.addQuestDrop(120, WOLF_PELT, 1) print "importing quests: 258: Bring Wolf Pelt1"
return do_RequestEvent(event,st) def onTalk (Self,npc,st): npcId = npc.getNpcId() htmltext = "<html><head><body>I have nothing to say with you</body></html>" st.setState(STARTED) if InitialHtml == "onEvent" : return do_RequestEvent(str(npcId),st) elif InitialHtml != "" : return InitialHtml return htmltext ### Quest class and state definition QUEST = Quest(QuestId, str(QuestId) + "_" + QuestName, QuestDesc) CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) ### Quest initialization QUEST.setInitialState(CREATED) for item in NPC: ### Quest NPC starter initialization QUEST.addStartNpc(item) ### Quest NPC initialization STARTED.addTalkId(item) print ": Loaded " + str(len(Items)) + " item(s)"
if st.getState() == STARTING : if st.getRandom(DROP_MAX_2) < DROP_RATE_2 and not st.getQuestItemsCount(SEALD_MSTONE) : st.giveItems(SEALD_MSTONE,1) st.playSound("ItemSound.quest_middle") return # Quest class and state definition QUEST = Quest(QUEST_NUMBER, str(QUEST_NUMBER)+"_"+QUEST_NAME, QUEST_DESCRIPTION) CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) # Quest NPC starter initialization QUEST.addStartNpc(MANAKIA) # Quest initialization CREATED.addTalkId(MANAKIA) STARTING.addTalkId(MANAKIA) STARTED.addTalkId(MANAKIA) STARTED.addTalkId(TORAI) for i in DROPLIST.keys() : STARTING.addKillId(i) STARTED.addKillId(i) STARTING.addQuestDrop(i,DROPLIST[i][0],1) print str(QUEST_NUMBER)+": "+QUEST_DESCRIPTION
if int(st.get("cond") ) == 1 and st.getQuestItemsCount(SILVER_CRYSTAL_ID) < 50: st.giveItems(SILVER_CRYSTAL_ID, 1) if st.getQuestItemsCount(SILVER_CRYSTAL_ID) == 50: st.playSound("ItemSound.quest_middle") st.set("cond", "2") else: st.playSound("ItemSound.quest_itemget") return QUEST = Quest(431, "431_WeddingMarch", "Wedding March") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(8042) CREATED.addTalkId(8042) COMPLETED.addTalkId(8042) STARTED.addTalkId(8042) STARTED.addKillId(786) STARTED.addKillId(787) STARTED.addQuestDrop(786, SILVER_CRYSTAL_ID, 1) STARTED.addQuestDrop(787, SILVER_CRYSTAL_ID, 1) print "importing quests: 431: Wedding March"
htmltext = "7070-33.htm" if ClassId in [ClassId.treasureHunter, ClassId.gladiator, ClassId.darkAvenger, ClassId.hawkeye]: htmltext = "7070-33.htm" # ClassId.mage seems buggy !? if ClassId not in [ClassId.fighter]: st.setState(STARTED) return "7070-08.htm" else: htmltext = "7070-33.htm" st.setState(COMPLETED) st.exitQuest(1) return htmltext # All other Races must be out if npcId == HIGH_PRIEST_SYLVAIN and Race in [Race.dwarf, Race.darkelf, Race.orc]: st.setState(COMPLETED) st.exitQuest(1) return "7070-33.htm" QUEST = Quest(7070,"7070_sylvain_occupation_change","village_master") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7070) STARTED.addTalkId(7070)
count = st.getQuestItemsCount(WOLF_PELT) if count<40 : st.giveItems(WOLF_PELT,1) if count == 39 : st.playSound("ItemSound.quest_middle") st.set("cond","2") else: st.playSound("ItemSound.quest_itemget") return QUEST = Quest(258,"258_BringWolfPelt1","Bring Wolf Pelt1") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7001) CREATED.addTalkId(7001) STARTING.addTalkId(7001) STARTED.addTalkId(7001) COMPLETED.addTalkId(7001) STARTED.addKillId(120) STARTED.addKillId(442) STARTED.addQuestDrop(120,WOLF_PELT,1) print "importing quests: 258: Bring Wolf Pelt1"
st.giveItems(FOX_FUR_ID,1) if st.getQuestItemsCount(FOX_FUR_ID) == 10 : st.playSound("ItemSound.quest_middle") else: st.playSound("ItemSound.quest_itemget") return QUEST = Quest(154,"154_SacrificeToSea","Sacrifice To Sea") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7312) STARTING.addTalkId(7312) STARTED.addTalkId(7051) STARTED.addTalkId(7055) STARTED.addTalkId(7312) STARTED.addKillId(481) STARTED.addKillId(545) STARTED.addQuestDrop(481,FOX_FUR_ID,1) STARTED.addQuestDrop(545,FOX_FUR_ID,1) STARTED.addQuestDrop(7051,FOX_FUR_YARN_ID,1) STARTED.addQuestDrop(7055,MAIDEN_DOLL_ID,1)
return htmltext def onKill (self,npc,st): st.giveItems(SUPPLY_ITEM,1) if st.getRandom(10) == 1 : # % chance is custom st.giveItems(SUSPICIOUS_DOCUMENT,1) if st.getQuestItemsCount(SUSPICIOUS_DOCUMENT) == 5 : st.takeItems(SUSPICIOUS_DOCUMENT,5) st.giveItems(RECIPE_OF_SUPPLY,1) st.playSound("ItemSound.quest_itemget") st.playSound("ItemSound.quest_itemget") return QUEST = Quest(360,"360_PlunderTheirSupplies","Plunder Their Supplies") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(COLEMAN) CREATED.addTalkId(COLEMAN) STARTED.addTalkId(COLEMAN) STARTED.addKillId(TAIK_SEEKER) STARTED.addKillId(TAIK_LEADER) STARTED.addQuestDrop(COLEMAN,RECIPE_OF_SUPPLY,1) STARTED.addQuestDrop(COLEMAN,SUPPLY_ITEM,1) STARTED.addQuestDrop(COLEMAN,SUSPICIOUS_DOCUMENT,1) print "importing quests: 360: Plunder Their Supplies"
st.giveItems(SUSPICIOUS_CONTRACT,1) st.takeItems(SUSPICIOUS_MEMO,-1) st.playSound("ItemSound.quest_middle") st.set("cond","2") return QUEST = Quest(292,"292_CrushBrigands","Crush Brigands") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7532) CREATED.addTalkId(7532) STARTING.addTalkId(7532) STARTED.addTalkId(7532) COMPLETED.addTalkId(7532) STARTED.addTalkId(7533) STARTED.addKillId(322) STARTED.addKillId(323) STARTED.addKillId(324) STARTED.addKillId(327) STARTED.addKillId(528) STARTED.addQuestDrop(327,GOBLIN_NECKLACE,1) STARTED.addQuestDrop(323,GOBLIN_PENDANT,1) STARTED.addQuestDrop(528,GOBLIN_LORD_PENDANT,1)