Page 1 of 1

How correctly to increase QuestRates?

Posted: Tue Jun 02, 2009 6:41 pm
by managerlexx
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:3071
L2JDP Revision Number:6133

Prompt how correctly to customise please QuestRates?

Code: Select all

# ---------------------------------------------------------------------------# Rate Settings# ---------------------------------------------------------------------------# The defaults are set to be retail-like. If you modify any of these settings your server will deviate from being retail-like.# Warning: # Please take extreme caution when changing anything. Also please understand what you are changing before you do so on a live server.# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------# Standard Settings (Default value = 1)# ---------------------------------------------------------------------------RateXp = 1RateSp = 1RatePartyXp = 1RatePartySp = 1RateDropAdena = 1RateConsumableCost = 1RateDropItems = 1RateRaidDropItems = 1RateDropSpoil = 1RateDropManor = 1RateExtractFish = 1RateQuestsReward = 1RateKarmaExpLost = 1RateSiegeGuardsPrice = 1# Warning: This need quests to be rewritten in datapack in order to work. Do not rely on this setting as it may not affect most, if not all quests.RateDropQuest = 1  # ---------------------------------------------------------------------------# Player Drops (values are set in PERCENTS)# ---------------------------------------------------------------------------PlayerDropLimit = 0PlayerRateDrop = 0PlayerRateDropItem = 0PlayerRateDropEquip = 0PlayerRateDropEquipWeapon = 0 # ---------------------------------------------------------------------------# Player XP % lost on death.# ---------------------------------------------------------------------------# Must be defined an interval per each % following this:# [limit1m,limit1M]val1;[limit2m,limit2M]val2;...# For non defined intervals, default value is 1.0 .# Example (Default settings):# 0,39-7.0;40,75-4.0;76,76-2.5;77,77-2.0;78,78-1.5# This will set 7.0 from 0 to 39 (included), 4.00 from 40 to 75 (included),# 2.5 to 76, 2.0 to 77 and 1.5 to 78# XP lost is affected by clan luck in corePlayerXPPercentLost = 0,39-7.0;40,75-4.0;76,76-2.5;77,77-2.0;78,78-1.5 # Default: 10KarmaDropLimit = 10 # Default: 40KarmaRateDrop = 40 # Default: 50KarmaRateDropItem = 50 # Default: 40KarmaRateDropEquip = 40 # Default: 10KarmaRateDropEquipWeapon = 10  # ---------------------------------------------------------------------------# Pets (Default value = 1)# ---------------------------------------------------------------------------PetXpRate = 1PetFoodRate = 1SinEaterXpRate = 1  # ---------------------------------------------------------------------------# Herbs# ---------------------------------------------------------------------------# Herb of Power, Herb of Magic, Herb of Attack Speed, Herb of Casting Speed, Herb of Critical Attack, Herb of Speed# Default: 15RateCommonHerbs = 15 # Herb of Life, Herb of Mana# Default: 10RateHpMpHerbs = 10 # Greater herb of Life, Greater Herb of Mana# Default: 4RateGreaterHerbs = 4 # Superior Herb of Life, Superior Herb of Mana# Default: 0.8RateSuperiorHerbs = 0.8 # Herb of Warrior, Herb of Mystic, Herb of Recovery# Default: 0.2RateSpecialHerbs = 0.2
It is necessary for me that was here so:

Code: Select all

RateQuestsReward = 3# Warning: This need quests to be rewritten in datapack in order to work. Do not rely on this setting as it may not affect most, if not all quests.RateDropQuest = 3
Where besides a config to change these values?

Re: How correctly to increase QuestRates?

Posted: Tue Jun 02, 2009 6:45 pm
by janiii
managerlexx wrote:Where besides a config to change these values?
in the quest scripts itself (data/scripts/quests/[123_QuestName]/__init__.py)

Re: How correctly to increase QuestRates?

Posted: Tue Jun 02, 2009 6:51 pm
by Vapulabe
Drop/exp rates on monster kill is managed on a global view, for all mobs. These are managed in the server core (L2J)

Drop/exp for quest is given by the quest script (see datapack/data/scripts/quests/...). To increase these, the scripts have to be changed to take the variable in account...

