Exemplo n.º 1
0
   if st.getState() != STARTED : return 
   
   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)
Exemplo n.º 2
0
				elif cond > 1 :
					htmltext = "a3.htm"
		else:
			htmltext = None
			npc.showMessageWindow(player,3)
		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.getQuestItemsCount(TarlkAmulet) < 30 :
			st.giveItems(TarlkAmulet,1)
			st.playSound("ItemSound.quest_itemget")
			if st.getQuestItemsCount(TarlkAmulet) == 30 :
				st.set("cond", "2")

QUEST = Quest(504,qn,"Competition for the Bandit Stronghold")
CREATED     = State('Start', QUEST)
STARTED     = State('Started', QUEST)

QUEST.setInitialState(CREATED)

QUEST.addStartNpc(Messenger)
QUEST.addTalkId(Messenger)
QUEST.addKillId(TarlkBugbear)
QUEST.addKillId(TarlkBugbearWarrior)
QUEST.addKillId(TarlkBugbearHighWarrior)
QUEST.addKillId(TarlkBasilisk)
QUEST.addKillId(ElderTarlkBasilisk)
Exemplo n.º 3
0
                leader = clan.getLeader()
                if leader:
                    pleader = leader.getPlayerInstance()
                    if pleader:
                        if player.isInsideRadius(pleader, 1600, 1, 0):
                            st = pleader.getQuestState(qn)
        if not st: return
        option = st.getInt("raid")
        if st.getInt("cond") == 1 and st.getState(
        ) == STARTED and option in REWARDS_LIST.keys():
            raid, item = REWARDS_LIST[option]
            npcId = npc.getNpcId()
            if npcId == raid and not st.getQuestItemsCount(item):
                st.giveItems(item, 1)
                st.playSound("ItemSound.quest_middle")
        return


# Quest class and state definition
QUEST = Quest(508, qn, qd)
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)

QUEST.setInitialState(CREATED)

QUEST.addStartNpc(SIR_ERIC_RODEMAI)
QUEST.addTalkId(SIR_ERIC_RODEMAI)

for npc, item in REWARDS_LIST.values():
    QUEST.addKillId(npc)
    STARTED.addQuestDrop(npc, item, 1)
Exemplo n.º 4
0
            st.set("id", "0")
            if st.getInt("cond") and st.getQuestItemsCount(
                    PENDANT_OF_MOTHER) == 0:
                st.giveItems(PENDANT_OF_MOTHER, 1)
                st.playSound("ItemSound.quest_middle")
        elif npcId == 20029:
            st.set("id", "0")
            if st.getInt("cond") and st.getQuestItemsCount(
                    PENDANT_OF_MOTHER) == 0:
                st.giveItems(PENDANT_OF_MOTHER, 1)
                st.playSound("ItemSound.quest_middle")
        return


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

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30022)

QUEST.addTalkId(30022)

QUEST.addTalkId(30017)
QUEST.addTalkId(30030)
QUEST.addTalkId(30253)
QUEST.addTalkId(30333)
QUEST.addTalkId(30408)
Exemplo n.º 5
0
        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)
Exemplo n.º 6
0
                                ABYSS_RUNESTONE1_ID) + st.getQuestItemsCount(
                                    ABYSS_RUNESTONE2_ID
                                ) + st.getQuestItemsCount(
                                    ABYSS_RUNESTONE3_ID
                                ) + st.getQuestItemsCount(
                                    ABYSS_RUNESTONE4_ID) == 4:
                            st.set("cond", str(cond + 1))
                        return
                    else:
                        st.set("cond", str(cond + 1))
                else:
                    st.playSound("Itemsound.quest_itemget")
        return


QUEST = Quest(213, qn, "Trial Of Seeker")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(NPCS[0])

for npcId in NPCS:
    for i in range(2647, 2674):
        QUEST.addTalkId(npcId)
        STARTED.addQuestDrop(npcId, i, 1)

for mobId in MOBS:
    QUEST.addKillId(mobId)
Exemplo n.º 7
0
            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)
Exemplo n.º 8
0
       htmltext = "30095-0a.htm"
       st.exitQuest(1)
   elif cond == 1 :
     if not st.getQuestItemsCount(TREASURE_CHEST) :
        htmltext = "30095-2.htm"
     else :
        htmltext = "30095-4.htm"
   return htmltext

 def onKill(self,npc,player,isPet):
   partyMember = self.getRandomPartyMemberState(player,STARTED)
   if not partyMember : return
   st = partyMember.getQuestState(qn)
   
   chance = st.getRandom(100)
   if chance < CHANCE_OF_DROP :
     st.giveItems(TREASURE_CHEST,1)
     st.playSound("ItemSound.quest_itemget")
   return

