Uncle Hobo loot info thread

w0rm

New member
Not entirely sure where to put this, but this seems as good a place as any...

So, like many clans, mine is currently crashing through Elf Alley on a regular basis, and it got increasingly hard to keep track of who'd had what and who should be in line for new loot. So I cobbled together the attached script. It's one of the least elegant bits of coding I've ever done, I'm afraid, but it works well enough for us, and I thought I'd share it in case it's helpful to anyone else.

What it does is to go through the current dungeon log, and all past logs, to record (a) the number of Hobo Elfs each person's killed and (b) how many pieces of suit loot and non-suit loot they've had. (I didn't bother to distinguish individual items in the report since they're zappable.) It prints to Mafia's CLI window a list of everyone who's killed hobos, how many suit and non-suit things they've had, and also the average number of Hobo Elfs they've killed per piece of loot they've received. (This is because we're looking long term, not just per run, at who deserves things.) This list can be copied and pasted if you want to share it in a clan forum or something.

It doesn't factor in Uncle Hobo kills, sewer turns, grates/valves/etc, and totally ignores all the other areas of Hobopolis. It will check every Hobopolis run log your clan has done, but won't parse them at all if they don't contain Hobo Elf kills.

I plan to add some stuff about recommending who gets what based on the latest complete run info, but time's passing and I may not get around to that, so thought I'd just share what I've got.

w0rm

View attachment Crimbo Raid logger.ash
 

Winterbay

Active member
That looks like it could be something I could use in deciding who gets the next piece of gear. Thanks.
 

StDoodle

Minion
For a clan that's done quite a few runs, I'd recommend not parsing everything all at once... it takes quite a while.

My script elsewhere works similarly, for what it's worth, and will soon be updated. It counts sewer turns, however, as that's HCN's policy. But it wouldn't be difficult to change that.

But kudos on the script, since I know firsthand what a PITA that much text-parsing can be. ;)
 

mredge73

Member
I tried it but it locked up on me, I haven't looked at it hard enough to find the problem.
It found all of the parts that were distributed but looks like it locked up when counting elf kills.
 

Winterbay

Active member
Then, are you sure it locked up and not just calculated. It takes quite a while from the first parsing to the output even with 20 logs and I can see that 80 logs would make it take even longer.
 

w0rm

New member
Glad to see this has been some use - and thanks for the feedback. Yes, I take your point about the time it takes. I've amended the checking routines in this version so that it'll only parse logs from Dec 2010. It's still going to take a while to churn through it all if you've been busy, but at least it won't grind through all the URLs for the last two years.

And yup, did think about the sewer logs, but my clan agreed we weren't counting those. Sorry!

I've left some of my "print" diagnostic lines in there, but //'ed out; if it really is locking up, maybe it'd be worth reinstating some of those to debug it. I haven't had that problem I'm afraid, so I don't think I can check it myself.

BTW, mredge, thanks for sharing your clan scripts; they've been a huge help in working out how to put this stuff (and other things I've been working on) together.

View attachment Crimbo Raid logger v2.ash
 
Last edited:

kain

Member
This is freaking fantastic. My only gripe is that if a player changed the capitalization of their name, it counts that person as a new person. Kain is different from kAIn ... Maybe we could (somehow, I don't really comprehend exactly what the code is doing) just lowercase all the names?

And, lastly, even if a player had full loot, I still wanted to see how many pieces they got and how many elves they killed, so I removed the else statement after the "Completed the Set" at the bottom of the script.

Code:
Kain has COMPLETED THE SET.
Kain defeated 5388 Hobelfs, has 4 suit pieces and 5 non-suit pieces.
Kain's average Hobo Elfs per loot is 598
 
Last edited:

kain

Member
ashref is really helpful for finding functions like that. Just add to_lower_case() every place you need to normalize player names.

Oh yeah, I know all about ashref and to_lower_case() ... it's just that I don't know exactly where they would go in this particular script. Editing this script is above my current ability level.
 

Bale

Minion
Now I feel like a jerk. I'll try to be helpful this time.

I think your answer is lines 14 and 53. Run the substring value through to_lower_case() and you should be gold.

PHP:
name = to_lower_case ( substring ( logRecord, begin, end) );
name = to_lower_case ( substring ( logRecord, begin, begin + end) );
 

Bale

Minion
No need to be scared of records. That script has no records. Despite the name of the variable, logRecord is not a record. ;)
 
Top