lots of questions

Have you created a useful tool? or Do you want to get help building one? This is the right place!
Forum rules
READ NOW: L2j Forums Rules of Conduct
User avatar
Stake
Posts: 383
Joined: Sun Mar 23, 2008 9:33 pm
Location: Hungary
Contact:

Re: lots of questions

Post 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? :mrgreen:

im so greedy :mrgreen: :mrgreen:
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.
Image
Image
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: lots of questions

Post 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).
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
Stake
Posts: 383
Joined: Sun Mar 23, 2008 9:33 pm
Location: Hungary
Contact:

Re: lots of questions

Post 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).
Image
Image
TheDarkKnight
Posts: 45
Joined: Tue May 10, 2011 4:46 pm

Re: lots of questions

Post 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.
lineage-realm.com - l2j based drop calculator.
User avatar
Stake
Posts: 383
Joined: Sun Mar 23, 2008 9:33 pm
Location: Hungary
Contact:

Re: lots of questions

Post 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.
Image
Image
TheDarkKnight
Posts: 45
Joined: Tue May 10, 2011 4:46 pm

Re: lots of questions

Post 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 :(
lineage-realm.com - l2j based drop calculator.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: lots of questions

Post by jurchiks »

You didn't expect this to be easy, did you?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
Stake
Posts: 383
Joined: Sun Mar 23, 2008 9:33 pm
Location: Hungary
Contact:

Re: lots of questions

Post 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. :)
Image
Image
TheDarkKnight
Posts: 45
Joined: Tue May 10, 2011 4:46 pm

Re: lots of questions

Post 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 :D

p.s. jurchiks, smile for me once ;-)
lineage-realm.com - l2j based drop calculator.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: lots of questions

Post by jurchiks »

@Stake - which quest drops have exact drop chances in client?
@TDK - here you go - :)
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
TheDarkKnight
Posts: 45
Joined: Tue May 10, 2011 4:46 pm

Re: lots of questions

Post 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 :P)
lineage-realm.com - l2j based drop calculator.
User avatar
Stake
Posts: 383
Joined: Sun Mar 23, 2008 9:33 pm
Location: Hungary
Contact:

Re: lots of questions

Post 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.
Image
Image
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: lots of questions

Post 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.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
TheDarkKnight
Posts: 45
Joined: Tue May 10, 2011 4:46 pm

Re: lots of questions

Post 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 :-P
lineage-realm.com - l2j based drop calculator.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: lots of questions

Post 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.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Post Reply