Some of the quests are already ok... other are not...

Re: How correctly to increase QuestRates?

Posted: Tue Jun 02, 2009 6:56 pm
by managerlexx
janiii wrote:
managerlexx wrote:Where besides a config to change these values?
in the quest scripts itself (data/scripts/quests/[123_QuestName]/__init__.py)
Which parametres to change?
Or only DROP_CHANCE?

Code: Select all

#Made by Kerbimport sys from net.sf.l2j import Configfrom net.sf.l2j.gameserver.model.quest import Statefrom net.sf.l2j.gameserver.model.quest import QuestStatefrom net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest  qn = "644_GraveRobberAnnihilation"  #Drop rateDROP_CHANCE = 75#NpcKARUDA = 32017#ItemsORC_GOODS = 8088#RewardsREWARDS = {    "1" : [1865 , 30], #Varnish    "2" : [1867 , 40], #Animal Skin    "3" : [1872 , 40], #Animal Bone    "4" : [1871 , 30], #Charcoal    "5" : [1870 , 30], #Coal    "6" : [1869 , 30], #Iron Ore    }#MobsMOBS = [ 22003,22004,22005,22006,22008 ] class Quest (JQuest) : def __init__(self,id,name,descr):    JQuest.__init__(self,id,name,descr)    self.questItemIds = [ORC_GOODS]  def onAdvEvent (self,event,npc, player) :   htmltext = event   st = player.getQuestState(qn)   if not st : return   cond = st.getInt("cond")   if event == "32017-03.htm" :      if st.getPlayer().getLevel() < 20 :          htmltext = "32017-02.htm"         st.exitQuest(1)      else :         st.set("cond","1")         st.setState(State.STARTED)         st.playSound("ItemSound.quest_accept")   elif event in REWARDS.keys() :       item, amount = REWARDS[event]       st.takeItems(ORC_GOODS,-1)       st.giveItems(item, amount)       st.playSound("ItemSound.quest_finish")       st.exitQuest(1)       return   return htmltext  def onTalk (self,npc,player):   htmltext = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>"   st = player.getQuestState(qn)   if st :     npcId = npc.getNpcId()     id = st.getState()     cond = st.getInt("cond")     if cond == 0 :         htmltext = "32017-01.htm"     elif cond == 1 :         htmltext = "32017-04.htm"     elif cond == 2 :         if st.getQuestItemsCount(ORC_GOODS) >= 120 :             htmltext = "32017-05.htm"         else :             htmltext = "32017-04.htm"   return htmltext  def onKill(self,npc,player,isPet):   partyMember = self.getRandomPartyMember(player,"1")   if not partyMember: return   st = partyMember.getQuestState(qn)   if st :      if st.getState() == State.STARTED :         count = st.getQuestItemsCount(ORC_GOODS)         if st.getInt("cond") == 1 and count < 120 :            chance = DROP_CHANCE * Config.RATE_DROP_QUEST            numItems, chance = divmod(chance,100)            if st.getRandom(100) < chance :                numItems += 1            if numItems :               if count + numItems >= 120 :                  numItems = 120 - count                  st.playSound("ItemSound.quest_middle")                  st.set("cond","2")               else:                  st.playSound("ItemSound.quest_itemget")                  st.giveItems(ORC_GOODS,int(numItems))          return QUEST       = Quest(644, qn, "Grave Robber Annihilation") QUEST.addStartNpc(KARUDA)QUEST.addTalkId(KARUDA)  for i in MOBS :  QUEST.addKillId(i)

Re: How correctly to increase QuestRates?

Posted: Tue Jun 02, 2009 7:22 pm
by Vapulabe
around line 82 :

Code: Select all

          if st.getInt("cond") == 1 and count < 120 :             chance = DROP_CHANCE * Config.RATE_DROP_QUEST
The value is in Config.RATE_DROP_QUEST. When the quest make that config option appear, it means that it's ready for the Quest drop rate... It it don't appear in the quest script, it means that the aquest is not ready yet.

Re: How correctly to increase QuestRates?

Posted: Wed Jun 03, 2009 12:46 pm
by managerlexx
I all have understood thanks))
I do not have more questions)))