Index: C:/Documents and Settings/Sparrowhawk/workspace/interlude/data/jscript/quests/358_IllegitimateChildOfAGoddess/__init__.py =================================================================== --- C:/Documents and Settings/Sparrowhawk/workspace/interlude/data/jscript/quests/358_IllegitimateChildOfAGoddess/__init__.py (revision 3437) +++ C:/Documents and Settings/Sparrowhawk/workspace/interlude/data/jscript/quests/358_IllegitimateChildOfAGoddess/__init__.py (working copy) @@ -11,7 +11,6 @@ qn = "358_IllegitimateChildOfAGoddess" #Variables -DROP_RATE=12*Config.RATE_DROP_QUEST #in % REQUIRED=108 #how many items will be paid for a reward (affects onkill sounds too) #Quest items @@ -29,8 +28,8 @@ #NPCs OLTLIN = 30862 -#Mobs -MOBS = [ 20672,20673 ] +#Mobs and chances in % +MOBS = { 20672:68,20673:66 } class Quest (JQuest) : @@ -83,7 +82,7 @@ if st.getState() != STARTED : return count = st.getQuestItemsCount(SN_SCALE) - numItems, chance = divmod(DROP_RATE,100) + numItems, chance = divmod(MOBS[npcId]*Config.RATE_DROP_QUEST,100) if st.getRandom(100) < chance : numItems += 1 if numItems != 0 : @@ -111,6 +110,7 @@ # Quest initialization QUEST.addTalkId(OLTLIN) -for i in MOBS : +for i in MOBS.keys() : QUEST.addKillId(i) - STARTED.addQuestDrop(i,SN_SCALE,1) \ No newline at end of file + +STARTED.addQuestDrop(OLTLIN,SN_SCALE,1) \ No newline at end of file Index: C:/Documents and Settings/Sparrowhawk/workspace/interlude/data/jscript/quests/376_GiantsExploration1/__init__.py =================================================================== --- C:/Documents and Settings/Sparrowhawk/workspace/interlude/data/jscript/quests/376_GiantsExploration1/__init__.py (revision 3437) +++ C:/Documents and Settings/Sparrowhawk/workspace/interlude/data/jscript/quests/376_GiantsExploration1/__init__.py (working copy) @@ -11,10 +11,10 @@ #Variables #Ancient parchment drop rate in % -DROP_RATE = 15*Config.RATE_DROP_QUEST +DROP_RATE = 2*Config.RATE_DROP_QUEST MAX = 100 #Mysterious Book drop rate in % -DROP_RATE_2 = 5*Config.RATE_DROP_QUEST +DROP_RATE_2 = 1*Config.RATE_DROP_QUEST #By changing this setting you can make a group of recipes harder to get RP_BALANCE = 50 #Changing this value to non-zero, will turn recipes to 100% instead of 60% @@ -140,7 +140,7 @@ partyMember = self.getRandomPartyMember(player,"awaitBook","1") if partyMember : st = partyMember.getQuestState(qn) - drop = st.getRandom(100) + drop = st.getRandom(1000) if drop < DROP_RATE_2 and not st.getQuestItemsCount(MST_BK): st.giveItems(MST_BK,1) st.unset("awaitBook") Index: C:/Documents and Settings/Sparrowhawk/workspace/interlude/data/jscript/quests/636_TruthBeyond/__init__.py =================================================================== --- C:/Documents and Settings/Sparrowhawk/workspace/interlude/data/jscript/quests/636_TruthBeyond/__init__.py (revision 3437) +++ C:/Documents and Settings/Sparrowhawk/workspace/interlude/data/jscript/quests/636_TruthBeyond/__init__.py (working copy) @@ -37,6 +37,8 @@ if st : npcId = npc.getNpcId() id = st.getState() + if id == COMPLETED and st.getQuestItemsCount(MARK) == 0 and st.getQuestItemsCount(8067) == 0 : #without this if someone aborted quest 637 he cannot anymore enter to pagan temple + st.setState(CREATED) cond = st.getInt("cond") if cond == 0 and id == CREATED: if npcId == ELIYAH : Index: C:/Documents and Settings/Sparrowhawk/workspace/interlude/data/jscript/quests/426_FishingShot/__init__.py =================================================================== --- C:/Documents and Settings/Sparrowhawk/workspace/interlude/data/jscript/quests/426_FishingShot/__init__.py (revision 3437) +++ C:/Documents and Settings/Sparrowhawk/workspace/interlude/data/jscript/quests/426_FishingShot/__init__.py (working copy) @@ -8,7 +8,7 @@ qn = "426_FishingShot" SWEET_FLUID = 7586 -MOBS1 = { +MOBS = { 20005:45,20013:100,20016:100,20017:115,20030:105,20132:70,20038:135,20044:125,20046:100, 20047:100,20050:140,20058:140,20063:160,20066:170,20070:180,20074:195,20077:205,20078:205, 20079:205,20080:220,20081:370,20083:245,20084:255,20085:265,20087:565,20088:605,20089:250, @@ -27,34 +27,18 @@ 20940:500,20941:460,20943:345,20944:335,21100:125,21101:155,21103:215,21105:310,21107:600, 21117:120,21023:170,21024:175,21025:185,21026:200,21034:195,21125:12,21263:650,21520:880, 21526:970,21536:985,21602:555,21603:750,21605:620,21606:875,21611:590,21612:835,21617:615, - 21618:875,21635:775,21638:165,21639:185,21641:195,21644:170 + 21618:875,21635:775,21638:165,21639:185,21641:195,21644:170,20579:1420,20639:1280,20646:1145, + 20648:1120,20650:1460,20651:1260,20652:1335,20657:1630,20658:1570,20808:1050,20809:1865, + 20832:1700,20979:1980,20991:1665,20994:1590,21261:1170,21263:1795,21508:1100,21510:1280, + 21511:1995,21512:1995,21514:1185,21516:1495,21517:1495,21518:1255,21636:1950,20655:2110, + 20656:2150,20772:2105,20810:2050,20812:2490,20814:2775,20816:2875,20819:2280,20955:2670, + 20978:2555,21058:2355,21060:2045,21075:2110,21078:2610,21081:2955,21264:2920,20815:3205, + 20822:3100,20824:3665,20825:3620,20983:3205,21314:3145,21316:3235,21318:3280,21320:3355, + 21322:3430,21376:3280,21378:3375,21380:3375,21387:3640,21393:3935,21395:3855,21652:3375, + 21655:3640,21657:3935,20828:4935,21061:4530,21069:4825,21382:4125,21384:4400,21390:4750, + 21654:4400,21656:4750,20829:6115,20859:8890,21066:5005,21068:11565,21071:12400 } -MOBS2 = { - 20579:420,20639:280,20646:145,20648:120,20650:460,20651:260,20652:335,20657:630,20658:570, - 20808:50,20809:865,20832:700,20979:980,20991:665,20994:590,21261:170,21263:795,21508:100, - 21510:280,21511:995,21512:995,21514:185,21516:495,21517:495,21518:255,21636:950 -} - -MOBS3 = { - 20655:110,20656:150,20772:105,20810:50,20812:490,20814:775,20816:875,20819:280,20955:670, - 20978:555,21058:355,21060:45,21075:110,21078:610,21081:955,21264:920 -} - -MOBS4 = { - 20815:205,20822:100,20824:665,20825:620,20983:205,21314:145,21316:235,21318:280,21320:355, - 21322:430,21376:280,21378:375,21380:375,21387:640,21393:935,21395:855,21652:375,21655:640, - 21657:935 -} - -MOBS5 = { - 20828:935,21061:530,21069:825,21382:125,21384:400,21390:750,21654:400,21656:750 -} - -MOBSspecial = { - 20829:[115,6],20859:[890,8],21066:[5,5],21068:[565,11],21071:[400,12] -} - class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) @@ -90,28 +74,11 @@ if not partyMember : return st = partyMember.getQuestState(qn) npcId = npc.getNpcId() - drop = 0 - chance = 0 - if npcId in MOBS1.keys() : - chance = MOBS1[npcId] - elif npcId in MOBS2.keys() : - chance = MOBS2[npcId] - drop = 1 - elif npcId in MOBS3.keys() : - chance = MOBS3[npcId] - drop = 2 - elif npcId in MOBS4.keys() : - chance = MOBS4[npcId] - drop = 3 - elif npcId in MOBS5.keys() : - chance = MOBS5[npcId] - drop = 4 - elif npcId in MOBSspecial.keys() : - chance,drop = MOBSspecial[npcId] + numItems, chance = divmod(MOBS[npcId]*Config.RATE_DROP_QUEST,1000) if st.getRandom(1000) <= chance : - drop += 1 - if drop != 0 : - st.giveItems(SWEET_FLUID,drop*int(Config.RATE_DROP_QUEST)) + numItems += 1 + if numItems > 1 : + st.giveItems(SWEET_FLUID,int(numItems)) st.playSound("ItemSound.quest_itemget") return @@ -125,17 +92,7 @@ QUEST.addStartNpc(npc) QUEST.addTalkId(npc) -for mob in MOBS1.keys(): +for mob in MOBS.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(): - QUEST.addKillId(mob) -for mob in MOBS5.keys(): - QUEST.addKillId(mob) -for mob in MOBSspecial.keys(): - QUEST.addKillId(mob) STARTED.addQuestDrop(20005,SWEET_FLUID,1) \ No newline at end of file Index: C:/Documents and Settings/Sparrowhawk/workspace/interlude/data/jscript/quests/377_GiantsExploration2/__init__.py =================================================================== --- C:/Documents and Settings/Sparrowhawk/workspace/interlude/data/jscript/quests/377_GiantsExploration2/__init__.py (revision 3437) +++ C:/Documents and Settings/Sparrowhawk/workspace/interlude/data/jscript/quests/377_GiantsExploration2/__init__.py (working copy) @@ -10,10 +10,6 @@ QUEST_NUMBER,QUEST_NAME,QUEST_DESCRIPTION = 377,"GiantsExploration2","Exploration of Giants Cave, part 2" qn = "377_GiantsExploration2" -#Variables -#Titan Ancient Books drop rate in % -DROP_RATE=15*Config.RATE_DROP_QUEST -MAX = 100 #Alternative rewards. Set this to a non-zero value and recipes will be 100% instead of 60% ALT_RP_100=0 @@ -41,8 +37,15 @@ #NPCs HR_SOBLING = 31147 -#Mobs -MOBS = [ 20654,20656,20657,20658 ] +#Mobs and chances, chance in per mille +MOBS = { + 20654:18, + 20656:16, + 20657:14, + 20658:12 +} +#max chance +MAX = 1000 class Quest (JQuest) : @@ -107,7 +110,8 @@ partyMember = self.getRandomPartyMemberState(player,STARTED) if not partyMember : return st = partyMember.getQuestState(qn) - numItems, chance = divmod(DROP_RATE,MAX) + npcId = npc.getNpcId() + numItems, chance = divmod(MOBS[npcId]*Config.RATE_DROP_QUEST,MAX) drop = st.getRandom(MAX) if drop < chance : numItems = numItems +1 @@ -130,7 +134,7 @@ # Quest initialization QUEST.addTalkId(HR_SOBLING) -for i in MOBS : +for i in MOBS.keys() : QUEST.addKillId(i) -STARTED.addQuestDrop(HR_SOBLING,DICT2,1) \ No newline at end of file +STARTED.addQuestDrop(HR_SOBLING,DICT2,1)