various questions (item table and drop calc)
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 45
- Joined: Tue May 10, 2011 4:46 pm
various questions (item table and drop calc)
hello,
i found that one: http://l2jdb.l2jdp.com/ and was thinking about programming the same and using it for my website.
1) but before starting to programm, is that a open source drop calc maybe?! can i get access to it somewhere?
2) if its not for free then maybe can someone tell me where i can find the SQL file where the Item ID is connected with the Item Name? I dont find item names anywhere in the l2j datapack or recipes? where is the recipe table (+ ingredients)?
3) also what is the path for all related images? i mean every item in l2 has a certain picture. where is the pictures library in the l2j server files? i downloaded datapack and server from night life and installed it. but i cant find these images anywhere.
thanks a lot in advance for your replys!
i found that one: http://l2jdb.l2jdp.com/ and was thinking about programming the same and using it for my website.
1) but before starting to programm, is that a open source drop calc maybe?! can i get access to it somewhere?
2) if its not for free then maybe can someone tell me where i can find the SQL file where the Item ID is connected with the Item Name? I dont find item names anywhere in the l2j datapack or recipes? where is the recipe table (+ ingredients)?
3) also what is the path for all related images? i mean every item in l2 has a certain picture. where is the pictures library in the l2j server files? i downloaded datapack and server from night life and installed it. but i cant find these images anywhere.
thanks a lot in advance for your replys!
lineage-realm.com - l2j based drop calculator.
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: various questions (item table and drop calc)
data/stats/items/*.xml:
same for item ID.
That website is made and maintained by some of the l2j devs, I doubt someone will share the code, it's already open for access.
P.S. what makes you think everything is in SQL tables?
Code: Select all
<set name="icon" val="icon.weapon_small_sword_i00" />
That website is made and maintained by some of the l2j devs, I doubt someone will share the code, it's already open for access.
P.S. what makes you think everything is in SQL tables?
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.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
-
- Posts: 45
- Joined: Tue May 10, 2011 4:46 pm
Re: various questions (item table and drop calc)
hi,
thx for the fast reply, nothing made me think everything is in SQL, but i hoped so
i see the reference to the image now, thx but where is the actual image? i mean it must be placed somewhere as a PNG or JPG or somewhere with the name "weapon_small_sword_i00" or? any hint?
to be honest i also need a SQL table which looks like column 1 item ID colum 2 item name column 3 item image path.. any idea how to extract the infos from the xml to a sql file?
thx for the fast reply, nothing made me think everything is in SQL, but i hoped so
i see the reference to the image now, thx but where is the actual image? i mean it must be placed somewhere as a PNG or JPG or somewhere with the name "weapon_small_sword_i00" or? any hint?
to be honest i also need a SQL table which looks like column 1 item ID colum 2 item name column 3 item image path.. any idea how to extract the infos from the xml to a sql file?
lineage-realm.com - l2j based drop calculator.
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: various questions (item table and drop calc)
the images are only in client.
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.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
-
- Posts: 45
- Joined: Tue May 10, 2011 4:46 pm
Re: various questions (item table and drop calc)
i thought that already too, but i couldnt find them.. are they in some texture files or something like that? is there any chance to strip them out? and how about the process to strip the information from the XML file to some PHP array or SQL? any idea?
lineage-realm.com - l2j based drop calculator.
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: various questions (item table and drop calc)
PHP has 3rd-party XML processing libraries, you just have to find them.
You can also parse them to SQL using Java.
You will have to find out how to strip them out of the client using google, nobody here will help you with that (at the very least not publicly).
You can also parse them to SQL using Java.
You will have to find out how to strip them out of the client using google, nobody here will help you with that (at the very least not publicly).
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.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
- Bloodshed
- L2j Veteran
- Posts: 816
- Joined: Mon Jun 23, 2008 9:54 am
- Location: Dorf Town
Re: various questions (item table and drop calc)
Here is a simple id/name/icon xml to sql, this should get you going while you figure out how to do this yourself (for the other stats etc).
You do not have the required permissions to view the files attached to this post.
taking a break;
-
- Posts: 45
- Joined: Tue May 10, 2011 4:46 pm
Re: various questions (item table and drop calc)
oh, that tool also looks really nice and helpful! but unfortunately its not working? whats the requirement to use it? 64bit machine or something?
EDIT: net framework was missing, now i can run it
but its not working for recipes/chars/skills xml.. only works for items.. and even there not all infos are getting stripped. are there more tools like that? also i would prefer some php way to do it.. so i can setup a cronjob to update the DC with the latest infos every night from night release datapack.
shame i need to develop the wheel again from the scratch even if such a nice thing like l2jdb already exists.. is there no chance to contact the developer of that tool? i read the name "warp" but could find any contact details..
btw. i found a source where to get the images already.. i dont need to worry about that anymore i guess..
still i cant find infos on google how to strip infos from l2 client.. would be interesting for fishing, skill descriptions, quest names (start npc, etc..)
EDIT: net framework was missing, now i can run it
but its not working for recipes/chars/skills xml.. only works for items.. and even there not all infos are getting stripped. are there more tools like that? also i would prefer some php way to do it.. so i can setup a cronjob to update the DC with the latest infos every night from night release datapack.
shame i need to develop the wheel again from the scratch even if such a nice thing like l2jdb already exists.. is there no chance to contact the developer of that tool? i read the name "warp" but could find any contact details..
btw. i found a source where to get the images already.. i dont need to worry about that anymore i guess..
still i cant find infos on google how to strip infos from l2 client.. would be interesting for fishing, skill descriptions, quest names (start npc, etc..)
lineage-realm.com - l2j based drop calculator.
-
- Posts: 87
- Joined: Fri Jul 18, 2008 2:27 pm
- Location: Slovakia
Re: various questions (item table and drop calc)
Here is php script what load all xml files (from dir items) and store it to one array, but speed is lower. It read only base tag item and set.
//EDIT
Somebody was faster than me. x)
Code: Select all
<?php echo "<pre>";$dir = "./items";if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if (strpos($file, ".xml") !== false) { //echo "Loaded file $file...\n"; $file = $dir . "/" . $file; $item_list = array(); if (!($fp = fopen($file, "r"))) { echo "Cant open XML file: " . $file; continue; } $data = fread($fp, filesize($file)); fclose($fp); $xml_parser = xml_parser_create(); xml_parse_into_struct($xml_parser, $data, $vals, $index); xml_parser_free($xml_parser); foreach ($vals as $xml_element) { if ($xml_element["tag"] != "ITEM" && $xml_element["tag"] != "SET" && $xml_element["tag"] != "FOR") continue; switch ($xml_element["type"]) { case "open": if ($xml_element["tag"] == "ITEM") { $item["id"] = $xml_element["attributes"]["ID"]; $item["type"] = $xml_element["attributes"]["TYPE"]; $item["name"] = $xml_element["attributes"]["NAME"]; } break; case "complete": if ($xml_element["tag"] == "SET" && array_key_exists("NAME", $xml_element["attributes"]) && $xml_element["level"] == 3) $item[$xml_element["attributes"]["NAME"]] = $xml_element["attributes"]["VAL"]; break; case "close": if ($xml_element["tag"] == "ITEM" && $xml_element["level"] == 2) { $item_list[$item["id"]] = $item; unset($item); } break; } } } } closedir($handle);} /* * Can by used for import to db * $keys = array(); foreach ($item_list as $data) { foreach ($data as $key => $data2) { if (!in_array($key, $keys)) $keys[] = $key; } } // echo $keys; */ //print_r($item_list);echo $item_list[22171]["name"];
Somebody was faster than me. x)
Sorry for my bad english.
-
- Posts: 45
- Joined: Tue May 10, 2011 4:46 pm
Re: various questions (item table and drop calc)
thx mochitto, works slick!!
i edited it a bit to suite my wishes a bit more.(also reads pdef,mdef,patk, etc) in case you need it:
but anyone know where i can find fishing open rates, quest description information etc from client?
mochitto maybe you have a script for the recipe/char/augementation and skills xml?
i edited it a bit to suite my wishes a bit more.(also reads pdef,mdef,patk, etc) in case you need it:
Code: Select all
$dir = "extension/dropcalc/src/items"; if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if (strpos($file, ".xml") !== false) { echo "Loaded file $file...\n"; $file = $dir . "/" . $file; $item_list = array(); if (!($fp = fopen($file, "r"))) { echo "Cant open XML file: " . $file; continue; } $data = fread($fp, filesize($file)); fclose($fp); $xml_parser = xml_parser_create(); xml_parse_into_struct($xml_parser, $data, $vals, $index); xml_parser_free($xml_parser); foreach ($vals as $xml_element) { if ($xml_element["tag"] != "ITEM" && $xml_element["tag"] != "SET" && $xml_element["tag"] != "FOR" && $xml_element["tag"] != "ADD") continue; switch ($xml_element["type"]) { case "open": if ($xml_element["tag"] == "ITEM") { $item["id"] = $xml_element["attributes"]["ID"]; $item["type"] = $xml_element["attributes"]["TYPE"]; $item["name"] = $xml_element["attributes"]["NAME"]; } break; case "complete": if ($xml_element["tag"] == "SET" && array_key_exists("NAME", $xml_element["attributes"]) && $xml_element["level"] == 3) { $item[$xml_element["attributes"]["NAME"]] = $xml_element["attributes"]["VAL"]; } #adds "patk/matk/.." information for weapons if ($xml_element["tag"] == "SET" && array_key_exists("STAT", $xml_element["attributes"]) && $xml_element["level"] == 4) { $item[$xml_element["attributes"]["STAT"]] = $xml_element["attributes"]["VAL"]; } #adds "pdef/mdef/.." information for armor if ($xml_element["tag"] == "ADD" && array_key_exists("STAT", $xml_element["attributes"]) && $xml_element["level"] == 4) { $item[$xml_element["attributes"]["STAT"]] = $xml_element["attributes"]["VAL"]; } break; case "close": if ($xml_element["tag"] == "ITEM" && $xml_element["level"] == 2) { $item_list[$item["id"]] = $item; unset($item); } break; } } foreach ($item_list as $data) { #DB INSERT HERE #var_dump($data); } //print_r($item_list); <----- Thats the result array! (rob) //var_dump(count($item_list)); } } closedir($handle);}else{ echo "Cant open directory!";}
mochitto maybe you have a script for the recipe/char/augementation and skills xml?
lineage-realm.com - l2j based drop calculator.
-
- Posts: 45
- Joined: Tue May 10, 2011 4:46 pm
Re: various questions (item table and drop calc)
nvm i made a script for the recipes as well
hmm .. i now have an automatic update, all necessary tables and images. i guess thats all i need. rest is simply php programming.. thx all who helped me!!! you can close the topic if you want.. very helpful, cheers!
hmm .. i now have an automatic update, all necessary tables and images. i guess thats all i need. rest is simply php programming.. thx all who helped me!!! you can close the topic if you want.. very helpful, cheers!
lineage-realm.com - l2j based drop calculator.
-
- Posts: 45
- Joined: Tue May 10, 2011 4:46 pm
Re: various questions (item table and drop calc)
ahhh, another question. where can i find item descriptions? example: " A sphere containing Reiria's Soul. Take it to Maestro Reorin." (for soul orb) ???
(same question for skill and quest list
(same question for skill and quest list
lineage-realm.com - l2j based drop calculator.
- Bloodshed
- L2j Veteran
- Posts: 816
- Joined: Mon Jun 23, 2008 9:54 am
- Location: Dorf Town
Re: various questions (item table and drop calc)
Same answer as the images, they are stored in the client files.
taking a break;
-
- Posts: 45
- Joined: Tue May 10, 2011 4:46 pm
Re: various questions (item table and drop calc)
shame
any hint how to get them out of the client?
any hint how to get them out of the client?
lineage-realm.com - l2j based drop calculator.
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: various questions (item table and drop calc)
l2encdec
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.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.