Esempio n. 1
0
 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)
Esempio n. 2
0
        st = partyMember.getQuestState(qn)
        if st:
            if st.getState() == STARTED:
                count = st.getQuestItemsCount(EYE_OF_DARKNESS)
                chance = CHANCE[npc.getNpcId()] * Config.RATE_DROP_QUEST
                numItems, chance = divmod(chance, 100)
                if st.getInt("cond") == 1:
                    if st.getRandom(100) < chance:
                        numItems = numItems + 1
                    if count + numItems >= 100:
                        numItems = 100 - count
                        st.playSound("ItemSound.quest_middle")
                        st.set("cond", "2")
                    else:
                        st.playSound("ItemSound.quest_itemget")
                    st.giveItems(EYE_OF_DARKNESS, int(numItems))
        return


QUEST = Quest(602, qn, "Shadow Of Light")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)

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

for i in MOBS:
    QUEST.addKillId(i)

STARTED.addQuestDrop(EYE_OF_ARGOS, EYE_OF_DARKNESS, 1)
        if player.isSubClassActive():
            st.exitQuest(1)
            return htmltext
        # Orcs only
        if npcId in NPCS:
            htmltext = str(npcId)
            if race in [3]:
                if classId.level(
                ) == 1:  # first occupation change already made
                    htmltext += "-21.htm"
                elif classId.level(
                ) >= 2:  # second/third occupation change already made
                    htmltext += "-22.htm"
                elif id == 44:  # Orc Fighter
                    return htmltext + "-01.htm"
                elif id == 49:  # Orc Mystic
                    return htmltext + "-06.htm"
            else:
                htmltext += "-23.htm"  # other races
        st.exitQuest(1)
        return htmltext


QUEST = Quest(99996, qn, "village_master")
CREATED = State('Start', QUEST)

QUEST.setInitialState(CREATED)

for npc in NPCS:
    QUEST.addStartNpc(npc)
    QUEST.addTalkId(npc)
                        st.set("cond", "4")
                    else:
                        st.playSound("ItemSound.quest_itemget")
                    st.giveItems(BONE_FRAGMENT1_ID, numItems)
        elif npcId in [20015, 20020]:
            if st.getQuestItemsCount(PRESERVE_OIL_ID) == 1:
                if st.getRandom(10) < 3 * Config.RATE_DROP_QUEST:
                    st.set("cond", "7")
                    st.giveItems(ZOMBIE_HEAD_ID, 1)
                    st.playSound("ItemSound.quest_middle")
                    st.takeItems(PRESERVE_OIL_ID, 1)
        return


QUEST = Quest(103, qn, "Spirit Of Craftsman")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30307)

QUEST.addTalkId(30307)

QUEST.addTalkId(30132)
QUEST.addTalkId(30144)

QUEST.addKillId(20015)
QUEST.addKillId(20020)
QUEST.addKillId(20455)
QUEST.addKillId(20517)
              st.giveItems(6697,1)
        if reward == 0 :
          if st.getRandom(2) == 0 :
             htmltext = "31919-4.htm"
          else :
             htmltext = "31919-5.htm"
      else :
        htmltext = "31919-6.htm"
    elif event.isdigit() and int(event) in RCP_REWARDS :
      st.takeItems(RELIC,1000)
      st.giveItems(int(event),1)
      htmltext = "31454-17.htm"
    return htmltext

QUEST       = Quest(620,qn,"Four Goblets")
CREATED     = State('Start', QUEST)
STARTED     = State('Started', QUEST)

QUEST.setInitialState(CREATED)

QUEST.addStartNpc(NAMELESS_SPIRIT)

QUEST.addTalkId(NAMELESS_SPIRIT)

for npcTalkId in [GHOST_OF_WIGOTH_1,GHOST_OF_WIGOTH_2,CONQ_SM,EMPER_SM,SAGES_SM,JUDGE_SM,GHOST_CHAMBERLAIN_1,GHOST_CHAMBERLAIN_2] :
  QUEST.addTalkId(npcTalkId)

for npcStartId in [CONQ_SM,EMPER_SM,SAGES_SM,JUDGE_SM,GHOST_CHAMBERLAIN_1,GHOST_CHAMBERLAIN_2] :
  QUEST.addStartNpc(npcStartId)

for npcKillId in range(18120,18256) :
Esempio n. 6
0
 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)
