Пример #1
0
                    st.playSound("ItemSound.quest_middle")
            elif npcId == GREENIS and st.getQuestItemsCount(GREENIS_LETTER):
                htmltext = "30157-03.htm"
            elif npcId == GREENIS and (
                    st.getQuestItemsCount(ARUJIENS_LETTER1)
                    or st.getQuestItemsCount(ARUJIENS_LETTER2)
                    or st.getQuestItemsCount(ARUJIENS_LETTER3)):
                htmltext = "30157-01.htm"
        return htmltext


QUEST = Quest(2, qn, "What Women Want")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(ARUJIEN)

QUEST.addTalkId(ARUJIEN)

QUEST.addTalkId(MIRABEL)
QUEST.addTalkId(HERBIEL)
QUEST.addTalkId(GREENIS)
QUEST.addTalkId(ARUJIEN)

STARTED.addQuestDrop(ARUJIEN, GREENIS_LETTER, 1)
STARTED.addQuestDrop(ARUJIEN, ARUJIENS_LETTER3, 1)
STARTED.addQuestDrop(ARUJIEN, ARUJIENS_LETTER1, 1)
STARTED.addQuestDrop(ARUJIEN, ARUJIENS_LETTER2, 1)
STARTED.addQuestDrop(ARUJIEN, POETRY_BOOK, 1)
Пример #2
0
   return

QUEST       = Quest(401,qn,"Path To Warrior")
CREATED     = State('Start', QUEST)
STARTING     = State('Starting', QUEST)
STARTED     = State('Started', QUEST)
COMPLETED   = State('Completed', QUEST)


QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30010)

QUEST.addTalkId(30010)

QUEST.addTalkId(30253)

QUEST.addKillId(20035)
QUEST.addKillId(20038)
QUEST.addKillId(20042)
QUEST.addKillId(20043)

STARTED.addQuestDrop(30253,SIMPLONS_LETTER,1)
STARTED.addQuestDrop(30253,RUSTED_BRONZE_SWORD2,1)
STARTED.addQuestDrop(30010,EINS_LETTER,1)
STARTED.addQuestDrop(30253,WARRIOR_GUILD_MARK,1)
STARTED.addQuestDrop(20035,RUSTED_BRONZE_SWORD1,1)
STARTED.addQuestDrop(20042,RUSTED_BRONZE_SWORD1,1)
STARTED.addQuestDrop(20043,POISON_SPIDER_LEG2,1)
STARTED.addQuestDrop(20038,POISON_SPIDER_LEG2,1)
STARTED.addQuestDrop(30010,RUSTED_BRONZE_SWORD3,1)
Пример #3
0
        count = st.getQuestItemsCount(KASHA_WOLF_FANG)
        if count < 50:
            numItems, chance = divmod(125 * Config.RATE_DROP_QUEST, 100)
            if st.getRandom(100) <= chance:
                numItems += 1
            numItems = int(numItems)
            if numItems != 0:
                if 50 <= (count + numItems):
                    numItems = 50 - count
                    st.playSound("ItemSound.quest_middle")
                    st.set("cond", "2")
                else:
                    st.playSound("ItemSound.quest_itemget")
                st.giveItems(KASHA_WOLF_FANG, numItems)
        return


QUEST = Quest(271, qn, "Proof Of Valor")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)  # kept just for backwards compatibility
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30577)

QUEST.addTalkId(30577)

QUEST.addKillId(20475)
STARTED.addQuestDrop(20475, KASHA_WOLF_FANG, 1)
Пример #4
0
        npcId = npc.getNpcId()
        n = st.getRandom(10)
        if n < 5:
            if npcId == 20145:
                st.giveItems(HARPY_FEATHER, 1)
            elif npcId == 20158:
                st.giveItems(MEDUSA_VENOM, 1)
            elif npcId == 20176:
                st.giveItems(WYRMS_TOOTH, 1)
            st.playSound("ItemSound.quest_itemget")
        return