QUEST       = Quest(365,qn,"Devil's Legacy")
CREATED     = State('Start', QUEST)
STARTED     = State('Started', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(RANDOLF)
QUEST.addTalkId(RANDOLF)
for mob in MOBS:
    QUEST.addKillId(mob)

STARTED.addQuestDrop(RANDOLF,TREASURE_CHEST,1)
Exemplo n.º 9
0
   numItems,chance = divmod(100*Config.RATE_DROP_QUEST,100)
   item,count = MOB[npcId]
   if item :
      if st.getRandom(100) <chance :
         numItems = numItems + 1
      prevItems = st.getQuestItemsCount(item)
      if prevItems < count :
         if prevItems + numItems > count :
            numItems = count - prevItems
         if int(numItems) != 0 :
            st.giveItems(item,int(numItems))
         if (st.getQuestItemsCount(LEAF) != 80 and st.getQuestItemsCount(STONE) != 100) :
            st.playSound("ItemSound.quest_itemget")
         else :
            st.playSound("ItemSound.quest_middle")
            st.set("cond","2")
   return

QUEST       = Quest(379,qn,"Fantasy Wine")
CREATED     = State('Start', QUEST)
STARTED     = State('Started', QUEST)

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

QUEST.addKillId(ENKU_CHAMPION)
QUEST.addKillId(ENKU_SHAMAN)

STARTED.addQuestDrop(HARLAN,LEAF,1)
STARTED.addQuestDrop(HARLAN,STONE,1)
Exemplo n.º 10
0
                    st.giveItems(VARANGKAS_PARASITE, 1)
        else:
            if st.getQuestItemsCount(
                    DARKWING_BAT_FANG) < 66 and st.getQuestItemsCount(
                        VARANGKAS_PARASITE):
                if st.getQuestItemsCount(DARKWING_BAT_FANG) < 65:
                    st.playSound("ItemSound.quest_itemget")
                else:
                    st.playSound("ItemSound.quest_middle")
                    st.set("cond", "2")
                st.giveItems(DARKWING_BAT_FANG, 5)
                st.takeItems(VARANGKAS_PARASITE, -1)
        return


QUEST = Quest(275, qn, "Black Winged Spies")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30567)

QUEST.addTalkId(30567)

QUEST.addKillId(20316)
QUEST.addKillId(27043)

STARTED.addQuestDrop(20316, DARKWING_BAT_FANG, 1)
STARTED.addQuestDrop(20316, VARANGKAS_PARASITE, 1)
Exemplo n.º 11
0
            st.takeItems(BLADE_STAKATO_FANG, -1)
            st.playSound("ItemSound.quest_middle")
        return htmltext

    def onKill(self, npc, player, isPet):
        partyMember = self.getRandomPartyMemberState(player, STARTED)
        if not partyMember: return
        st = partyMember.getQuestState(qn)

        npcId = npc.getNpcId()
        random = st.getRandom(100)
        chance = CHANCE + npcId - 20794
        if random <= chance:
            st.giveItems(BLADE_STAKATO_FANG, 1)
            st.playSound("ItemSound.quest_itemget")
        return


QUEST = Quest(368, qn, "Trespassing Into The Sacred Area")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30926)

QUEST.addTalkId(30926)

STARTED.addQuestDrop(30926, BLADE_STAKATO_FANG, 1)

for i in range(20794, 20798):
    QUEST.addKillId(i)
Exemplo n.º 12
0
        if st:
            count = st.getQuestItemsCount(GRAVE_GOODS)
            if st.getInt("cond") == 1 and count < 180:
                chance = DROP_CHANCE * Config.RATE_DROP_QUEST
                numItems, chance = divmod(chance, 100)
                if st.getRandom(100) < chance:
                    numItems += 1
                if numItems:
                    if count + numItems >= 180:
                        numItems = 180 - count
                        st.playSound("ItemSound.quest_middle")
                        st.set("cond", "2")
                    else:
                        st.playSound("ItemSound.quest_itemget")
                    st.giveItems(GRAVE_GOODS, int(numItems))
        return