Esempio n. 7
0
                        numItems = int(numItems)
                        if numItems != 0:
                            if int(
                                (count + numItems) / 100) > int(count / 100):
                                st.playSound("ItemSound.quest_middle")
                            else:
                                st.playSound("ItemSound.quest_itemget")
                            st.giveItems(Mane, numItems)
                        st.giveItems(Mane, 1)
                elif npcId in Ketra_Orcs:
                    st.unset("id")
                    st.takeItems(Mane, -1)
                    st.exitQuest(1)
        return


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

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

for mobId in Varka_Mobs:
    QUEST.addKillId(mobId)

STARTED.addQuestDrop(Kadun, Mane, 1)

for mobId in Ketra_Orcs:
    QUEST.addKillId(mobId)
Esempio n. 8
0
         htmltext = "31519-0.htm"
   return htmltext

 def onKill(self,npc,player,isPet):
  st = player.getQuestState(qn)
  if st :
    if st.getState() == STARTED :
      count = st.getQuestItemsCount(GEM_OF_SUBMISSION)
      if st.getInt("cond") == 1 and count < 300 :
         st.giveItems(GEM_OF_SUBMISSION,1)  
         if count == 299 :  
           st.playSound("ItemSound.quest_middle")  
           st.set("cond","2")  
         else:  
           st.playSound("ItemSound.quest_itemget") 
  return

QUEST       = Quest(627,qn,"Heart In Search Of Power")
CREATED     = State('Start', QUEST)
STARTED     = State('Started', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(31518)

QUEST.addTalkId(31518)
QUEST.addTalkId(31519)

for mobs in range(21520,21541):
  QUEST.addKillId(mobs)

STARTED.addQuestDrop(21520,GEM_OF_SUBMISSION,1)
Esempio n. 9
0
                                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)
    def onKill(self, npc, player, isPet):
        st = player.getQuestState(qn)
        if not st: return
        if st.getState() != STARTED: return

        count = st.getQuestItemsCount(BRACELET)
        cond = st.getInt("cond")
        if st.getRandom(100) < CHANCE + (
            (npc.getNpcId() - 20579) * 5) and count < 60 and cond == 1:
            st.giveItems(BRACELET, 1)
            if count == 59:
                st.playSound("ItemSound.quest_middle")
                st.set("cond", "2")
            else:
                st.playSound("ItemSound.quest_itemget")
        return


QUEST = Quest(300, qn, "Hunting Leto Lizardman")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(RATH)

QUEST.addTalkId(RATH)

for mob in range(20577, 20581) + [20582]:
    QUEST.addKillId(mob)

STARTED.addQuestDrop(RATH, BRACELET, 1)
    def onTalk (self,npc,player):
        htmltext = "<html><body>You are either not carrying out your quest or don't meet the criteria.</body></html>"
        st = player.getQuestState(qn)
        if st:
           npcId = npc.getNpcId()
           id = st.getState()
           cond = st.getInt("cond")
           if cond == 0 and id == CREATED:
              if npcId == WIZARD:
                 htmltext = "31522.htm"
           if cond == 1 and id == STARTED:
              htmltext = "31522-1.htm"
           if cond == 2 and id == STARTED:
              if st.getQuestItemsCount(V_HEART) == 200:
                 htmltext = "31522-2.htm"
        return htmltext

QUEST       = Quest(632, qn, "Necromancer's Request")
CREATED     = State('Start', QUEST)
STARTED     = State('Started', QUEST)

for i in VAMPIRES:
    QUEST.addKillId(i)
for i in UNDEADS:
    QUEST.addKillId(i)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(WIZARD)
QUEST.addTalkId(WIZARD)
STARTED.addQuestDrop(WIZARD,V_HEART,1)
STARTED.addQuestDrop(WIZARD,Z_BRAIN,1)
        if not partyMember: return
        st = partyMember.getQuestState(qn)
        if st:
            if st.getState() == STARTED:
                prevItems = st.getQuestItemsCount(CLAWS)
                random = st.getRandom(MAX)
                chance = CHANCE[npc.getNpcId()] * Config.RATE_DROP_QUEST
                numItems, chance = divmod(chance, MAX)
                if random < chance:
                    numItems += 1
                st.giveItems(CLAWS, int(numItems))
                if int(prevItems + numItems) / 100 > int(prevItems) / 100:
                    st.playSound("ItemSound.quest_middle")
                else:
                    st.playSound("ItemSound.quest_itemget")
        return


QUEST = Quest(629, qn, "Clean Up the Swamp of Screams")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(CAPTAIN)