QUEST = Quest(331, qn, "Arrow For Vengeance")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)

QUEST.addStartNpc(30125)
QUEST.addTalkId(30125)

QUEST.addKillId(20145)
QUEST.addKillId(20158)
QUEST.addKillId(20176)

STARTED.addQuestDrop(20145, HARPY_FEATHER, 1)
STARTED.addQuestDrop(20158, MEDUSA_VENOM, 1)
STARTED.addQuestDrop(20176, WYRMS_TOOTH, 1)
Пример #5
0
QUEST = Quest(418, qn, "Path To Artisan")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30527)

QUEST.addTalkId(30527)

QUEST.addTalkId(30298)
QUEST.addTalkId(30317)

QUEST.addKillId(20017)
QUEST.addKillId(20389)
QUEST.addKillId(20390)

STARTED.addQuestDrop(30527, SILVERYS_RING, 1)
STARTED.addQuestDrop(20389, RATMAN_TOOTH, 1)
STARTED.addQuestDrop(20390, BIG_RATMAN_TOOTH, 1)
STARTED.addQuestDrop(30527, PASS_1ST, 1)
STARTED.addQuestDrop(30298, PASS_2ND, 1)
STARTED.addQuestDrop(30298, SECRET_BOX2, 1)
STARTED.addQuestDrop(30527, PASS_1ST, 1)
STARTED.addQuestDrop(30298, PASS_2ND, 1)
STARTED.addQuestDrop(30298, SECRET_BOX2, 1)
STARTED.addQuestDrop(30317, KLUTOS_LETTER, 1)
STARTED.addQuestDrop(20017, SECRET_BOX1, 1)
STARTED.addQuestDrop(30298, FOOTPRINT, 1)
Пример #6
0
                        npc.broadcastPacket(
                            CreatureSay(
                                spawnedNpc.getObjectId(), 0,
                                spawnedNpc.getName(),
                                "Curse of the gods on the one that defiles the property of the empire!"
                            ))
                        leader_st.set("ImpGraveKeeper", "3")
                        self.ImpGraveKepperStat = 1
                    else:
                        leader_st.addSpawn(27179)
        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])

for npcId in NPC:
    QUEST.addTalkId(npcId)

for mobId in DROPLIST.keys():
    QUEST.addKillId(mobId)

QUEST.addAttackId(27181)

for i in range(3839, 3848) + range(3866, 3870):
    PROGRESS.addQuestDrop(27181, i, 1)
Пример #7
0
   if not st : return 
   if st.getState() != STARTED : return 
   
   npcId = npc.getNpcId()
   count = st.getQuestItemsCount(HONEY_POUCH)
   if st.getInt("cond") == 1 and count < 100 :
     st.giveItems(HONEY_POUCH,1)
     if count == 99 :
       st.playSound("ItemSound.quest_middle")
       st.set("cond","2")
     else :
       st.playSound("ItemSound.quest_itemget")  
   return

QUEST       = Quest(299,qn,"Gather Ingredients For A Pie")
CREATED     = State('Start', QUEST)
STARTED     = State('Started', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30620)
QUEST.addTalkId(30620)

QUEST.addTalkId(30063)
QUEST.addTalkId(30466)

QUEST.addKillId(WASP_LEADER)
QUEST.addKillId(WASP_WORKER)

STARTED.addQuestDrop(WASP_WORKER,HONEY_POUCH,1)
STARTED.addQuestDrop(EMILY,AVELLAN_SPICE,1)
STARTED.addQuestDrop(EMILY,FRUIT_BASKET,1)
Пример #8
0
                    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)
Пример #9
0
   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) 