QUEST = Quest(645, qn, "Ghosts of Batur")
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, GRAVE_GOODS, 1)
Exemplo n.º 13
0
            if st.getQuestItemsCount(SPARKLE_PEBBLE) == 2 :
              st.playSound("ItemSound.quest_middle")
              st.set("cond","9")
            else:
              st.playSound("ItemSound.quest_itemget")
   elif npcId == 20021 :   #Red Bear
        st.set("id","0")
        #Only get a RED_SOIL if we are on the quest for the Earth Snake
        if st.getInt("cond") == 11 :
            st.giveItems(RED_SOIL,1)
            st.playSound("ItemSound.quest_middle")
            st.set("cond","12")
   return

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


QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30391)

QUEST.addTalkId(30391)

QUEST.addTalkId(30409)
QUEST.addTalkId(30410)
QUEST.addTalkId(30411)
QUEST.addTalkId(30412)
QUEST.addTalkId(30413)
Exemplo n.º 14
0
        elif npcId == 20045:
            st.set("id", "0")
            if st.getInt("cond") == 1 and st.getQuestItemsCount(
                    HUB_SCENT
            ) == 1 and st.getQuestItemsCount(HEART_OF_LUNACY) < 3:
                if st.getRandom(2) == 0:
                    st.giveItems(HEART_OF_LUNACY, 1)
                    if st.getQuestItemsCount(HEART_OF_LUNACY) == 3:
                        st.playSound("ItemSound.quest_middle")
                    else:
                        st.playSound("ItemSound.quest_itemget")
        return


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

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30421)

QUEST.addTalkId(30421)

QUEST.addTalkId(30415)
QUEST.addTalkId(30418)
QUEST.addTalkId(30419)

QUEST.addKillId(20015)
QUEST.addKillId(20022)
Exemplo n.º 15
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)
Exemplo n.º 16
0
   elif npcId == 20102 :
    if st.getInt("cond") == 16 and st.getQuestItemsCount(BONE_FRAGMENT6) == 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]:
Exemplo n.º 17
0
                #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)
Exemplo n.º 18
0
     leafs = st.getQuestItemsCount(FT_LEAF)
     if 0 < leafs :
        for i in range(4) :
           if npcId == FAIRY_TREES[i][0] and (st.getInt("id") | FAIRY_TREES[i][1] != st.getInt("id")) :
              for j in range(2):
                 for k in range(2): 
                    st.addSpawn(GUARDIAN,FAIRY_TREES[i][2]+70*pow(-1,j%2),FAIRY_TREES[i][3]+70*pow(-1,k%2),FAIRY_TREES[i][4])
              htmltext = FAIRY_TREES[i][5]
   return htmltext

 def onKill(self,npc,player,isPet) :
   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(SG_CRONOS)
# Quest initialization
QUEST.addTalkId(SG_CRONOS)

QUEST.addTalkId(FY_MYMYU)

STARTING.addQuestDrop(SG_CRONOS,FT_LEAF,1)
Exemplo n.º 19
0
 def onKill(self,npc,player,isPet):
     st = player.getQuestState(qn)
     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)
Exemplo n.º 20
0
        objId = npc.getObjectId()
        if npcId not in WATERED_SQUASH: return
        if npcId in self.adultSmallSquash:
            npc.broadcastPacket(
                CreatureSay(objId, 0, npc.getName(), "Tыква открывается!!"))
            npc.broadcastPacket(
                CreatureSay(objId, 0, npc.getName(),
                            "Ееее! Открывается! Много хороших вещей  ..."))
        elif npcId in self.adultLargeSquash:
            npc.broadcastPacket(
                CreatureSay(objId, 0, npc.getName(), "Tыква открывается!!"))
            npc.broadcastPacket(
                CreatureSay(objId, 0, npc.getName(),
                            "Ееее! Открывается! Много хороших вещей  ..."))
        else:
            npc.broadcastPacket(
                CreatureSay(objId, 0, npc.getName(), "За что, хозяин?!"))
            npc.broadcastPacket(
                CreatureSay(objId, 0, npc.getName(), "Ой, кишки вывалились!!"))
        return


QUEST = squash(-1, "group_template", "ai")

CREATED = State('Start', QUEST)
QUEST.setInitialState(CREATED)

for i in WATERED_SQUASH:
    QUEST.addSkillUseId(i)
    QUEST.addAttackId(i)
    QUEST.addKillId(i)
Exemplo n.º 21
0
        elif npcId == JASMINE and cond == 1:
            htmltext = "30134-04.htm"
        elif id == STARTED:
            if npcId == ROSELYN and cond:
                if st.getQuestItemsCount(ROSELYNS_NOTE) == 0:
                    htmltext = "30355-01.htm"
                else:
                    htmltext = "30355-03.htm"
            elif npcId == HARNE and cond == 2 and st.getQuestItemsCount(
                    ROSELYNS_NOTE) > 0:
                htmltext = "30144-01.htm"
            elif npcId == JASMINE and cond == 3:
                htmltext = "30134-05.htm"

        return htmltext


