Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4]

Author Topic: [UTIL] The LurkerTracker (version updated)  (Read 12297 times)

webadict

  • Bay Watcher
  • Former King of the Mafia
    • View Profile
Re: [UTIL] The LurkerTracker (version updated)
« Reply #45 on: January 22, 2011, 04:50:11 pm »

* Learn a bit about alignments so town/scum could be automatically coloured green/red or something. Difficult for third parties, or nonstandard games.
If you ever get this one to work, we might as well stop playing.
What?
Logged

Pandarsenic

  • Bay Watcher
  • FABULOUS Gunslinger
    • View Profile
Re: [UTIL] The LurkerTracker (version updated)
« Reply #46 on: January 22, 2011, 05:27:47 pm »

He's jesting by implying that Zathras means the LurkerTracker doing that before they die, I would assume.
Logged
KARATE CHOP TO THE SOUL
Your bone is the best Pandar honey. The best.
YOUR BONE IS THE BEST PANDAR
[Cheeetar] Pandar doesn't have issues, he has style.
Fuck off, you fucking fucker-fuck :I

Zathras

  • Bay Watcher
  • Boogie thinks you being confoosed.
    • View Profile
Re: [UTIL] The LurkerTracker (version updated)
« Reply #47 on: January 22, 2011, 07:04:22 pm »

He's jesting by implying that Zathras means the LurkerTracker doing that before they die, I would assume.

Heheh, yeah. Try the new LurkerTracker today! Now with Extra-Clairvoyance! That'd be great. 8-)



About the rest:

Quote from: Person
If they're town, find every time their name is in a line and color it. Then check that line for their role-name and color that. Might get buggy if there's a long line containing many players with a mafia and town player sharing the same role, so consider splitting the morgue into multiple lines with a townie line, mafia line, and a third-party line.
Quote from: Arg
Actually the code doesn't check to see if someone is dead and what role they are; the person using the lurkertracker actually feeds that information in a section of the script that replaces certain names with others, in order for the tracker to handle replacements and who is a mod and such.

I suppose a quick bridge that the user could do for this is to type it in the script as,
Code: [Select]
Dead_Scum => "[color=red]Dead_Scum[/color]: dead, scum"in the Replacements Considered section, and then it would naturally come out as
"Dead_Scum: dead, scum" when the lurkertracker report is posted.

It's just that that particular solution is just more work for the person using the lurkertracker... It's probly viable, but I think Zath wants the lurkertracker to determine for itself who is dead and what role they were and such, which is a much harder task unless of course all moderators agree to use special keywords to indicate this stuff.

Arg is right. You can colour them manually (or do anything you want with the BBCode) right now, when you record their flip. In fact, I did something like that in the last Sorcerer's with the school colours: see here.


What's hard is mostly because I've refrained from creating "fields" with extra information like death or day/night or anything else; right now it just uses substrings in the player's name/flip for its decisions. Painting a colour based on a substring is clunky but doable; starting to treat it like a database-aware thing on the other hand would be a major rewrite, but pretty much a prerequisite for all the other "hard" things.



Quote from: Arg
The last easy goal, and hard goals #1 and #2 would be absolute blessings for the end-user. I would say focus on those first, and then once the LurkerTracker is easy, fun and safe to use, then work on the other goals (mostly because the other goals, especially
(Referring to config files, and real-time fetching)

Yeah, I should. The config files I know how to do, and will eventually be in, I'm just lazy about it and don't like the idea of start adding parameters. I used to like how the script was lean and simple, but that ship sailed a version or two ago, I guess.

About the others, getting the stuff in real time and doing without the preprocessing, I don't even know where to start. Maybe someone who knows more than I will give it a whirl, or I'll get some inspiration one day, but I wouldn't hold my breath.


Logged
My soul has been freed by the King of the Mafia.

Mr.Person

  • Bay Watcher
    • View Profile
Re: [UTIL] The LurkerTracker (version updated)
« Reply #48 on: January 22, 2011, 09:37:18 pm »

What's hard is mostly because I've refrained from creating "fields" with extra information like death or day/night or anything else; right now it just uses substrings in the player's name/flip for its decisions. Painting a colour based on a substring is clunky but doable; starting to treat it like a database-aware thing on the other hand would be a major rewrite, but pretty much a prerequisite for all the other "hard" things.
This might be even more work than it's worth, but you could print the morgue first. Then, depending on what alignment the player has, simply change the player's name from "Example" to {color=red}Example{/color}" (obviously with the braces replaced  with brackets). I honestly haven't checked how you're doing the morgue at all, so if that's completely manually tacked on to the end of each post, then just say so and ignore me.