STARTED.addQuestDrop(30017,GALLINS_OAK_WAND_ID,1) 
STARTED.addQuestDrop(30017,GALLINS_OAK_WAND_ID,1) 
STARTED.addQuestDrop(30017,GALLINS_OAK_WAND_ID,1) 
Пример #10
0
                count = st.getQuestItemsCount(DESTROYED_GOLEM_SHARD)
                if cond == 1 and count < 500:
                    chance = DROP_CHANCE * Config.RATE_DROP_QUEST
                    numItems, chance = divmod(chance, 100)
                    if st.getRandom(100) < chance:
                        numItems += 1
                    if numItems:
                        if count + numItems >= 500:
                            numItems = 500 - count
                            st.playSound("ItemSound.quest_middle")
                            st.set("cond", "2")
                        else:
                            st.playSound("ItemSound.quest_itemget")
                        st.giveItems(DESTROYED_GOLEM_SHARD, int(numItems))
        return


QUEST = Quest(647, qn, "Influx of Machines")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(32069)

QUEST.addTalkId(32069)

for i in range(22052, 22079):
    QUEST.addKillId(i)

STARTED.addQuestDrop(32069, DESTROYED_GOLEM_SHARD, 1)
Пример #11
0
                        htmltext = "31377-05.htm"
                #else:
                #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(614, qn, "Slay The Enemy Commander!")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(Ashas)
QUEST.addTalkId(Ashas)

STARTED.addQuestDrop(Tayr, Tayr_Head, 1)
QUEST.addKillId(Tayr)
Пример #12
0
        if st.getState() != STARTED: return

        npcId = npc.getNpcId()
        if npcId == 27020:
            if st.getQuestItemsCount(
                    VAROOL_FOULCLAWS_FANG) == 0 and st.getRandom(10) > 7:
                st.giveItems(VAROOL_FOULCLAWS_FANG, 1)
                st.playSound("ItemSound.quest_middle")
        elif st.getRandom(10) > 5:
            st.giveItems(WERERAT_FANG, 1)
            st.playSound("ItemSound.quest_itemget")
        return


QUEST = Quest(316, qn, "Destroy Plaguebringers")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30155)

QUEST.addTalkId(30155)

QUEST.addKillId(20040)
QUEST.addKillId(20047)
QUEST.addKillId(27020)

STARTED.addQuestDrop(20040, WERERAT_FANG, 1)
STARTED.addQuestDrop(27020, VAROOL_FOULCLAWS_FANG, 1)
Пример #13
0
   cond = st.getInt("cond")
   cond,item,max,chance=DROPLIST[npc.getNpcId()]
   count=st.getQuestItemsCount(item)
   if st.getInt("cond") == cond and count < max and st.getRandom(100) < chance :
      st.giveItems(item,1)
      if count == max-1 :
         st.playSound("ItemSound.quest_middle")
         st.set("cond",str(cond+1))
      else :
         st.playSound("ItemSound.quest_itemget")
   return

QUEST       = Quest(38,qn,"Dragon Fangs")
CREATED     = State('Start', QUEST)
STARTED     = State('Started', QUEST)
COMPLETED   = State('Completed', QUEST)


QUEST.setInitialState(CREATED)
QUEST.addStartNpc(LUIS)

QUEST.addTalkId(LUIS)
QUEST.addTalkId(IRIS)
QUEST.addTalkId(ROHMER)

for mob in DROPLIST.keys():
    QUEST.addKillId(mob)

for item in range(7173,7178):
    STARTED.addQuestDrop(LUIS,item,1)
Пример #14
0
            st.exitQuest(1)
        if DEBUG: return "DEBUG: Leader died. Quest failed."

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)
    QUEST.addTalkId(i)

for i in [WITCH_KALIS, WITCH_ATHREA]:
    QUEST.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)

for i in range(len(MOBS)):
    QUEST.addKillId(MOBS[i][0])
    CREATED.addQuestDrop(MOBS[i][0], MOBS[i][1], 1)

for i in CHESTS:
    QUEST.addKillId(i)
Пример #15
0
        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)