QUEST = Quest(8, qn, "An Adventure Begins")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(JASMINE)

QUEST.addTalkId(JASMINE)

QUEST.addTalkId(ROSELYN)
QUEST.addTalkId(HARNE)

STARTED.addQuestDrop(JASMINE, ROSELYNS_NOTE, 1)
Exemplo n.º 22
0
                            pst.giveItems(RAIN_SONG, 1)
                            pst.playSound("ItemSound.quest_middle")
                            pst.set("cond", "5")
            else:
                pst = player.getQuestState(qn)
                if pst:
                    if pst.getInt("cond") == 4 and pst.getQuestItemsCount(
                            RAIN_SONG) < 1:
                        pst.giveItems(RAIN_SONG, 1)
                        pst.playSound("ItemSound.quest_middle")
                        pst.set("cond", "5")
        return


QUEST = Quest(246, qn, "Possessor Of A Precious Soul - 3")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

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

QUEST.addTalkId(OSSIAN)
QUEST.addTalkId(LADD)

QUEST.addKillId(PILGRIM_OF_SPLENDOR)
QUEST.addKillId(JUDGE_OF_SPLENDOR)
QUEST.addKillId(BARAKIEL)

STARTED.addQuestDrop(CARADINE, CARADINE_LETTER_LAST, 1)
Exemplo n.º 23
0
        elif id == STARTED:
            if npcId == Lorain:
                if not cond:
                    if player.getLevel() < 41:
                        htmltext = "30673-00.htm"
                    else:
                        htmltext = "30673-01.htm"
                elif cond == 1:
                    htmltext = "30673-03.htm"
            elif npcId == Nikola:
                if cond == 1:
                    htmltext = "30621-01.htm"
                elif cond == 2:
                    htmltext = "30621-05.htm"
            elif npcId == Dorothy:
                if cond == 2:
                    htmltext = "30970-01.htm"
        return htmltext


QUEST = Quest(188, qn, "Seal Removal")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)

QUEST.addTalkId(Nikola)
QUEST.addTalkId(Lorain)
QUEST.addTalkId(Dorothy)
Exemplo n.º 24
0
    def onKill(self, npc, player, isPet):
        st = player.getQuestState(qn)
        if not st: return
        if st.getState() != STARTED: return

        count = st.getQuestItemsCount(BONE_FRAGMENT)
        if count < 10 and st.getRandom(10) > 7:
            st.giveItems(BONE_FRAGMENT, 1)
            if count == 9:
                st.playSound("ItemSound.quest_middle")
                st.set("cond", "2")
            else:
                st.playSound("ItemSound.quest_itemget")
        return


QUEST = Quest(320, qn, "Bones Tell Future")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30359)

QUEST.addTalkId(30359)

QUEST.addKillId(20517)
QUEST.addKillId(20518)

STARTED.addQuestDrop(20517, BONE_FRAGMENT, 1)
Exemplo n.º 25
0
            drop = 3
        elif npcId in MOBS5.keys():
            chance = MOBS5[npcId]
            drop = 4
        elif npcId in MOBSspecial.keys():
            chance, drop = MOBSspecial[npcId]
        if st.getRandom(1000) <= chance:
            drop += 1
        if drop != 0:
            st.giveItems(SWEET_FLUID, drop * int(Config.RATE_DROP_QUEST))
            st.playSound("ItemSound.quest_itemget")
        return


QUEST = Quest(426, qn, "Quest for Fishing Shot")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)

QUEST.setInitialState(CREATED)

for npc in range(31562, 31580) + [31616, 31696, 31697]:
    QUEST.addStartNpc(npc)
    QUEST.addTalkId(npc)

for mob in MOBS1.keys():
    QUEST.addKillId(mob)
for mob in MOBS2.keys():
    QUEST.addKillId(mob)
for mob in MOBS3.keys():
    QUEST.addKillId(mob)
for mob in MOBS4.keys():
Exemplo n.º 26
0
        elif int(
                st.get(var)) == value and random < chance and count < maxcount:
            st.giveItems(item, 1)
            if count == maxcount - 1:
                st.playSound("ItemSound.quest_middle")
                if newValue == 1 and st.getQuestItemsCount(
                        RAGNA_ORC_HEAD) and st.getQuestItemsCount(
                            RAGNA_CHIEF_NOTICE):
                    st.set(var, "2")
                else:
                    st.set(var, str(newValue))
            else:
                st.playSound("ItemSound.quest_itemget")
        return

