Information on query.php
Post Reply
- Print view
6 posts •Page 1 of 1
- xCROv
- Posts: 5
- Joined:Fri Feb 22, 2019 9:58 pm
Information on query.php
- Quote
Post by xCROv » Fri Feb 22, 2019 10:21 pm
Is there a way that query.php can retrieve item information? Like if I had a specific item ID I could get the AP and DP of the item?
Something like would return the json data:
Code: Select all
"0": { "enchant_chance": "100.00", "damage": "18 ~ 22", "defense": 0, "accuracy": "10", "evasion": 0, "dreduction": 0, "need_enchant_item_id": "0", "durability": "100 / 100", "enchant_item_counter": 1, "edescription": "Item Effect<br><span style=\"color: #e9bd23\"> Extra Damage to All Species +10</span><br><span style=\"color: #e9bd23\"> Casting Speed +3 Level</span><br><br>- Enhancement Effect<br><span style=\"color: #e9bd23\">Extra AP against monsters up (enhancement level PRI or up)</span><br><span style=\"color: #e9bd23\"> Extra Damage to All Species Up</span><br><span style=\"color: #e9bd23\"> All AP Up</span><br><span style=\"color: #e9bd23\"> All Accuracy Up</span><br>" },
This would help a ton on a project I am working on to bring the bdcodex to discord VIA a bot. The biggest problem I have with scraping information off the website is that most of it is in td tags that don't allow you to get information easily. This wouldn't be a problem if the data was consistent but some skills/items/npc's lack information that others have.
Example:
- Has cooldowns listed.
- Doesn't have cooldowns listed.
This makes even trying to read the tables a consistency issue. Would be great if there was a solution to this where data was always output in a similar manner. Say if the cooldown was 0 it would could still be represented by "Cooldown: 0."
- Site Admin
- Posts: 507
- Joined:Wed Sep 11, 2013 10:30 am
- Discord:Kiriak#5590
Re: Information on query.php
- Quote
Post by Kiriak » Sat Feb 23, 2019 8:22 am
Unfortunately, currently there is no such API, which would allow you to get the data in such form. And to reduce the size of the page, unneeded data such as zero cooldowns is not included there.
However, you can still use the tip.php script to get the data by ID. For example: will give you contents of the popup tooltip for this item.
If you will omit the "&nf=on" parameter, you'll get a bit more html markup, but for the enhanceable items there will be a json array of the item's parameters.
That's as best as you can get at the moment.
Top
- xCROv
- Posts: 5
- Joined:Fri Feb 22, 2019 9:58 pm
Re: Information on query.php
- Quote
Post by xCROv » Sat Feb 23, 2019 3:02 pm
Yeah. I was pulling information off the top and main page. I guess I will put things other than armor and weapons on hold until we have a system for this information. Thank you.
- xCROv
- Posts: 5
- Joined:Fri Feb 22, 2019 9:58 pm
Re: Information on query.php
- Quote
Post by xCROv » Sun Feb 24, 2019 6:29 am
Welp... I made good progress but I feel like I am going to probably call it quits on developing to support much more than items/armor and some skills. Currently there are to many variables that seem to change per ID page that make it hard to work with until an official method for getting the information is available. I would love to know if something like that ever comes up. I don't think it would be much different then what query.php is currently offering.
--
Top
- Site Admin
- Posts: 507
- Joined:Wed Sep 11, 2013 10:30 am
- Discord:Kiriak#5590
Re: Information on query.php
- Quote
Post by Kiriak » Sun Feb 24, 2019 11:13 am
Looks good actually. As for the official API, let's discuss it again in the discord.
Top
- xCROv
- Posts: 5
- Joined:Fri Feb 22, 2019 9:58 pm
Re: Information on query.php
- Quote
Post by xCROv » Sun Feb 24, 2019 7:34 pm
Kiriak wrote: ↑
Sun Feb 24, 2019 11:13 am
Looks good actually. As for the official API, let's discuss it again in the discord.
That sounds great. Feel free to message me when ever you're on.
Top
Post Reply
- Print view
6 posts •Page 1 of 1
Return to “Database development”
Jump to
- International Section
- ↳ Database development
- ↳ Bug reports
- ↳ Guilds and Clans
- ↳ Game related questions
- Русский раздел (Russian only section)
- ↳ Разработка сайта
- ↳ Сообщения об ошибках
- ↳ Любые вопросы по игре
- ↳ Гильдии и кланы