Пример #16
0
      st.giveItems(BONE_FRAGMENT6,1)
      st.playSound("ItemSound.quest_itemget")
   elif npcId == 20022 :
    if st.getInt("cond") == 16 and st.getQuestItemsCount(BONE_FRAGMENT7) == 0 :
      st.giveItems(BONE_FRAGMENT7,1)
      st.playSound("ItemSound.quest_itemget")
   elif npcId == 20100 :
    if st.getInt("cond") == 16 and st.getQuestItemsCount(BONE_FRAGMENT8) == 0 :
      st.giveItems(BONE_FRAGMENT8,1)
      st.playSound("ItemSound.quest_itemget")
   return

QUEST       = Quest(227,qn,"Test Of Reformer")
CREATED     = State('Start', QUEST)
STARTING    = State('Starting', QUEST)
STARTED     = State('Started', QUEST)
COMPLETED   = State('Completed', QUEST)


QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30118)

QUEST.addTalkId(30118)

for npcId in [30666,30667,30669,30670,30732,30668]:
 QUEST.addTalkId(npcId)
for mobId in [20100,20102,20104,20404,20022,27099,27128,27130,27129,27132,27131]:
 QUEST.addKillId(mobId)
for item in range(2822,2840)+[3037]:
 STARTED.addQuestDrop(20102,item,1)
Пример #17
0
            else:
                htmltext = "30357-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 + ((npc.getNpcId() - 20000) ^ 4)):
            st.giveItems(IMP_SHACKLES, 1)
            st.playSound("ItemSound.quest_itemget")
        return


QUEST = Quest(265, qn, "Chains Of Slavery")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30357)

QUEST.addTalkId(30357)

QUEST.addKillId(20004)
QUEST.addKillId(20005)

STARTED.addQuestDrop(20004, IMP_SHACKLES, 1)
Пример #18
0
            else:
                htmltext = "30361-05.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(100) < 50:
            st.giveItems(WIND_SHARD, 1)
            st.playSound("ItemSound.quest_itemget")
        return


QUEST = Quest(317, qn, "Catch The Wind")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30361)

QUEST.addTalkId(30361)

QUEST.addKillId(20036)
QUEST.addKillId(20044)

STARTED.addQuestDrop(20036, WIND_SHARD, 1)
Пример #19
0
        if st.getState() != STARTED: return

        count = st.getQuestItemsCount(GOLEM_SHARD_ID)
        if st.getInt("cond") == 2 and st.getRandom(100) < 30 and count < 5:
            st.giveItems(GOLEM_SHARD_ID, 1)
            if count == 4:
                st.playSound("ItemSound.quest_middle")
                st.set("cond", "3")
            else:
                st.playSound("ItemSound.quest_itemget")
        return


QUEST = Quest(152, qn, "Shards Of Golem")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(HARRIS)

QUEST.addTalkId(HARRIS)

QUEST.addTalkId(ALTRAN)

QUEST.addKillId(20016)

for item in range(1008, 1012):
    STARTED.addQuestDrop(HARRIS, item, 1)
Пример #20
0
   if chance in range(1,15) and st.getQuestItemsCount(CHAPTER_OF_FIRE) == 0 :
     st.giveItems(CHAPTER_OF_FIRE,1)
     st.playSound("ItemSound.quest_itemget")
   elif chance in range(25,40) and st.getQuestItemsCount(CHAPTER_OF_WATER) == 0 :
     st.giveItems(CHAPTER_OF_WATER,1)
     st.playSound("ItemSound.quest_itemget")
   elif chance in range(50,65) and st.getQuestItemsCount(CHAPTER_OF_WIND) == 0 :
     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")
       st.unset("awaitsPartyDrop")
   return

