Announcement

Collapse
No announcement yet.

Parser?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Parser?

    I have seen several ppl mention a parser to track skill ups and combines. I did search on the internet and didn't find many and none that I saw mentioned tradeskills. Most seem to calculate Damage per second. I was wondering which one do people here use?
    All Innoruuk does is watch us and kill us when we get boring. We must never, ever be boring.

  • #2
    I use this AWK script (kinda like Perl) that parse the log file.

    BEGIN {SUCCESS = 0;
    FAILURE = 0;
    TRADEEVENTIDX = 0;
    TRADEEVENTCOUNT = 0;
    }

    {
    if ($0 ~ /You have fashioned the items together to create something new/) {TRADEEVENT[++TRADEEVENTIDX] = "S"};
    if ($0 ~ /You lacked the skills to fashion the items together/) {TRADEEVENT[++TRADEEVENTIDX] = "F"};
    if ($0 ~ /You have become better at/) {SkillStart = index($0, "(");
    SkillEnd = index($0, ")");
    TRADEEVENTIDX++;
    TRADEEVENT[TRADEEVENTIDX] = "U";
    SKILLUP[TRADEEVENTIDX] = substr($0, SkillStart + 1, SkillEnd - SkillStart - 1);
    };
    }

    END {TRADEEVENTCOUNT = TRADEEVENTIDX;
    for (TRADEEVENTIDX = 1; TRADEEVENTIDX <= TRADEEVENTCOUNT; TRADEEVENTIDX++) {
    if (TRADEEVENT[TRADEEVENTIDX] == "S") {SUCCESS++;};
    if (TRADEEVENT[TRADEEVENTIDX] == "F") {FAILURE++;};
    if (TRADEEVENT[TRADEEVENTIDX] == "U") {NEWSKILL = SKILLUP[TRADEEVENTIDX];
    TRADEEVENTIDX++;
    if (TRADEEVENT[TRADEEVENTIDX] == "S") {SUCCESS++;};
    if (TRADEEVENT[TRADEEVENTIDX] == "F") {FAILURE++;};
    printf "%4s, %3s, %3s, %3s\n", NEWSKILL, FAILURE, SUCCESS, FAILURE + SUCCESS;
    SUCCESS = 0;
    FAILURE = 0;
    };
    };
    }


    Crude but works ok. But you'd need to clean up the log if you did other combines in between.

    [edit] here is the downloadable, its a text file: www.geocities.com/hibashirasakai/parse.txt
    Dark Elf Sage. Celestial Rising . Xev

    Comment

    Working...
    X