If you're having trouble with non-players posting and then getting tracked, just have the script check the first page. Anybody with their name in the OP is a player. Anybody not in the OP isn't a player. If there's nobody in the OP at all, just default to the current "everyone's a player" mentality. Would that be hard to do?
Logged
Youtube video of the year, all years.
Hmm...I've never been a big fan of CCGs - I mean, I did and still do collect Pokemon cards, but I never got heavily into the battling and trading thing.

By definition that makes you a fan since you still buy them.

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: [UTIL] The LurkerTracker (version updated)
« Reply #49 on: February 16, 2011, 02:18:20 am »

Code: [Select]
use LWP::Simple;
use strict;

$ARGV[0] =~ /http\:\/\/www\.bay12forums\.com\/smf\/index\.php\?topic=(\d+)\.\d+/; #get the topic ID from the URL
my $topicID = $1;

if($topicID > 0)
{
    my @pages = (0);
    my $contents = get($ARGV[0]); #get the topic HTML from the forum
    while($contents =~ /http\:\/\/www\.bay12forums\.com\/smf\/index\.php\?topic=$topicID\.(\d+)/) #find each URL to a page of the topic
    {
        push(@pages, $1); #store it
        $contents = $'; #search from the remaining text of the page
    }
     my %hash = map { $_, 1 } @pages; #remove duplicates by converting to a hash
    @pages = keys %hash;  #return to an array
    @pages = sort {$a <=> $b} @pages; #sort the array

    for my $page (@pages)
    {
        $contents = get("http://www.bay12forums.com/smf/index.php?topic=70728.$page"); #get the HTML of the page
        #Put code here to do something with the page's HTML.
    }
}

That should, given a topic URL as the only command-line parameter, fetch each page (and do nothing with it).

Spoiler: more code (click to show/hide)
Logged
Eh?
Eh!

Book

  • Bay Watcher
  • The Situation being: you ain't confoosed, yo!
    • View Profile
Re: [UTIL] The LurkerTracker (version updated)
« Reply #50 on: February 16, 2011, 03:43:19 am »

Oh, to get the pages in real time! Great stuff, I'll tinker with it this weekend and see if I can make it work.

Thanks!


(Book is the new Zathras).
Logged
Quote from: Toaster
Daykill Book is the new Vengekill Pandarsenic.
The ability to travel through time and space is insignificant next to the power of flavor.

"G.T.L. baby: Gym, Tanning, Laundry." -- The Situation

webadict is, by far, the coolest person ever. There is no way I could ever be cooler than webadict.

webadict

  • Bay Watcher
  • Former King of the Mafia
    • View Profile
Re: [UTIL] The LurkerTracker (version updated)
« Reply #51 on: February 28, 2011, 08:02:38 pm »

Yo, you mind lurker tracking BYOR?
Logged

Book

  • Bay Watcher
  • The Situation being: you ain't confoosed, yo!
    • View Profile
Re: [UTIL] The LurkerTracker (version updated)
« Reply #52 on: March 01, 2011, 01:09:14 am »

Would be my pleasure; I'll put it up some time tonight.

...which reminds me I need to see about integrating that "get the pages in real time" thing. Looks promising. Hopefully soon.
Logged
Quote from: Toaster
Daykill Book is the new Vengekill Pandarsenic.
The ability to travel through time and space is insignificant next to the power of flavor.

"G.T.L. baby: Gym, Tanning, Laundry." -- The Situation

webadict is, by far, the coolest person ever. There is no way I could ever be cooler than webadict.

Jack A T

  • Bay Watcher
  • Mafia is What Players Make of It
    • View Profile
Re: [UTIL] The LurkerTracker (version updated)
« Reply #53 on: March 18, 2011, 08:23:16 pm »

Hey, Arg, if you happen to read this, mind posting instructions for how to run the LurkerTracker on Windows?
Logged
Quote from: Pandarsenic, BYOR 6.3 deadchat
FUCK YOU JACK
Quote from: Urist Imiknorris, Witches' Coven 2 Elfchat
YOU TRAITOROUS SWINE.
Screw you, Jack.
Pages: 1 2 3 [4]