QUEST = Quest(232, qn, "Test Of Lord")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(NPC[4])

for npcId in NPC:
    QUEST.addTalkId(npcId)

for mobId in MOBS:
    QUEST.addKillId(mobId)

for item in range(3391, 3417):
    STARTED.addQuestDrop(NPC[4], item, 1)
Exemplo n.º 27
0
                st.set("id", "0")
                if st.getInt(
                        "cond") and st.getQuestItemsCount(WANTED_BILL) > 0:
                    n = st.getRandom(4)
                    if st.getQuestItemsCount(STOLEN_ITEM[n]) == 0:
                        st.giveItems(STOLEN_ITEM[n], 1)
                        if not HaveAllStolenItems(st):
                            st.playSound("ItemSound.quest_itemget")
                        else:
                            st.playSound("ItemSound.quest_middle")
                            st.set("cond", "6")
        return


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

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30379)

QUEST.addTalkId(30379)

QUEST.addTalkId(30425)

QUEST.addKillId(27038)

for StolenItemId in STOLEN_ITEM.keys():
    STARTED.addQuestDrop(27038, STOLEN_ITEM[StolenItemId], 1)
Exemplo n.º 28
0
                        chance = Chance[npcId]
                        #This is support for quest 612: War With Ketra Orcs. Basically, if the person has both this quest and 612, then they only get one quest item, 50% chance for 612 quest item and 50% chance for this quest's item
                        if st2:
                            if (st.getRandom(2) == 1 or item
                                    == 0) and npcId in Chance_molar.keys():
                                item = 57
                                MAX = 100
                                drop = Molar
                                chance = Chance_molar[npcId]
                                giveReward(st, item, chance, MAX, drop)
                            elif id == 2 and item != 0:
                                giveReward(st, item, chance, MAX, drop)
                        elif id == 2 and item != 0:
                            giveReward(st, item, chance, MAX, drop)
        return


QUEST = Quest(611, qn, "Alliance With Varka Silenos")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(Naran_Ashanuk)

QUEST.addTalkId(Naran_Ashanuk)

for mobId in Chance.keys():
    QUEST.addKillId(mobId)
STARTED.addQuestDrop(Naran_Ashanuk, Ketra_Badge_Soldier, 1)
STARTED.addQuestDrop(Naran_Ashanuk, Ketra_Badge_Officer, 1)
STARTED.addQuestDrop(Naran_Ashanuk, Ketra_Badge_Captain, 1)
Exemplo n.º 29
0
                if cond == 4:
                    htmltext = "31662-0.htm"
                elif cond > 4:
                    htmltext = "31662-2.htm"
            elif npcId == FORGOTTEN_MONUMENT_3:
                if cond == 5:
                    htmltext = "31663-0.htm"
                elif cond > 5:
                    htmltext = "31663-2.htm"
            elif npcId == FORGOTTEN_MONUMENT_4:
                if cond == 6:
                    htmltext = "31664-0.htm"
                elif cond > 6:
                    htmltext = "31664-2.htm"
        return htmltext


QUEST = Quest(31, qn, "Secret Buried In The Swamp")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(ABERCROMBIE)

QUEST.addTalkId(ABERCROMBIE)

for i in range(31661, 31666):
    QUEST.addTalkId(i)

STARTED.addQuestDrop(ABERCROMBIE, KRORINS_JOURNAL, 1)
Exemplo n.º 30
0
        count = st.getQuestItemsCount(PLAGUE_DUST)
        if cond == 1 and st.getRandom(100) < 40 and not count:
            st.giveItems(PLAGUE_DUST, 1)
            st.playSound("ItemSound.quest_middle")
            st.set("cond", "2")
        elif cond == 3 and st.getRandom(100) < 40 and count < 5:
            if count == 4:
                st.playSound("ItemSound.quest_middle")
                st.set("cond", "4")
            else:
                st.playSound("ItemSound.quest_itemget")
            st.giveItems(PLAGUE_DUST, 1)
        return


QUEST = Quest(159, qn, "Protect Headsprings")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30154)

QUEST.addTalkId(30154)

QUEST.addKillId(27017)

STARTED.addQuestDrop(27017, PLAGUE_DUST, 1)
STARTED.addQuestDrop(30154, HYACINTH_CHARM1, 1)
STARTED.addQuestDrop(30154, HYACINTH_CHARM2, 1)