QUEST.addTalkId(CAPTAIN)

for mobs in range(21508, 21518):
    QUEST.addKillId(mobs)

STARTED.addQuestDrop(CAPTAIN, CLAWS, 1)
         st.playSound("ItemSound.quest_middle")
         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)
            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)
Esempio n. 15
0
         if st.getRandom(1000) < chance :
           numItems += 1
         numItems = int(numItems)
         if numItems != 0 :
            if int((count+numItems)/100) > int(count/100) :
                st.playSound("ItemSound.quest_middle")
            else :
                st.playSound("ItemSound.quest_itemget")
            st.giveItems(Molar,numItems)
     elif npcId in Varka_Mobs :
         st.unset("id")
         st.takeItems(Molar,-1)
         st.exitQuest(1)
     return

QUEST       = Quest(612, qn, "War With Ketra Orcs")
CREATED     = State('Start', QUEST)
STARTED     = State('Started', QUEST)

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

QUEST.addTalkId(Ashas)

for mobId in Ketra_Orcs :
  QUEST.addKillId(mobId)

STARTED.addQuestDrop(Ashas,Molar,1)

for mobId in Varka_Mobs :
  QUEST.addKillId(mobId)
Esempio n. 16
0
        if not partyMember: return
        st = partyMember.getQuestState(qn)
        if st:
            count = st.getQuestItemsCount(CRIMSON_DRAKE_HEART)
            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(CRIMSON_DRAKE_HEART, 1)
        return


QUEST = Quest(53, qn, "Linnaeus Special Bait")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

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

QUEST.addKillId(CRIMSON_DRAKE)
STARTED.addQuestDrop(LINNAEUS, CRIMSON_DRAKE_HEART, 1)
Esempio n. 17
0
                st.playSound("ItemSound.quest_itemget")
            elif n > 4:
                if st.getQuestItemsCount(SUSPICIOUS_CONTRACT) == 0:
                    if st.getQuestItemsCount(SUSPICIOUS_MEMO) < 3:
                        st.giveItems(SUSPICIOUS_MEMO, 1)
                        st.playSound("ItemSound.quest_itemget")
                    else:
                        st.giveItems(SUSPICIOUS_CONTRACT, 1)
                        st.takeItems(SUSPICIOUS_MEMO, -1)
                        st.playSound("ItemSound.quest_middle")
                        st.set("cond", "2")
        return


QUEST = Quest(292, qn, "Crush Brigands")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30532)

QUEST.addTalkId(30532)

QUEST.addTalkId(30533)

QUEST.addKillId(20322)
QUEST.addKillId(20323)
QUEST.addKillId(20324)
QUEST.addKillId(20327)
              st.playSound("ItemSound.quest_middle")
              st.set("cond","2")
            else:
              st.playSound("ItemSound.quest_itemget")
   else :
        if st.getInt("cond")==4 and st.getQuestItemsCount(EMERALD_PIECE)<20 and st.getRandom(100)<50 :
            st.giveItems(EMERALD_PIECE,1)
            if st.getQuestItemsCount(EMERALD_PIECE) == 20 :
              st.playSound("ItemSound.quest_middle")
              st.set("cond","5")
            else:
              st.playSound("ItemSound.quest_itemget")
   return

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


QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30327)

QUEST.addTalkId(30327)

QUEST.addTalkId(30317)
QUEST.addTalkId(30327)

QUEST.addKillId(20035)
QUEST.addKillId(20042)
Esempio n. 19
0
                htmltext = "30094-01.htm"
            elif npcId == 30094 and st.getInt("cond")==2 :
                htmltext = "30094-03.htm"
            elif npcId == 30090 and st.getInt("cond")==3 :
                htmltext = "30090-01.htm"
            elif npcId == 30090 and st.getInt("cond")==4 :
                htmltext = "30090-03.htm"
            elif npcId == 30116 and st.getInt("cond")==5 :
                htmltext = "30116-01.htm"
            elif npcId == 30116 and st.getInt("cond")==6 :
                htmltext = "30116-03.htm"

        return htmltext

QUEST       = Quest(49,qn,"The Road Home")
CREATED     = State('Start', QUEST)
STARTED     = State('Started', QUEST)
COMPLETED   = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30097)

QUEST.addTalkId(30097)

QUEST.addTalkId(30094)
QUEST.addTalkId(30090)
QUEST.addTalkId(30116)