QUEST       = Quest(370,qn,"A Wiseman Sows Seeds")
CREATED     = State('Start', QUEST)
STARTED     = State('Started', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(CASIAN)
QUEST.addTalkId(CASIAN)

for i in MOBS :
  QUEST.addKillId(i)

for i in range(5917,5921):
    STARTED.addQuestDrop(CASIAN,i,1)
Пример #21
0
        if not st: return
        if st.getState() != STARTED: return
        if st.getInt("cond") == 1:
            numItems, chance = divmod(100 * Config.RATE_DROP_QUEST, 100)
            if st.getRandom(100) < chance:
                numItems = numItems + 1
            count = st.getQuestItemsCount(RED_CRYSTALS_ID)
            if count + numItems >= 50:
                numItems = 50 - count
                if numItems != 0:
                    st.playSound("ItemSound.quest_middle")
                    st.set("cond", "2")
            else:
                st.playSound("ItemSound.quest_itemget")
            st.giveItems(RED_CRYSTALS_ID, int(numItems))
        return


QUEST = Quest(432, qn, "Birthday Party Song")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(31043)

QUEST.addTalkId(31043)

QUEST.addKillId(21103)
STARTED.addQuestDrop(21103, RED_CRYSTALS_ID, 1)
Пример #22
0
    def onKill(self, npc, player, isPet):
        partyMember = self.getRandomPartyMemberState(player, STARTED)
        if not partyMember: return
        st = partyMember.getQuestState(qn)
        chance = CHANCE[npc.getNpcId()] * Config.RATE_DROP_QUEST
        numItems, chance = divmod(chance, MAX)
        if st.getRandom(MAX) < chance:
            numItems = numItems + 1
        if numItems != 0:
            st.giveItems(ANCIENT_SCROLL, int(numItems))
            st.playSound("ItemSound.quest_itemget")
        return


QUEST = Quest(385, qn, "Yoke of the Past")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)

QUEST.setInitialState(CREATED)

for npcId in range(31095, 31126):
    if npcId in [31111, 31112, 31113]:
        continue
    QUEST.addTalkId(npcId)
    QUEST.addStartNpc(npcId)

for mobs in range(21208, 21256):
    QUEST.addKillId(mobs)

STARTED.addQuestDrop(20986, ANCIENT_SCROLL, 1)
Пример #23
0
    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)
Пример #24
0
                                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)

STARTED.addQuestDrop(30329, PALLUS_TALISMAN, 1)
STARTED.addQuestDrop(20049, LYCANTHROPE_SKULL, 1)
STARTED.addQuestDrop(30422, COFFIN_ETERNAL_REST, 1)
STARTED.addQuestDrop(30422, MORTE_TALISMAN, 1)
STARTED.addQuestDrop(30329, VIRGILS_LETTER, 1)
STARTED.addQuestDrop(20043, TRIMDEN_SILK, 1)
STARTED.addQuestDrop(20038, PREDATOR_CARAPACE, 1)
Пример #25
0
       st.exitQuest(1)
   return htmltext

 def onKill(self,npc,player,isPet):
   st = player.getQuestState(qn)
   if not st : return 
   if st.getState() != STARTED : return 
   
   if st.getQuestItemsCount(FUNGUS_SAC)<10 and st.getRandom(100) < 50 :
     st.giveItems(FUNGUS_SAC,1)
     if st.getQuestItemsCount(FUNGUS_SAC) == 10 :
       st.playSound("ItemSound.quest_middle")
     else:
       st.playSound("ItemSound.quest_itemget")
   return

QUEST       = Quest(313,qn,"Collect Spores")
CREATED     = State('Start', QUEST)
STARTING    = State('Starting', QUEST)
STARTED     = State('Started', QUEST)
COMPLETED   = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30150)

QUEST.addTalkId(30150)

QUEST.addKillId(20509)

STARTED.addQuestDrop(20509,FUNGUS_SAC,1)
Пример #26
0
            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)
