def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) # All of these are overridden in the subclasses self.NPC = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] self.Items = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] self.Mob = [0, 1, 2] self.classid = 0 self.prevclass = 0 self.qn = "SagasSuperclass" self.X = [0, 1, 2] self.Y = [0, 1, 2] self.Z = [0, 1, 2] self.Text = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] self.Spawn_List = [] #todos estes não são sobrescritos pelas subclasses (porque são constantes ou usadas apenas para este script) self.CREATED = State('Start', self) self.STARTED = State('Started', self) self.COMPLETED = State('Completed', self)
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) # All of these are overridden in the subclasses self.NPC = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] self.Items = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] self.Mob = [0, 1, 2] self.classid = 0 self.prevclass = 0 self.qn = "SagasSuperclass" self.X = [0, 1, 2] self.Y = [0, 1, 2] self.Z = [0, 1, 2] self.Text = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] self.Spawn_List = [] #all these are not overridden by the subclasses (either cause they are constant or used only for this script) self.CREATED = State('Start', self) self.STARTED = State('Started', self) self.COMPLETED = State('Completed', self)
st.giveItems(BARREL_OF_LEAGUE,1) st.set("cond","2") elif random<CHANCE2 : st.giveItems(LIZARD_FANG,2) st.playSound("ItemSound.quest_itemget") if random==CHANCE_barrel : st.giveItems(BARREL_OF_LEAGUE,1) st.set("cond","2") elif st.getRandom(100)<4: st.giveItems(BARREL_OF_LEAGUE,1) st.playSound("ItemSound.quest_itemget") st.set("cond","2") return QUEST = Quest(351,qn,"Black Swan") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(30916) QUEST.addTalkId(30916) QUEST.addTalkId(30969) QUEST.addTalkId(30897) STARTED.addQuestDrop(30916,ORDER_OF_GOSTA,1) STARTED.addQuestDrop(30916,BARREL_OF_LEAGUE,1) STARTED.addQuestDrop(30916,LIZARD_FANG,1) QUEST.addKillId(20784) QUEST.addKillId(20785)
htmltext="<html><body>You are either not carrying out your quest or don't meet the criteria.</body></html>" id = st.getState() if id == CREATED : if st.getPlayer().getLevel() >= 75 : htmltext = "0.htm" else: st.exitQuest(1) htmltext = "<html><body>This quest can only be taken by characters that have a minimum level of 75. Return when you are more experienced.</body></html>" elif id == STARTED: cond = int(st.get("cond")) if npcId == MARQUEZ : if cond == 1 : if not st.getQuestItemsCount(ANCIENT_BOOK): htmltext = "1a.htm" else : htmltext = "2.htm" elif id == COMPLETED: st.exitQuest(0) htmltext = "<html><body>This quest have already been completed.</body></html>" return htmltext QUEST=Quest(110,qn,"To The Primeval Isle") CREATED=State('Start', QUEST) STARTED=State('Started', QUEST) COMPLETED=State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(ANTON) QUEST.addTalkId (ANTON) QUEST.addTalkId(MARQUEZ)
st.takeItems(GOBLIN_CLUB, -1) htmltext = "31853-05.htm" else: htmltext = "31853-04.htm" return htmltext def onKill(self, npc, player, isPet): st = player.getQuestState(qn) if not st: return if st.getState() != STARTED: return if st.getRandom(10) < 5: st.giveItems(GOBLIN_CLUB, 1) st.playSound("ItemSound.quest_itemget") return QUEST = Quest(267, qn, "Wrath Of Verdure") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(31853) QUEST.addTalkId(31853) QUEST.addKillId(20325) STARTED.addQuestDrop(20325, GOBLIN_CLUB, 1)
def onKill(self, npc, player, isPet): partyMember = self.getRandomPartyMemberState(player, STARTED) st = player.getQuestState(qn) if st: if st.getState() == STARTED: numItems = int( (npc.getLevel() * 0.15 + 1.6) * Config.RATE_DROP_QUEST) if st.getRandom(100) >= 10: numItems = 0 if numItems > 0: st.giveItems(DIMENSION_FRAGMENT_ID, numItems) st.playSound("ItemSound.quest_itemget") return QUEST = Quest(634, qn, "In Search of Dimensional Fragments") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) for npcId in range(31494, 31508): QUEST.addTalkId(npcId) QUEST.addStartNpc(npcId) for mobs in range(21208, 21256): QUEST.addKillId(mobs) STARTED.addQuestDrop(7079, DIMENSION_FRAGMENT_ID, 1)
def onKill(self,npc,player,isPet): st = player.getQuestState(qn) if not st : return if st.getState() != STARTED : return npcId = npc.getNpcId() chance = (CHANCE+(npcId-20234)*2)*Config.RATE_DROP_QUEST bonus = int(divmod(chance,100)[0]) if st.getInt("cond") == 1 and st.getRandom(100)<chance : st.giveItems(ARTICLES_DEAD_HEROES,1+bonus) st.playSound("ItemSound.quest_itemget") return QUEST = Quest(344,qn,"1000 Years, the End of Lamentation") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(GILMORE) QUEST.addTalkId(GILMORE) QUEST.addTalkId(RODEMAI) QUEST.addTalkId(ORVEN) QUEST.addTalkId(GARVARENTZ) QUEST.addTalkId(KAIEN) for mob in range(20236,20241): QUEST.addKillId(mob)
#htmltext="<html><body>This quest has already been completed</body></html>" return htmltext def onKill(self, npc, player, isPet): partyMembers = [player] party = player.getParty() if party: partyMembers = party.getPartyMembers().toArray() for player in partyMembers: pst = player.getQuestState(qn) if pst: giveReward(pst, npc) else: pst = player.getQuestState(qn) if pst: giveReward(pst, npc) return QUEST = Quest(613, qn, "Prove Your Courage!") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(Ashas) QUEST.addTalkId(Ashas) STARTED.addQuestDrop(Hekaton, Hekaton_Head, 1) QUEST.addKillId(Hekaton)
if amount: htmltext = "30892-03.htm" st.giveItems(ADENA, amount) st.takeItems(ALLIGATOR_PELTS, -1) else: htmltext = "30892-04.htm" return htmltext def onKill(self, npc, player, isPet): st = player.getQuestState(qn) if not st: return if st.getState() != STARTED: return npcId = npc.getNpcId() if st.getRandom(100) < CHANCE: st.giveItems(ALLIGATOR_PELTS, 1) st.playSound("ItemSound.quest_itemget") return QUEST = Quest(338, qn, "Alligator Hunter") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(30892) QUEST.addTalkId(30892) QUEST.addKillId(ALLIGATOR) STARTED.addQuestDrop(ALLIGATOR, ALLIGATOR_PELTS, 1)
if i[0] <= chance < i[1]: qty = i[2] if qty: if count + qty > 100: qty = 100 - count 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, qn, "Plea Of Pixies") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(31852) QUEST.addTalkId(31852) QUEST.addKillId(20525) QUEST.addKillId(20530) QUEST.addKillId(20534) QUEST.addKillId(20537) STARTED.addQuestDrop(20530, PREDATORS_FANG, 1)
st.set("cond", "2") else: st.playSound("ItemSound.quest_itemget") elif npcId == ROTTING_TREE and herb < 50: st.giveItems(HERBIBOROUS_SPORE, 1) if herb == 49: if carn >= 50: st.playSound("ItemSound.quest_middle") st.set("cond", "3") else: st.playSound("ItemSound.quest_middle") st.set("cond", "2") else: st.playSound("ItemSound.quest_itemget") return QUEST = Quest(356, qn, "Dig Up The Sea Of Spores") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(GAUEN) QUEST.addTalkId(GAUEN) QUEST.addKillId(SPORE_ZOMBIE) QUEST.addKillId(ROTTING_TREE) STARTED.addQuestDrop(GAUEN, CARNIVORE_SPORE, 1) STARTED.addQuestDrop(GAUEN, HERBIBOROUS_SPORE, 1)
elif npcId in range(21508,21513) : # get a random party member who is doing this quest and is at cond == 14 partyMember = self.getRandomPartyMember(player, "14") if partyMember : st = partyMember.getQuestState(qn) chance = st.getRandom(100) if CRIMSON_MOSS_CHANCE >= chance and st.getQuestItemsCount(CRIMSON_MOSS) < 5 : st.giveItems(CRIMSON_MOSS,1) st.playSound("ItemSound.quest_itemget") if st.getQuestItemsCount(CRIMSON_MOSS) == 5 : st.set("cond","15") st.playSound("ItemSound.quest_middle") return QUEST = Quest(241,qn,"Possessor Of A Precious Soul - 1") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(TALIEN) QUEST.addTalkId(TALIEN) QUEST.addTalkId(STEDMIEL) QUEST.addTalkId(GABRIELLE) QUEST.addTalkId(GILMORE) QUEST.addTalkId(KANTABILON) QUEST.addTalkId(NOEL) QUEST.addTalkId(RAHORAKTI) QUEST.addTalkId(CARADINE) QUEST.addTalkId(VIRGIL)
if not st: return if st.getState() != STARTED: return npcId = npc.getNpcId() if st.getInt("cond") >= 1 and st.getItemEquipped( 7) == GALLINS_OAK_WAND_ID and not st.getQuestItemsCount( DROPLIST[npcId]): # (7) means weapon slot st.takeItems(GALLINS_OAK_WAND_ID, 1) st.giveItems(DROPLIST[npcId], 1) if HaveAllQuestItems(st): st.set("cond", "3") st.playSound("ItemSound.quest_middle") return QUEST = Quest(104, qn, "Spirit Of Mirrors") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(30017) QUEST.addTalkId(30017) QUEST.addTalkId(30041) QUEST.addTalkId(30043) QUEST.addTalkId(30045) for mobId in DROPLIST.keys(): QUEST.addKillId(mobId) STARTED.addQuestDrop(mobId, DROPLIST[mobId], 1)
def onKill(self, npc, player, isPet): st = player.getQuestState(qn) if not st: return if st.getState() != STARTED: return item = ORC_AMULET if npc.getNpcId() in range(20471, 20474): item = ORC_NECKLACE if st.getRandom(10) > 4: st.giveItems(item, 1) st.playSound("ItemSound.quest_itemget") return QUEST = Quest(260, qn, "Hunt For Orcs1") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(30221) QUEST.addTalkId(30221) QUEST.addKillId(20468) QUEST.addKillId(20469) QUEST.addKillId(20470) QUEST.addKillId(20471) QUEST.addKillId(20472) QUEST.addKillId(20473)
count = st.getQuestItemsCount(BAT_FANG) chance = st.getRandom(10) for i in DROP[npcId]: if i[0] <= chance < i[1]: qty = i[2] if count + qty > 100: qty = 100 - count if count + qty == 100: st.playSound("ItemSound.quest_middle") st.set("cond", "2") else: st.playSound("ItemSound.quest_itemget") st.giveItems(BAT_FANG, qty) return QUEST = Quest(294, qn, "Covert Business") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(30534) QUEST.addTalkId(30534) QUEST.addKillId(20370) QUEST.addKillId(20480) STARTED.addQuestDrop(20480, BAT_FANG, 1)
def onKill(self, npc, player, isPet): st = player.getQuestState(qn) if not st: return if st.getState() != STARTED: return npcId = npc.getNpcId() chance, item = DROPLIST[npcId] if st.getRandom(100) < chance: st.giveItems(item, 1) st.playSound("ItemSound.quest_itemget") return QUEST = Quest(306, qn, "Crystal Of Fireice") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(30004) QUEST.addTalkId(30004) QUEST.addKillId(20109) QUEST.addKillId(20110) QUEST.addKillId(20112) QUEST.addKillId(20113) QUEST.addKillId(20114) QUEST.addKillId(20115)
100) if st.getRandom(100) < chance: numItems += 1 if count + numItems >= 100: numItems = 100 - count if numItems != 0: st.giveItems(item, int(numItems)) if st.getQuestItemsCount( LEAF_OF_FLAVA) == st.getQuestItemsCount( BUFFALO_MEAT) == st.getQuestItemsCount( ANTELOPE_HORN) == 100: st.set("cond", "2") st.playSound("ItemSound.quest_middle") else: st.playSound("ItemSound.quest_itemget") return QUEST = Quest(623, qn, "The Finest Food") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(JEREMY) QUEST.addTalkId(JEREMY) for mob in DROPLIST.keys(): QUEST.addKillId(mob) for item in range(7199, 7202): STARTED.addQuestDrop(JEREMY, item, 1)
partyMember = self.getRandomPartyMember(player,"1") if not partyMember : return st = partyMember.getQuestState(qn) if st : count = st.getQuestItemsCount(TARLK_EYE) if st.getInt("cond") == 1 and count < 100 : chance = 33 * Config.RATE_DROP_QUEST numItems, chance = divmod(chance,100) if st.getRandom(100) < chance : numItems += 1 if numItems : if count + numItems >= 100 : numItems = 100 - count st.playSound("ItemSound.quest_middle") st.set("cond","2") else: st.playSound("ItemSound.quest_itemget") st.giveItems(TARLK_EYE,1) return QUEST = Quest(52,qn,"Willie's Special Bait") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(WILLIE) QUEST.addTalkId(WILLIE) QUEST.addKillId(TARLK_BASILISK) STARTED.addQuestDrop(TARLK_BASILISK,TARLK_EYE,1)
MORTE_TALISMAN ) == 1 and st.getQuestItemsCount(TRIMDEN_SILK) < 5: st.giveItems(TRIMDEN_SILK, 1) if st.getQuestItemsCount(TRIMDEN_SILK) == 5: st.playSound("ItemSound.quest_middle") if st.getQuestItemsCount( TRIMDEN_SILK) >= 5 and st.getQuestItemsCount( PREDATOR_CARAPACE) > 0: st.set("cond", "5") else: st.playSound("ItemSound.quest_itemget") return QUEST = Quest(410, qn, "Path To Palus Knight") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(30329) QUEST.addTalkId(30329) QUEST.addTalkId(30422) QUEST.addKillId(20038) QUEST.addKillId(20043) QUEST.addKillId(20049)
if st: if st.getState() == STARTED: count = st.getQuestItemsCount(ORC_GOODS) if st.getInt("cond") == 1 and count < 120: chance = DROP_CHANCE * Config.RATE_DROP_QUEST numItems, chance = divmod(chance, 100) if st.getRandom(100) < chance: numItems += 1 if numItems: if count + numItems >= 120: numItems = 120 - count st.playSound("ItemSound.quest_middle") st.set("cond", "2") else: st.playSound("ItemSound.quest_itemget") st.giveItems(ORC_GOODS, int(numItems)) return QUEST = Quest(644, qn, "Grave Robber Annihilation") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(KARUDA) QUEST.addTalkId(KARUDA) for i in MOBS: QUEST.addKillId(i) STARTED.addQuestDrop(KARUDA, ORC_GOODS, 1)
if cond == 14 : if st.getRandom(2) == 1 : if st.getQuestItemsCount(ATEBALTS_SKULL) == 0 : st.giveItems(ATEBALTS_SKULL,1) st.playSound("ItemSound.quest_itemget") elif st.getQuestItemsCount(ATEBALTS_RIBS) == 0 : st.giveItems(ATEBALTS_RIBS,1) st.playSound("ItemSound.quest_itemget") elif st.getQuestItemsCount(ATEBALTS_SHIN) == 0 : st.giveItems(ATEBALTS_SHIN,1) st.set("cond","15") st.playSound("ItemSound.quest_middle") return QUEST = Quest(212,qn,"Trial Of Duty") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(30109) QUEST.addTalkId(30109) QUEST.addTalkId(30116) QUEST.addTalkId(30311) QUEST.addTalkId(30653) QUEST.addTalkId(30654) QUEST.addTalkId(30655) QUEST.addTalkId(30656)
if not st: return if st.getState() != PROGRESS: return npcId = npc.getNpcId() drop = st.getRandom(100) cond = st.getInt("cond") dropcond = DROPLIST[npcId][0] if drop < DROP_RATE and cond == dropcond: if st.getQuestItemsCount(DROPLIST[npcId][1]) == 0: st.giveItems(DROPLIST[npcId][1], 1) st.playSound("ItemSound.quest_itemget") st.set("cond", str(cond + 1)) return # Quest class and state definition QUEST = Quest(QUEST_NUMBER, qn, QUEST_DESCRIPTION) CREATED = State('Start', QUEST) PROGRESS = State('Progress', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) # Quest NPC starter initialization QUEST.addStartNpc(LADD) # Quest initialization QUEST.addTalkId(LADD) QUEST.addTalkId(JOAN) for i in DROPLIST.keys(): QUEST.addKillId(i)
count = st.getQuestItemsCount(NECROHEART) if st.getInt("cond") == 1 and count < 10: chance = DROP_CHANCE * Config.RATE_DROP_QUEST numItems, chance = divmod(int(chance), 100) if st.getRandom(100) < chance: numItems += 1 if numItems: if count + numItems >= 10: numItems = 10 - count st.playSound("ItemSound.quest_middle") st.set("cond", "2") else: st.playSound("ItemSound.quest_itemget") st.giveItems(NECROHEART, int(numItems)) return QUEST = Quest(637, qn, "Through the Gate Once More") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(FLAURON) QUEST.addTalkId(FLAURON) for mob in range(21565, 21568): QUEST.addKillId(mob) STARTED.addQuestDrop(FLAURON, NECROHEART, 1)
def onKill(self, npc, player, isPet): st = player.getQuestState(qn) if not st: return if st.getState() != STARTED: return npcId = npc.getNpcId() if npcId == 27021: st.set("id", "0") if st.getInt("cond") == 1 and st.getQuestItemsCount( KIRUNAK_SKULL_ID) == 0: st.giveItems(KIRUNAK_SKULL_ID, 1) st.playSound("ItemSound.quest_middle") return QUEST = Quest(164, qn, "Blood Fiend") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(30149) QUEST.addTalkId(30149) QUEST.addKillId(27021) STARTED.addQuestDrop(27021, KIRUNAK_SKULL_ID, 1)
class Quest(JQuest): def __init__(self, id, name, descr): JQuest.__init__(self, id, name, descr) def onTalk(Self, npc, player): st = player.getQuestState(qn) htmltext = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>" if player.isHero(): if st.getQuestItemsCount(6842): htmltext = "You can't have more than one circlet." else: st.giveItems(6842, 1) htmltext = "Enjoy your Wings of Destiny Circlet." st.exitQuest(1) else: html = "<html><body>Monument of Heroes:<br>You're not a Hero and aren't eligible to receive the Wings of Destiny Circlet. Better luck next time.<br><a action=\"bypass -h npc_%objectId%_Chat 0\">Return</a></body></html>" htmltext = html.replace("%objectId%", str(npc.getObjectId())) st.exitQuest(1) return htmltext QUEST = Quest(-1, qn, "custom") CREATED = State('Start', QUEST) QUEST.setInitialState(CREATED) for i in MONUMENTS: QUEST.addStartNpc(i) QUEST.addTalkId(i)
def onKill(self, npc, player, isPet): partyMember = self.getRandomPartyMember(player, "1") if not partyMember: return st = partyMember.getQuestState(qn) if st: if st.getState() == STARTED: numItems, chance = divmod(100 * Config.RATE_DROP_QUEST, 100) if st.getRandom(100) < chance: numItems += 1 st.giveItems(RELICS, int(numItems)) st.playSound("ItemSound.quest_itemget") if st.getRandom(100) < (5 * Config.RATE_DROP_QUEST): st.giveItems(ENTRANCE, 1) st.playSound("ItemSound.quest_middle") return QUEST = Quest(619, qn, "Relics of the Old Empire") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(GHOST) QUEST.addTalkId(GHOST) for mobId in MOBS: QUEST.addKillId(mobId) STARTED.addQuestDrop(GHOST, RELICS, 1) STARTED.addQuestDrop(GHOST, ENTRANCE, 1)
if st.getRandom(100) < 50: st.giveItems(INPICIO_SAC_ID, 1) st.playSound("ItemSound.quest_middle") elif npcId == 20233: st.set("id", "0") if st.getInt("cond") and st.getQuestItemsCount( RING_OF_TESTIMONY2_ID ) == 1 and st.getQuestItemsCount(SPIDER_THORN_ID) < 10: if st.getRandom(100) < 50: st.giveItems(SPIDER_THORN_ID, 1) st.playSound("ItemSound.quest_middle") return QUEST = Quest(221, qn, "Testimony Of Prosperity") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(30104) QUEST.addTalkId(30104) QUEST.addTalkId(30005) QUEST.addTalkId(30368) QUEST.addTalkId(30466) QUEST.addTalkId(30517) QUEST.addTalkId(30519) QUEST.addTalkId(30531)
st.set("cond","6") else: st.playSound("ItemSound.quest_itemget") elif npcId == 20458 : st.set("id","0") if st.getInt("cond") and st.getQuestItemsCount(PENITENTS_MARK) == 1 and st.getQuestItemsCount(ASHEN_BONES)<10 : st.giveItems(ASHEN_BONES,1) if st.getQuestItemsCount(ASHEN_BONES) == 10 : st.playSound("ItemSound.quest_middle") st.set("cond","6") else: st.playSound("ItemSound.quest_itemget") return QUEST = Quest(413,qn,"Path To Shillien Oracle") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(30330) QUEST.addTalkId(30330) QUEST.addTalkId(30375) QUEST.addTalkId(30377) QUEST.addKillId(20457) QUEST.addKillId(20458)
else: return "30598-6.htm" #you're not eligible to get a coupon (level caps, pkkills or didnt change class yet) elif event == "newbie_show_weapon": if 6 <= level <= 39 and not pkkills and occupation_level == 0: L2Multisell.getInstance().SeparateAndSend( WEAPON_MULTISELL, player, False, 0.0) else: return "30598-7.htm" #you're not eligible to use warehouse elif event == "newbie_show_armor": if 6 <= level <= 39 and not pkkills and occupation_level > 0: L2Multisell.getInstance().SeparateAndSend( ACCESORIES_MULTISELL, player, False, 0.0) else: return "30598-8.htm" #you're not eligible to use warehouse def onTalk(self, npc, player): st = player.getQuestState(qn) if not st: st = self.newQuestState(player) return "30598.htm" QUEST = Quest(-1, qn, "custom") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) for i in NPCs: QUEST.addStartNpc(i) QUEST.addTalkId(i)
st.playSound("ItemSound.quest_middle") else: st.playSound("ItemSound.quest_itemget") elif npcId == VEGUS and not (clover + album) and st.getInt("id"): if st.getRandom(100) < VEGUS_CHANCE: st.giveItems(CLOVER_COIN, 1) if coin: st.playSound("ItemSound.quest_middle") else: st.playSound("ItemSound.quest_itemget") return QUEST = Quest(QuestNumber, str(QuestNumber) + "_" + QuestName, QuestDescription) CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(SORINT) QUEST.addTalkId(SORINT) QUEST.addTalkId(SANDRA) QUEST.addKillId(ANCIENT_GARGOYLE) QUEST.addKillId(VEGUS) STARTED.addQuestDrop(KAILS_COIN, SORINT, 1) STARTED.addQuestDrop(COIN_ALBUM, SORINT, 1) STARTED.addQuestDrop(CLOVER_COIN, SORINT, 1)