STARTED.addQuestDrop(30097,GALLADUCCIS_ORDER_DOCUMENT_ID_1,1)
STARTED.addQuestDrop(30097,GALLADUCCIS_ORDER_DOCUMENT_ID_2,1)
STARTED.addQuestDrop(30097,GALLADUCCIS_ORDER_DOCUMENT_ID_3,1)
Esempio n. 20
0
                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
]:
Esempio n. 21
0
         if ItemsCount_DR > 0 : 
           htmltext = "30048-09.htm" 
         elif ItemsCount_BP > 0 : 
           htmltext = "30048-10.htm" 
           st.takeItems(BAULS_POTION,-1) 
           st.giveItems(NECKLACE,1) 
           st.set("cond","0") 
           st.set("onlyone","1") 
           st.setState(COMPLETED)
           st.playSound("ItemSound.quest_finish") 
         else: 
           htmltext = "30048-07.htm" 
   return htmltext

QUEST     = Quest(1,qn,"Letters of Love") 
CREATED   = State('Start',     QUEST) 
STARTING  = State('Starting',  QUEST) 
STARTED   = State('Started',   QUEST) 
COMPLETED = State('Completed', QUEST) 

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(DARIN) 

QUEST.addTalkId(DARIN) 

QUEST.addTalkId(ROXXY) 
QUEST.addTalkId(BAULRO) 

STARTED.addQuestDrop(DARIN,DARINGS_LETTER,1) 
STARTED.addQuestDrop(DARIN,RAPUNZELS_KERCHIEF,1) 
STARTED.addQuestDrop(DARIN,DARINGS_RECEIPT,1) 
       chance = MOBS4[npcId]
       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():
Esempio n. 23
0
     else :
       st.giveItems(item,1)
       htmltext = npc+"-01.htm"
       count = 0
       for item in NPC_GIFTS.values():
         count += st.getQuestItemsCount(item)
       if count == 6 :
         st.set("cond","2")
         st.set("id","2")
         st.playSound("ItemSound.quest_middle")
       else :
         st.playSound("ItemSound.quest_itemget")
   return htmltext

QUEST     = Quest(4,qn,"Long Live the Paagrio Lord")
CREATED   = State('Start',     QUEST)
STARTING  = State('Starting',  QUEST)
STARTED   = State('Started',   QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30578)

QUEST.addTalkId(30578)

QUEST.addTalkId(30559)
QUEST.addTalkId(30560)
QUEST.addTalkId(30562)
QUEST.addTalkId(30566)
QUEST.addTalkId(30578)
QUEST.addTalkId(30585)
                    if count < maxcount:
                        st.giveItems(item, 1)
                        # spawns 5 new medusas around the dead queen *muha*
                        if npcId == 27108:
                            for i in range(5):
                                st.addSpawn(20158)
                        if count == maxcount - 1:
                            st.playSound("ItemSound.quest_middle")
                            st.set(var, str(isValue + 1))
                        else:
                            st.playSound("ItemSound.quest_itemget")
                        return


QUEST = Quest(233, qn, "Test Of Warspirit")
CREATED = State('Start', QUEST)
PART1 = State('Part1', QUEST)
PART2 = State('Part2', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30510)

for npcId in NPC:
    QUEST.addTalkId(npcId)

for mobId in PART1_MOBS:
    QUEST.addKillId(mobId)

for mobId in PART2_MOBS:
    QUEST.addKillId(mobId)
                    st.setState(COMPLETED)
                    st.playSound("ItemSound.quest_finish")
                    st.set("onlyone", "1")
                    st.giveItems(RING_ID, 1)
                    st.giveItems(RING_ID, 1)
                    st.takeItems(DELIVERY_LIST_ID, -1)
                    st.takeItems(JACKSONS_RECEIPT_ID, -1)
                    st.takeItems(SILVIAS_RECEIPT_ID, -1)
                    st.takeItems(RANTS_RECEIPT_ID, -1)
                    st.addExpAndSp(600, 0)
                    htmltext = "30041-06.htm"
        return htmltext


QUEST = Quest(153, qn, "Wharf Oldtimers Favor")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30041)

QUEST.addTalkId(30041)

QUEST.addTalkId(30002)
QUEST.addTalkId(30003)
QUEST.addTalkId(30054)