Пример #27
0
                            pst.set("id", "3")
                        if pst.getQuestTimer(
                                "Soul of Fire Nastron has despawned"):
                            pst.getQuestTimer(
                                "Soul of Fire Nastron has despawned").cancel()
        elif npcId in Varka_Mobs:
            st = player.getQuestState(qn)
            if st:
                if st.getQuestItemsCount(Fire_Heart):
                    st.takeItems(Fire_Heart, -1)
                st.unset("cond")
                st.unset("id")
                st.exitQuest(1)
        return


QUEST = Quest(616, qn, "Magical Power of Fire - Part 2")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(Udan)

QUEST.addTalkId(Udan)
QUEST.addTalkId(Alter)

QUEST.addKillId(Nastron)
STARTED.addQuestDrop(Nastron, Fire_Heart, 1)

for mobId in Varka_Mobs:
    QUEST.addKillId(mobId)
Пример #28
0
                    mob = st.addSpawn(ABYSS_JEWEL3, 180000)
        elif npcId == ABYSS_JEWEL1:
            self.cancelQuestTimer("Jewel1_Timer1", npc, None)
            self.cancelQuestTimer("Jewel1_Timer2", npc, None)
        elif npcId == ABYSS_JEWEL2:
            self.cancelQuestTimer("Jewel2_Timer1", npc, None)
            self.cancelQuestTimer("Jewel2_Timer2", npc, None)
        return


QUEST = Quest(337, qn, "Audience With The Land Dragon")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)

QUEST.setInitialState(CREATED)

QUEST.addStartNpc(GABRIELLE)

QUEST.addAttackId(ABYSS_JEWEL1)
QUEST.addAttackId(ABYSS_JEWEL2)
QUEST.addAttackId(ABYSS_JEWEL3)

for npc in NPCS:
    QUEST.addTalkId(npc)

for mob in MOBS:
    QUEST.addKillId(mob)

for i in range(3852, 3865) + [3890]:
    STARTED.addQuestDrop(GABRIELLE, i, 1)
Пример #29
0
QUEST.addTalkId(30519)
QUEST.addTalkId(30531)
QUEST.addTalkId(30532)
QUEST.addTalkId(30533)
QUEST.addTalkId(30534)
QUEST.addTalkId(30535)
QUEST.addTalkId(30536)
QUEST.addTalkId(30553)
QUEST.addTalkId(30554)
QUEST.addTalkId(30555)
QUEST.addTalkId(30556)
QUEST.addTalkId(30597)
QUEST.addTalkId(30620)
QUEST.addTalkId(30621)
QUEST.addTalkId(30622)

QUEST.addKillId(20154)
QUEST.addKillId(20155)
QUEST.addKillId(20156)
QUEST.addKillId(20157)
QUEST.addKillId(20223)
QUEST.addKillId(20228)
QUEST.addKillId(20230)
QUEST.addKillId(20231)
QUEST.addKillId(20232)
QUEST.addKillId(20233)
QUEST.addKillId(20234)

for item in range(3239, 3276) + [3428, 3023, 3030]:
    STARTED.addQuestDrop(30621, item, 1)
Пример #30
0
        return htmltext

    def onKill(self, npc, player, isPet):
        st = player.getQuestState(qn)
        if st:
            if st.getState() == STARTED:
                count = st.getQuestItemsCount(THIEF_GUILD_MARK)
                if st.getInt("cond") == 1 and count < 200 and st.getRandom(
                        100) < DROP_CHANCE:
                    st.giveItems(THIEF_GUILD_MARK, 1)
                    if count == 199:
                        st.playSound("ItemSound.quest_middle")
                        st.set("cond", "2")
                    else:
                        st.playSound("ItemSound.quest_itemget")
        return


QUEST = Quest(649, qn, "A Looter and a Railroad Man")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(OBI)
QUEST.addTalkId(OBI)

for BANDITS in [22017, 22018, 22019, 22021, 22022, 22023, 22024, 22026]:
    QUEST.addKillId(BANDITS)

STARTED.addQuestDrop(OBI, THIEF_GUILD_MARK, 1)