Page 2 of 3
Re: lots of questions
Posted: Sat Jun 18, 2011 1:30 pm
by Stake
TheDarkKnight wrote:yeah gogo! do it do it xD i need it too xDDD
stake, are you able to provide me such a thing as .sql file?
im so greedy

It would not be a simple sql file. The whole quest system should be rewritten. You could expect something like this in another project, not in l2j.
Re: lots of questions
Posted: Sat Jun 18, 2011 2:09 pm
by jurchiks
Only because l2j would probably not support it. I thought of it when I wrote that comment too and it wouldn't actually be that hard - have a droplist, specify for each item the npcId, questId and quest cond/step on which the item should drop. BUT there would probably be some exceptions - quests that drop different items based on something other than cond.
In the end, it wouldn't be reasonable to change it to SQL just because someone wants to list all quest drops, it could possibly be done in other ways too (generating from core when loading quests).
Re: lots of questions
Posted: Sat Jun 18, 2011 2:19 pm
by Stake
jurchiks wrote:Only because l2j would probably not support it. I thought of it when I wrote that comment too and it wouldn't actually be that hard - have a droplist, specify for each item the npcId, questId and quest cond/step on which the item should drop. BUT there would probably be some exceptions - quests that drop different items based on something other than cond.
In the end, it wouldn't be reasonable to change it to SQL just because someone wants to list all quest drops, it could possibly be done in other ways too (generating from core when loading quests).
Most of the npc's in quests have no special conditions for drops. They drop on death at the give quest progress. However I thought of categorize drops that are present in the normal droplist as well. So, the conditions would be coded in script, and the trigger would be something like this: void dropQuestItem(int category).
Re: lots of questions
Posted: Sat Jun 18, 2011 2:29 pm
by TheDarkKnight
anyway, back to topic.
so if no one can help me with that sql file, can someone at least give me some hints where that script is located and called which actually reads the npc quest drops?
thanks.
Re: lots of questions
Posted: Sat Jun 18, 2011 2:37 pm
by Stake
TheDarkKnight wrote:anyway, back to topic.
so if no one can help me with that sql file, can someone at least give me some hints where that script is located and called which actually reads the npc quest drops?
thanks.
In data/scripts/quests/<questid>_<questname>/__init__.py, or some quests may be in Java, so you may look for java files in that folder. In the script drops are often at a method called "onKill", you can see addItem and such things there. Item id's are defined constants at the header of the script.
Re: lots of questions
Posted: Sat Jun 18, 2011 2:40 pm
by TheDarkKnight
thank you stake, i will have a look at it
edit: shit, no way that i can read that out with a php script

the structure is totally different in every file

Re: lots of questions
Posted: Sun Jun 19, 2011 10:09 am
by jurchiks
You didn't expect this to be easy, did you?
Re: lots of questions
Posted: Sun Jun 19, 2011 10:58 am
by Stake
TheDarkKnight wrote:thank you stake, i will have a look at it
edit: shit, no way that i can read that out with a php script

the structure is totally different in every file

Well, you can get those infos from the client, but I will not help you in this in public.

Re: lots of questions
Posted: Sun Jun 19, 2011 11:13 am
by TheDarkKnight
well, i expect its same as "easy" as reading the xml files from l2j.. but it isnt xD
i need to think a bit more, if its worth the effort
p.s. jurchiks, smile for me once

Re: lots of questions
Posted: Sun Jun 19, 2011 1:12 pm
by jurchiks
@Stake - which quest drops have exact drop chances in client?
@TDK - here you go -

Re: lots of questions
Posted: Sun Jun 19, 2011 1:24 pm
by TheDarkKnight
thanks
just btw, i dont need the exact drop chances of the questitem, i need only which mob drops which item. (ofc the chance would be even better but its not required

)
Re: lots of questions
Posted: Sun Jun 19, 2011 2:39 pm
by Stake
jurchiks wrote:@Stake - which quest drops have exact drop chances in client?
@TDK - here you go -

Ofc, I did not mean for the drop chances, only items.
Re: lots of questions
Posted: Sun Jun 19, 2011 2:56 pm
by jurchiks
Well then obviously Stake could help you with that privately, if he wants.
L2J scripts are not even remotely 100% accurate so client would probably be more accurate IF it actually contains ALL quest item drop info.
Re: lots of questions
Posted: Mon Jun 20, 2011 12:55 pm
by TheDarkKnight
thedarkknight wrote:3) this will be a a bit more complex im afraid. i wanted to make user able to enter their specific server rates as well, but im not sure if i understood the logic proper. i mean lets say we have a drop with a chance of 50% (on server 1x default) what happends when the drop rate is 4x? it would be 200%.. does that mean it drops 100% and the amount is 2x then? because its 2x 100% ? is there any formula?
for exp/sp i guess its easy.. just default value * serverrate X.
jurchiks wrote:3) just find where the drops are calculated in core... first try searching for something like "FROM droplist WHERE", i.e. the sql query that reads the drops from the database. Then just follow the trail.
=> 0 matches. i am not able to follow the trail like that

Re: lots of questions
Posted: Mon Jun 20, 2011 8:41 pm
by jurchiks
ok, try searching just for 'droplist', case-sensitive, and look for any SQL queries or smth that might mean a table name.
Or you could try following some droplist configs like drop rate.