STARTED.addQuestDrop(30041, HEAVY_WOOD_BOX_ID, 1)
STARTED.addQuestDrop(30041, CLOTH_BUNDLE_ID, 1)
Esempio n. 26
0
              else:
                st.playSound("ItemSound.quest_itemget")
   elif npcId == 20508 :
        if st.getInt("cond") and st.getQuestItemsCount(TARANTULA_PIC) == 1 and st.getQuestItemsCount(BEAD) < 20 :
          if npc.isSpoil() :
            if st.getRandom(10) < 6 :
              st.giveItems(BEAD,1)
              if st.getQuestItemsCount(BEAD) == 20 :
                st.playSound("ItemSound.quest_middle")
                st.set("cond","8")
              else:
                st.playSound("ItemSound.quest_itemget")
   return

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


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

QUEST.addTalkId(30316)
QUEST.addTalkId(30517)
QUEST.addTalkId(30519)
QUEST.addTalkId(30525)
QUEST.addTalkId(30538)
QUEST.addTalkId(30556)
                    htmltext = "32255-01.htm"
                elif cond == 2:
                    htmltext = "32255-13.htm"
            elif npcId == ICONPRESENT:
                if cond == 2:
                    htmltext = "32256-01.htm"
                elif cond == 3:
                    htmltext = "32256-14.htm"
            elif npcId == ICONFUTURE:
                if cond == 3:
                    htmltext = "32257-01.htm"
                elif cond == 4:
                    htmltext = "32257-12.htm"
        return htmltext


QUEST = Quest(178, qn, "Iconic Trinity")

CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)

QUEST.addStartNpc(KEKROPUS)

QUEST.addTalkId(KEKROPUS)
QUEST.addTalkId(ICONPAST)
QUEST.addTalkId(ICONPRESENT)
QUEST.addTalkId(ICONFUTURE)
        count = st.getQuestItemsCount(WOLF_PELT)
        numItems, chance = divmod(100 * Config.RATE_DROP_QUEST, 100)
        if st.getRandom(100) < chance:
            numItems = numItems + 1
        if count + numItems >= 40:
            numItems = 40 - count
            if numItems != 0:
                st.playSound("ItemSound.quest_middle")
                st.set("cond", "2")
        else:
            st.playSound("ItemSound.quest_itemget")
        st.giveItems(WOLF_PELT, int(numItems))
        return


QUEST = Quest(258, qn, "Bring Wolf Pelt1")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30001)

QUEST.addTalkId(30001)

QUEST.addKillId(20120)
QUEST.addKillId(20442)

STARTED.addQuestDrop(20120, WOLF_PELT, 1)
Esempio n. 29
0
            if n < 5:
                st.giveItems(GOLEM_HEARTSTONE, 1)
                st.playSound("ItemSound.quest_itemget")
            elif n < 58:
                st.giveItems(BROKEN_HEARTSTONE, 1)
                st.playSound("ItemSound.quest_itemget")
        elif npcId == 20083:
            if n < 6:
                st.giveItems(GOLEM_HEARTSTONE, 1)
                st.playSound("ItemSound.quest_itemget")
            elif n < 56:
                st.giveItems(BROKEN_HEARTSTONE, 1)
                st.playSound("ItemSound.quest_itemget")
        return


QUEST = Quest(329, qn, "Curiosity Of Dwarf")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)

QUEST.addStartNpc(30437)
QUEST.addTalkId(30437)

QUEST.addKillId(20083)
QUEST.addKillId(20085)

STARTED.addQuestDrop(20085, BROKEN_HEARTSTONE, 1)
STARTED.addQuestDrop(20085, GOLEM_HEARTSTONE, 1)
                                           spawnedNpc)
                    else:
                        st.giveItems(R4[st.getRandom(len(R4))], 1)
                except:
                    pass
            elif npcId == GREAT_DEMON_KING:
                try:
                    st.getQuestTimer("greatdemon_timer1").cancel()
                    st.giveItems(ADENA, 1412965)
                    st.playSound("ItemSound.quest_itemget")
                except:
                    pass
        return

QUEST = Quest(334, qn, "The Wishing Potion")
CREATED = State('Start', QUEST)
STARTED = State('started', QUEST)
#Following states kept for backwards compatibility only.
MIDDLE = State('middle', QUEST)
END = State('end', QUEST)
COMPLETED = State('completed', QUEST)

QUEST.setInitialState(CREATED)

QUEST.addStartNpc(ALCHEMIST_MATILD)

QUEST.addTalkId(ALCHEMIST_MATILD)
QUEST.addTalkId(TORAI)
QUEST.addTalkId(RUPINA)
QUEST.addTalkId(WISDOM_CHEST)