Parsing text to actuals

Donavin69

Member
I'm trying to write a script to parse the DC information (even someone other than mine) into actual data...I'm sure someone has done something like this...but I'm having trouble turning the numbers in the DC into numbers...I can find the item, but not the quantity of that item...

Any suggestions?
 
What are you trying to do? Does display_amount() eliminate your problem? You might look at DCQuest. If you are interested in someone else's Display Case you might also want to check JickenWings. DQuest has some code zarqon gave me/allowed me to use that queries and parses some things at JickenWings. It should be a good place to start if you are interested in other things from there as well, such as the contents of someone else's case or who has what.
 
This hasn't been debugged, but could be a good start:

PHP:
void parse_display(string playerid) {
    int [item] stuff;
    string display = visit_url("displaycollection.php?who=" + playerid + "&pwd");
    matcher m = create_matcher(
            "<tr><td[^>]+?><img[^>]+?></td><td[^>]+?><b>(.+?)</b>\\s*?\\((\\d+?)\\)</td></tr>",
            display);
    while (m.find()) {
        stuff[m.group(1)] = m.group(2).to_int();
    }
}
 
That looks to be a good start, I started testing it then roll hit me...since JickenWings isn't updating correctly I can't reliably use it...

Thanks!
 
Back
Top