Secret Playerlist - ENDGAME

FINAL FOOT

Poll ended at Sun Jan 01, 2023 8:00 pm

DeeZees
0
No votes
DrWilgy
0
No votes
Inawordyes
0
No votes
Neon
1
13%
Porscha
0
No votes
THE FOOT KICKS ALL
7
88%
 
Total votes: 8
User avatar
Guillotine
Racketeer
Posts in topic: 200
Posts: 4618
Joined: Thu Dec 31, 2020 8:24 pm
Location: Las Vegas
Gender: Male
Preferred Pronouns: He/him/his/himself
Aka: King of Bastard Games
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2604

Post by Guillotine »

Hmmm [VOTE: Chelsea] aubergine
Spoiler: show
Awards
Image

Played
Image Image Image Image Image Image

Hosted
Image

Quotes
Spacedaisy wrote: Mon Feb 21, 2022 12:05 am My interaction with Guillo was pocketed town talking to a wolf who had her fooled.
User avatar
risiinq-
Corrupt Union Official
Posts in topic: 45
Posts: 814
Joined: Tue Aug 23, 2022 9:42 pm
Preferred Pronouns: she/her
Aka: snow

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2605

Post by risiinq- »

oh geez dizzy voted me too at one point
User avatar
Sabiplz
<3
Posts in topic: 243
Posts: 4641
Joined: Tue Jul 12, 2022 10:13 pm
Location: Chicago, IL
Gender: Nonbinary
Preferred Pronouns: They them
Aka: Kuti
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2606

Post by Sabiplz »

Rip to those that phone post
User avatar
c4e5g3d5
Drug Dealer
Posts in topic: 88
Posts: 1314
Joined: Mon Feb 01, 2021 10:03 pm

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2607

Post by c4e5g3d5 »

risiinq- wrote: Sun Dec 04, 2022 7:46 pm is it eod?

why are we hanging aro?
nut pushed him

He isn't towny to me ig
Spoiler: show
Image
Image
Progression cases are bad.
User avatar
Lumi
Corrupt Union Official
Posts in topic: 259
Posts: 626
Joined: Fri Feb 11, 2022 10:08 pm
Preferred Pronouns: she/her/they/them
Aka: Luminous

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2608

Post by Lumi »

Not Voting (12): MacDougall (26), NANOOKTHEGREATANDFEARSOME (13), Lilypetal (15), SilverKeith (44), Inawordyes (11), Michelle (42), JaggedJimmyJay (30), risiinq- (38), sabie12 (2), Fext (5), Porscha (47), DrWilgy (15)
chelsea (6): Golden (47), Scotty (37), Guillotine (146), ilario (38), Neon (69), ~Prince J~ (18)
arogame (3): nutella (120), Creature (69), tutuu (25)
c4e5g3d5 (1): Marmot (74)
unvote (3): iaafr (132), WindwardAway (101), arogame123 (61)
lily (1): falcon45ca (17)
trans rights (1): katze (87)
golden (5): EnderWiggin (100), Dyslexicon (54), DeeZees (19), lucy (19), Vivax (18)
master radishes (2): Sloonei (24), sprityo (18)
c4e5g3d5 (1): c4e5g3d5 (77)
jaggedjimmyjay (1): Jackofhearts2005 (62)
jackofhearts2005 (1): Schiavetto (17)
scotty (1): Hally (116)
guillotine (1): santygrass (29)
golden (1): RondoDimBuckle (119)
manny (1): Manny (165)
whomever owns this hellsite (1): hollowkatt (63)
sloonei (2): Ricochet (5), pyxxy (7)
macdougal (1): Seanzie (5)
test (1): Lumi (32)
risiinq~ (1): Ranmilia (31)
arogame (1): Sabiplz (237)
golden the coward (1): G-Man (17)
iaafr (1): Chelsea (11)
michelle (1): TonyStarkPrime (31)
User avatar
Creature
Made Man
Posts in topic: 124
Posts: 7965
Joined: Mon May 13, 2019 5:51 pm

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2609

Post by Creature »

risiinq- wrote: Sun Dec 04, 2022 7:46 pm is it eod?

why are we hanging aro?
I guess there was a decent wolfcase on arogame123 and that may be the only decent wolfcase in the game
User avatar
Creature
Made Man
Posts in topic: 124
Posts: 7965
Joined: Mon May 13, 2019 5:51 pm

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2610

Post by Creature »

Sabiplz wrote: Sun Dec 04, 2022 7:46 pm
Creature wrote: Sun Dec 04, 2022 7:45 pm Ok idk where to go

I'm mostly trusting nutella on arogame123
Aren't you still voting Chelsea
I'm on arogame123 afair
User avatar
Sabiplz
<3
Posts in topic: 243
Posts: 4641
Joined: Tue Jul 12, 2022 10:13 pm
Location: Chicago, IL
Gender: Nonbinary
Preferred Pronouns: They them
Aka: Kuti
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2611

Post by Sabiplz »

@Lumi why is my vote not counting
User avatar
katze
:joy_cat:
Posts in topic: 205
Posts: 298
Joined: Sun Apr 18, 2021 5:06 pm
Gender: nope
Preferred Pronouns: any
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2612

Post by katze »

i am like 100% confident that [REDACTED] is a wolf/wolfsiding npc and they have been voted like 0 times all game

wild, y'all need to git gud

uwu
😹
User avatar
risiinq-
Corrupt Union Official
Posts in topic: 45
Posts: 814
Joined: Tue Aug 23, 2022 9:42 pm
Preferred Pronouns: she/her
Aka: snow

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2613

Post by risiinq- »

imo when i was on aro was decently towny but like w/e
User avatar
c4e5g3d5
Drug Dealer
Posts in topic: 88
Posts: 1314
Joined: Mon Feb 01, 2021 10:03 pm

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2614

Post by c4e5g3d5 »

Lumi wrote: Sun Dec 04, 2022 7:47 pm Not Voting (12): MacDougall (26), NANOOKTHEGREATANDFEARSOME (13), Lilypetal (15), SilverKeith (44), Inawordyes (11), Michelle (42), JaggedJimmyJay (30), risiinq- (38), sabie12 (2), Fext (5), Porscha (47), DrWilgy (15)
chelsea (6): Golden (47), Scotty (37), Guillotine (146), ilario (38), Neon (69), ~Prince J~ (18)
arogame (3): nutella (120), Creature (69), tutuu (25)
c4e5g3d5 (1): Marmot (74)
unvote (3): iaafr (132), WindwardAway (101), arogame123 (61)
lily (1): falcon45ca (17)
trans rights (1): katze (87)
golden (5): EnderWiggin (100), Dyslexicon (54), DeeZees (19), lucy (19), Vivax (18)
master radishes (2): Sloonei (24), sprityo (18)
c4e5g3d5 (1): c4e5g3d5 (77)
jaggedjimmyjay (1): Jackofhearts2005 (62)
jackofhearts2005 (1): Schiavetto (17)
scotty (1): Hally (116)
guillotine (1): santygrass (29)
golden (1): RondoDimBuckle (119)
manny (1): Manny (165)
whomever owns this hellsite (1): hollowkatt (63)
sloonei (2): Ricochet (5), pyxxy (7)
macdougal (1): Seanzie (5)
test (1): Lumi (32)
risiinq~ (1): Ranmilia (31)
arogame (1): Sabiplz (237)
golden the coward (1): G-Man (17)
iaafr (1): Chelsea (11)
michelle (1): TonyStarkPrime (31)
Lol why do I have two wagons
Spoiler: show
Image
Image
Progression cases are bad.
User avatar
Guillotine
Racketeer
Posts in topic: 200
Posts: 4618
Joined: Thu Dec 31, 2020 8:24 pm
Location: Las Vegas
Gender: Male
Preferred Pronouns: He/him/his/himself
Aka: King of Bastard Games
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2615

Post by Guillotine »

Sorry Chelsea, i townread yiu but you gotta go, you can become dangerous later
Spoiler: show
Awards
Image

Played
Image Image Image Image Image Image

Hosted
Image

Quotes
Spacedaisy wrote: Mon Feb 21, 2022 12:05 am My interaction with Guillo was pocketed town talking to a wolf who had her fooled.
User avatar
Creature
Made Man
Posts in topic: 124
Posts: 7965
Joined: Mon May 13, 2019 5:51 pm

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2616

Post by Creature »

Lumi wrote: Sun Dec 04, 2022 7:47 pm Not Voting (12): MacDougall (26), NANOOKTHEGREATANDFEARSOME (13), Lilypetal (15), SilverKeith (44), Inawordyes (11), Michelle (42), JaggedJimmyJay (30), risiinq- (38), sabie12 (2), Fext (5), Porscha (47), DrWilgy (15)
chelsea (6): Golden (47), Scotty (37), Guillotine (146), ilario (38), Neon (69), ~Prince J~ (18)
arogame (3): nutella (120), Creature (69), tutuu (25)
c4e5g3d5 (1): Marmot (74)
unvote (3): iaafr (132), WindwardAway (101), arogame123 (61)
lily (1): falcon45ca (17)
trans rights (1): katze (87)
golden (5): EnderWiggin (100), Dyslexicon (54), DeeZees (19), lucy (19), Vivax (18)
master radishes (2): Sloonei (24), sprityo (18)
c4e5g3d5 (1): c4e5g3d5 (77)
jaggedjimmyjay (1): Jackofhearts2005 (62)
jackofhearts2005 (1): Schiavetto (17)
scotty (1): Hally (116)
guillotine (1): santygrass (29)
golden (1): RondoDimBuckle (119)
manny (1): Manny (165)
whomever owns this hellsite (1): hollowkatt (63)
sloonei (2): Ricochet (5), pyxxy (7)
macdougal (1): Seanzie (5)
test (1): Lumi (32)
risiinq~ (1): Ranmilia (31)
arogame (1): Sabiplz (237)
golden the coward (1): G-Man (17)
iaafr (1): Chelsea (11)
michelle (1): TonyStarkPrime (31)
arogame has four votes but the wagon is split in two with 3 and 1 votes
User avatar
Sabiplz
<3
Posts in topic: 243
Posts: 4641
Joined: Tue Jul 12, 2022 10:13 pm
Location: Chicago, IL
Gender: Nonbinary
Preferred Pronouns: They them
Aka: Kuti
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2617

Post by Sabiplz »

240'ed and doubled the post cap.

Gn

Gl

💕

Mommy. Loves. You.
User avatar
katze
:joy_cat:
Posts in topic: 205
Posts: 298
Joined: Sun Apr 18, 2021 5:06 pm
Gender: nope
Preferred Pronouns: any
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2618

Post by katze »

Sabiplz wrote: Sun Dec 04, 2022 7:49 pm 240'ed and doubled the post cap.

Gn

Gl

💕

Mommy. Loves. You.
i dont love any of u lol
😹
User avatar
Creature
Made Man
Posts in topic: 124
Posts: 7965
Joined: Mon May 13, 2019 5:51 pm

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2619

Post by Creature »

Sabiplz wrote: Sun Dec 04, 2022 7:48 pm @Lumi why is my vote not counting
Maybe because you're prob dying this EOD
User avatar
Lumi
Corrupt Union Official
Posts in topic: 259
Posts: 626
Joined: Fri Feb 11, 2022 10:08 pm
Preferred Pronouns: she/her/they/them
Aka: Luminous

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2620

Post by Lumi »

Sabiplz wrote: Sun Dec 04, 2022 7:48 pm @Lumi why is my vote not counting
Good question, it's probably something dumb like you included a space or newline and they didn't :joy_cat:
User avatar
Guillotine
Racketeer
Posts in topic: 200
Posts: 4618
Joined: Thu Dec 31, 2020 8:24 pm
Location: Las Vegas
Gender: Male
Preferred Pronouns: He/him/his/himself
Aka: King of Bastard Games
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2621

Post by Guillotine »

Nutella is a player if she didnt post cap lol
Spoiler: show
Awards
Image

Played
Image Image Image Image Image Image

Hosted
Image

Quotes
Spacedaisy wrote: Mon Feb 21, 2022 12:05 am My interaction with Guillo was pocketed town talking to a wolf who had her fooled.
User avatar
Lumi
Corrupt Union Official
Posts in topic: 259
Posts: 626
Joined: Fri Feb 11, 2022 10:08 pm
Preferred Pronouns: she/her/they/them
Aka: Luminous

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2622

Post by Lumi »

Ya @Sabiplz
You have a leading space in your vote.
User avatar
Creature
Made Man
Posts in topic: 124
Posts: 7965
Joined: Mon May 13, 2019 5:51 pm

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2623

Post by Creature »

Guillotine wrote: Sun Dec 04, 2022 7:50 pm Nutella is a player if she didnt post cap lol
Rondo might very well be a player here tbh
tutuu
Capo Regime (Street Boss)
Posts in topic: 94
Posts: 12784
Joined: Wed Jun 17, 2020 3:38 pm

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2624

Post by tutuu »

Lumi wrote: Sun Dec 04, 2022 7:46 pm
Spoiler: show

Code: Select all

// ==UserScript==
// @name         Secret Playerlist Vote Counter
// @namespace    mailto:luminouslag@gmail.com
// @version      1.0
// @description  Automatic Vote Counting for Secret Plyerlist Mafia game on The Syndicate
// @author       Lumi
// @match        https://mafiathesyndicate.com/viewtopic.php?*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=mafiathesyndicate.com
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_setClipboard
// ==/UserScript==

console.log('Script Initialized');

async function getDocument(thread, start) {
  return await window.fetch(`https://mafiathesyndicate.com/viewtopic.php?t=${thread}&start=${start}`).then(r => r.text()).then(html => (new DOMParser()).parseFromString(html, 'text/html'));
}

function getDataFromPost(post) {
  let postNum = post.getElementsByClassName('post-number')[0].textContent.match(/[0-9]+/g)[0];
  let contentChildren = post.getElementsByClassName('content')[0].children;
  let author = post.getElementsByClassName('author')[1].getElementsByTagName('a')[1].textContent;
  let currentVoteTarget = null;
  for (const contentChild of contentChildren) {
    if (contentChild.classList.contains('mention')) {
      let voteTarget = contentChild.textContent.replaceAll('\n','').matchAll(/\[VOTE: ([^\]]*)\]/g).next().value;
      if (voteTarget) currentVoteTarget = voteTarget[1];
    }
  }
  return {
    number: postNum,
    target: currentVoteTarget,
    author: author,
  };
}

function isCorrectThread(targetNum) {
  let topicNum = document.getElementsByClassName("topic-title")[0].children[0].href.matchAll(/\?t=([0-9]+)&/g).next().value[1];
  return topicNum == targetNum;
};

function getNumPosts() {
  return parseInt(document.getElementsByClassName('pagination')[0].textContent.matchAll(/([0-9]*) posts/g).next().value[1]);
};

function getFirstPostNumOfThisPage() {
  return parseInt(document.getElementsByClassName('post')[0].getElementsByClassName('post-number')[0].textContent.match(/[0-9]+/g)[0]);
}

function tallyPage(voteHistory, page) {
  let posts = page.getElementsByClassName('post');
  for (const post of posts) {
    let postData = getDataFromPost(post);
    if (parseInt(postData.number) == voteHistory.length + 1) {
      voteHistory.push(postData);
    }
  }
  return voteHistory;
}

function handleKeyUp(e) {
    let isNum = (e.keyCode >= 48 && e.keyCode <= 57);
    let isV = (e.keyCode == 86);
    let isR = (e.keyCode == 82);
    let isX = (e.keyCode == 88);
    if (isV && e.altKey) {
      let currentDay = 1;
      for(let i=1; i<=10; i++) {
        if (GM_getValue(`EoD${i}`, 0) != 0) currentDay++;
      }
      let voteCount = calcVoteCount(currentDay);
      GM_setClipboard(voteCount);
    } else if (isR && e.altKey) {
      let day = parseInt(prompt('Enter Day Number'));
      let voteCount = calcVoteCount(day);
      GM_setClipboard(voteCount);
    } else if ( isNum && e.altKey) {
      let num = parseInt(e.key);
      if (num == 0) num = 10;
      let postNum = prompt(`Enter Post Number for EoD ${num}`)
      GM_setValue(`EoD${num}`, parseInt(postNum));
    } else if ( isX && e.altKey) {
      window.location.href = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
    }
};

function calcVoteCount(day) {
  let SoD = GM_getValue(`EoD${day-1}`, 0);
  let EoD = GM_getValue(`EoD${day}`, 0);
  voteHistory = JSON.parse(GM_getValue(`voteHistory`), '[]');

  let voteTargets = {};
  let postCounts = {};

  for (const vote of voteHistory) {
    if ((vote.number >= SoD || SoD == 0) && (vote.number <= EoD || EoD == 0)) {
      if (!(vote.author in voteTargets)) {
        voteTargets[vote.author] = null;
        postCounts[vote.author] = 1;
      } else {
        postCounts[vote.author] += 1;
      }
      if (vote.target != null) voteTargets[vote.author] = [vote.target, vote.number];
    }
  }

  let voteCount = {};
  
  for (const [key, value] of Object.entries(voteTargets) ) {
    if (value != null) {
      let target = value[0].toLowerCase();
      if (target in voteCount) {
        voteCount[target].push([key, value[1], postCounts[key]]);
      } else {
        voteCount[target] = [[key, value[1], postCounts[key]]];
      }
    } else {
      if ('Not Voting' in voteCount) {
        voteCount['Not Voting'].push([key, null, postCounts[key]]);
      } else {
        voteCount['Not Voting'] = [[key, null, postCounts[key]]];
      }
    }
  }

  return voteCountToString(voteCount);
}

function voteToString(vote) {
  if (vote[1] == null) return `${vote[0]} (${vote[2]})`
  return `[url=https://mafiathesyndicate.com/viewtopic.php?t=2451&start=${vote[1]-1}]${vote[0]}[/url] (${vote[2]})`
}

function voteCountToString(voteCount) {
  let output = '';
  for (const [key, value] of Object.entries(voteCount)) {
    let valueStrings = [];
    for (const vote of value) {
      valueStrings.push(voteToString(vote));
    }
    output += `${key} (${value.length}): ${valueStrings.join(', ')}\n`
  }
  return output;
}

if (isCorrectThread(2451)) {
  let voteHistory = JSON.parse(GM_getValue(`voteHistory`, '[]'));
  let numPosts = getNumPosts();
  let curVoteHistoryLength = voteHistory.length;
  while (voteHistory.length < numPosts) {
    let page = await getDocument(2451, voteHistory.length);
    voteHistory = tallyPage(voteHistory, page);
    if (voteHistory.length == curVoteHistoryLength) break;
  }
  GM_setValue(`voteHistory`, JSON.stringify(voteHistory));

  document.addEventListener('keyup', handleKeyUp, false);
};
It's a Tampermonkey script. Probably works on Greasemonkey too.

Hotkeys:
Alt + V - Copy current vote count to your clipboard
Alt + X - Automatically win the game
Alt + 1 - Set EoD post number for day 1
Alt + 2 - Set EoD post number for day 2
...
Alt + 0 - Set EoD post number for day 10

In setting EoD numbers the current day is calculated by which days don't have an EoD set, if you accidentally set an EoD value, you can reset it by setting it to 0.

Alt + R - Copy vote count for a previous day to your clipboard - this feature can also be used to get retrospective vote counts of any post number with a little bit of creativity (hint: set the EoD post number to the post you want to have the retrospective vote count on)

After pressing these hotkeys you have to Ctrl + V to post the vote count.



I'm sure there are lots of bugs! If wolves have mercy on me and let me live the night I can help fix them :joy_cat:
Very cool, good job!
User avatar
Sabiplz
<3
Posts in topic: 243
Posts: 4641
Joined: Tue Jul 12, 2022 10:13 pm
Location: Chicago, IL
Gender: Nonbinary
Preferred Pronouns: They them
Aka: Kuti
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2625

Post by Sabiplz »

[VOTE: arogame] aubergine
User avatar
Marmot
Marmot
Posts in topic: 98
Posts: 30972
Joined: Sat Jan 11, 2014 11:21 am
Location: Oregon
Gender: Genderfluid
Preferred Pronouns: they/them
Aka: Marmot
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2626

Post by Marmot »

ITA Hally

hehe
Image

Banners and Stuff
Spoiler: show
My Syndicate Mafia Wins:

Full Games Civilian: Image

Mafia: Image Image Image Image

Independent: Image Image
Speed Games Civilian: Image Image Fiddler on the Roof

Mafia: Image Image Image Image
Heists Civilian: Image Image Image Image Image

MVP: RED vs BLUE
Burglaries Independent: The Theme Is Literally a Burglary
Special Games Civilian: Image Image Image Image

Independent: Image

My Syndicate Hosted Games:

Speed Games Image Image Image
Heists Image Image Image

Some other Banners:

2014 Sockys Image
2015 Sockys Image Image Image
Miscellaneous Image Image

Image
Dragon D. Luffy wrote: Wed Dec 16, 2020 7:33 pm Just how many days of "let's yeet them tomorrow" can a mafioso survive?

The answer: all of them, if you are a marmot.
User avatar
Sabiplz
<3
Posts in topic: 243
Posts: 4641
Joined: Tue Jul 12, 2022 10:13 pm
Location: Chicago, IL
Gender: Nonbinary
Preferred Pronouns: They them
Aka: Kuti
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2627

Post by Sabiplz »

How about now
User avatar
Lumi
Corrupt Union Official
Posts in topic: 259
Posts: 626
Joined: Fri Feb 11, 2022 10:08 pm
Preferred Pronouns: she/her/they/them
Aka: Luminous

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2628

Post by Lumi »

c4e5g3d5 wrote: Sun Dec 04, 2022 7:48 pm
Lumi wrote: Sun Dec 04, 2022 7:47 pm Not Voting (12): MacDougall (26), NANOOKTHEGREATANDFEARSOME (13), Lilypetal (15), SilverKeith (44), Inawordyes (11), Michelle (42), JaggedJimmyJay (30), risiinq- (38), sabie12 (2), Fext (5), Porscha (47), DrWilgy (15)
chelsea (6): Golden (47), Scotty (37), Guillotine (146), ilario (38), Neon (69), ~Prince J~ (18)
arogame (3): nutella (120), Creature (69), tutuu (25)
c4e5g3d5 (1): Marmot (74)
unvote (3): iaafr (132), WindwardAway (101), arogame123 (61)
lily (1): falcon45ca (17)
trans rights (1): katze (87)
golden (5): EnderWiggin (100), Dyslexicon (54), DeeZees (19), lucy (19), Vivax (18)
master radishes (2): Sloonei (24), sprityo (18)
c4e5g3d5 (1): c4e5g3d5 (77)
jaggedjimmyjay (1): Jackofhearts2005 (62)
jackofhearts2005 (1): Schiavetto (17)
scotty (1): Hally (116)
guillotine (1): santygrass (29)
golden (1): RondoDimBuckle (119)
manny (1): Manny (165)
whomever owns this hellsite (1): hollowkatt (63)
sloonei (2): Ricochet (5), pyxxy (7)
macdougal (1): Seanzie (5)
test (1): Lumi (32)
risiinq~ (1): Ranmilia (31)
arogame (1): Sabiplz (237)
golden the coward (1): G-Man (17)
iaafr (1): Chelsea (11)
michelle (1): TonyStarkPrime (31)
Lol why do I have two wagons
One of you did a trailing space

Okay, I need to trim whitespace
User avatar
Guillotine
Racketeer
Posts in topic: 200
Posts: 4618
Joined: Thu Dec 31, 2020 8:24 pm
Location: Las Vegas
Gender: Male
Preferred Pronouns: He/him/his/himself
Aka: King of Bastard Games
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2629

Post by Guillotine »

Creature wrote: Sun Dec 04, 2022 7:50 pm
Guillotine wrote: Sun Dec 04, 2022 7:50 pm Nutella is a player if she didnt post cap lol
Rondo might very well be a player here tbh
Yup. So there you go mafia, you know whom to kill
Spoiler: show
Awards
Image

Played
Image Image Image Image Image Image

Hosted
Image

Quotes
Spacedaisy wrote: Mon Feb 21, 2022 12:05 am My interaction with Guillo was pocketed town talking to a wolf who had her fooled.
User avatar
Lumi
Corrupt Union Official
Posts in topic: 259
Posts: 626
Joined: Fri Feb 11, 2022 10:08 pm
Preferred Pronouns: she/her/they/them
Aka: Luminous

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2630

Post by Lumi »

Not Voting (12): MacDougall (26), NANOOKTHEGREATANDFEARSOME (13), Lilypetal (15), SilverKeith (44), Inawordyes (11), Michelle (42), JaggedJimmyJay (30), risiinq- (39), sabie12 (2), Fext (5), Porscha (47), DrWilgy (15)
chelsea (6): Golden (47), Scotty (37), Guillotine (148), ilario (38), Neon (69), ~Prince J~ (18)
arogame (4): nutella (120), Creature (74), Sabiplz (242), tutuu (26)
c4e5g3d5 (1): Marmot (75)
unvote (3): iaafr (132), WindwardAway (101), arogame123 (61)
lily (1): falcon45ca (17)
trans rights (1): katze (89)
golden (5): EnderWiggin (100), Dyslexicon (54), DeeZees (19), lucy (19), Vivax (18)
master radishes (2): Sloonei (24), sprityo (18)
c4e5g3d5 (1): c4e5g3d5 (79)
jaggedjimmyjay (1): Jackofhearts2005 (62)
jackofhearts2005 (1): Schiavetto (17)
scotty (1): Hally (116)
guillotine (1): santygrass (29)
golden (1): RondoDimBuckle (119)
manny (1): Manny (165)
whomever owns this hellsite (1): hollowkatt (63)
sloonei (2): Ricochet (5), pyxxy (7)
macdougal (1): Seanzie (5)
test (1): Lumi (36)
risiinq~ (1): Ranmilia (31)
golden the coward (1): G-Man (17)
iaafr (1): Chelsea (11)
michelle (1): TonyStarkPrime (31)
User avatar
Sabiplz
<3
Posts in topic: 243
Posts: 4641
Joined: Tue Jul 12, 2022 10:13 pm
Location: Chicago, IL
Gender: Nonbinary
Preferred Pronouns: They them
Aka: Kuti
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2631

Post by Sabiplz »

Ita katze

Glglgl
User avatar
Guillotine
Racketeer
Posts in topic: 200
Posts: 4618
Joined: Thu Dec 31, 2020 8:24 pm
Location: Las Vegas
Gender: Male
Preferred Pronouns: He/him/his/himself
Aka: King of Bastard Games
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2632

Post by Guillotine »

I believe in you
Spoiler: show
Awards
Image

Played
Image Image Image Image Image Image

Hosted
Image

Quotes
Spacedaisy wrote: Mon Feb 21, 2022 12:05 am My interaction with Guillo was pocketed town talking to a wolf who had her fooled.
User avatar
Lumi
Corrupt Union Official
Posts in topic: 259
Posts: 626
Joined: Fri Feb 11, 2022 10:08 pm
Preferred Pronouns: she/her/they/them
Aka: Luminous

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2633

Post by Lumi »

Not Voting (12): MacDougall (26), NANOOKTHEGREATANDFEARSOME (13), Lilypetal (15), SilverKeith (44), Inawordyes (11), Michelle (42), JaggedJimmyJay (30), risiinq- (39), sabie12 (2), Fext (5), Porscha (47), DrWilgy (15)
chelsea (6): Golden (47), Scotty (37), Guillotine (150), ilario (38), Neon (69), ~Prince J~ (18)
arogame (4): nutella (120), Creature (74), Sabiplz (243), tutuu (26)
c4e5g3d5 (2): Marmot (75), c4e5g3d5 (79)
unvote (3): iaafr (132), WindwardAway (101), arogame123 (61)
lily (1): falcon45ca (17)
trans rights (1): katze (89)
golden (6): EnderWiggin (100), Dyslexicon (54), RondoDimBuckle (119), DeeZees (19), lucy (19), Vivax (18)
master radishes (2): Sloonei (24), sprityo (18)
jaggedjimmyjay (1): Jackofhearts2005 (62)
jackofhearts2005 (1): Schiavetto (17)
scotty (1): Hally (116)
guillotine (1): santygrass (29)
manny (1): Manny (165)
whomever owns this hellsite (1): hollowkatt (63)
sloonei (2): Ricochet (5), pyxxy (7)
macdougal (1): Seanzie (5)
test (1): Lumi (37)
risiinq~ (1): Ranmilia (31)
golden the coward (1): G-Man (17)
iaafr (1): Chelsea (11)
michelle (1): TonyStarkPrime (31)
User avatar
Lumi
Corrupt Union Official
Posts in topic: 259
Posts: 626
Joined: Fri Feb 11, 2022 10:08 pm
Preferred Pronouns: she/her/they/them
Aka: Luminous

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2634

Post by Lumi »

Ok, trimming whitespace works:

Code: Select all

// ==UserScript==
// @name         Secret Playerlist Vote Counter
// @namespace    mailto:luminouslag@gmail.com
// @version      1.0
// @description  Automatic Vote Counting for Secret Plyerlist Mafia game on The Syndicate
// @author       Lumi
// @match        https://mafiathesyndicate.com/viewtopic.php?*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=mafiathesyndicate.com
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_setClipboard
// ==/UserScript==

console.log('Script Initialized');

async function getDocument(thread, start) {
  return await window.fetch(`https://mafiathesyndicate.com/viewtopic.php?t=${thread}&start=${start}`).then(r => r.text()).then(html => (new DOMParser()).parseFromString(html, 'text/html'));
}

function getDataFromPost(post) {
  let postNum = post.getElementsByClassName('post-number')[0].textContent.match(/[0-9]+/g)[0];
  let contentChildren = post.getElementsByClassName('content')[0].children;
  let author = post.getElementsByClassName('author')[1].getElementsByTagName('a')[1].textContent;
  let currentVoteTarget = null;
  for (const contentChild of contentChildren) {
    if (contentChild.classList.contains('mention')) {
      let voteTarget = contentChild.textContent.replaceAll('\n','').matchAll(/\[VOTE: ([^\]]*)\]/g).next().value;
      if (voteTarget) currentVoteTarget = voteTarget[1];
    }
  }
  return {
    number: postNum,
    target: currentVoteTarget,
    author: author,
  };
}

function isCorrectThread(targetNum) {
  let topicNum = document.getElementsByClassName("topic-title")[0].children[0].href.matchAll(/\?t=([0-9]+)&/g).next().value[1];
  return topicNum == targetNum;
};

function getNumPosts() {
  return parseInt(document.getElementsByClassName('pagination')[0].textContent.matchAll(/([0-9]*) posts/g).next().value[1]);
};

function getFirstPostNumOfThisPage() {
  return parseInt(document.getElementsByClassName('post')[0].getElementsByClassName('post-number')[0].textContent.match(/[0-9]+/g)[0]);
}

function tallyPage(voteHistory, page) {
  let posts = page.getElementsByClassName('post');
  for (const post of posts) {
    let postData = getDataFromPost(post);
    if (parseInt(postData.number) == voteHistory.length + 1) {
      voteHistory.push(postData);
    }
  }
  return voteHistory;
}

function handleKeyUp(e) {
    let isNum = (e.keyCode >= 48 && e.keyCode <= 57);
    let isV = (e.keyCode == 86);
    let isR = (e.keyCode == 82);
    let isX = (e.keyCode == 88);
    if (isV && e.altKey) {
      let currentDay = 1;
      for(let i=1; i<=10; i++) {
        if (GM_getValue(`EoD${i}`, 0) != 0) currentDay++;
      }
      let voteCount = calcVoteCount(currentDay);
      GM_setClipboard(voteCount);
    } else if (isR && e.altKey) {
      let day = parseInt(prompt('Enter Day Number'));
      let voteCount = calcVoteCount(day);
      GM_setClipboard(voteCount);
    } else if ( isNum && e.altKey) {
      let num = parseInt(e.key);
      if (num == 0) num = 10;
      let postNum = prompt(`Enter Post Number for EoD ${num}`)
      GM_setValue(`EoD${num}`, parseInt(postNum));
    } else if ( isX && e.altKey) {
      window.location.href = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
    }
};

function calcVoteCount(day) {
  let SoD = GM_getValue(`EoD${day-1}`, 0);
  let EoD = GM_getValue(`EoD${day}`, 0);
  voteHistory = JSON.parse(GM_getValue(`voteHistory`), '[]');

  let voteTargets = {};
  let postCounts = {};

  for (const vote of voteHistory) {
    if ((vote.number >= SoD || SoD == 0) && (vote.number <= EoD || EoD == 0)) {
      if (!(vote.author in voteTargets)) {
        voteTargets[vote.author] = null;
        postCounts[vote.author] = 1;
      } else {
        postCounts[vote.author] += 1;
      }
      if (vote.target != null) voteTargets[vote.author] = [vote.target, vote.number];
    }
  }

  let voteCount = {};

  for (const [key, value] of Object.entries(voteTargets) ) {
    if (value != null) {
      let target = value[0].toLowerCase().trim();
      if (target in voteCount) {
        voteCount[target].push([key, value[1], postCounts[key]]);
      } else {
        voteCount[target] = [[key, value[1], postCounts[key]]];
      }
    } else {
      if ('Not Voting' in voteCount) {
        voteCount['Not Voting'].push([key, null, postCounts[key]]);
      } else {
        voteCount['Not Voting'] = [[key, null, postCounts[key]]];
      }
    }
  }

  return voteCountToString(voteCount);
}

function voteToString(vote) {
  if (vote[1] == null) return `${vote[0]} (${vote[2]})`
  return `[url=https://mafiathesyndicate.com/viewtopic.php?t=2451&start=${vote[1]-1}]${vote[0]}[/url] (${vote[2]})`
}

function voteCountToString(voteCount) {
  let output = '';
  for (const [key, value] of Object.entries(voteCount)) {
    let valueStrings = [];
    for (const vote of value) {
      valueStrings.push(voteToString(vote));
    }
    output += `${key} (${value.length}): ${valueStrings.join(', ')}\n`
  }
  return output;
}

if (isCorrectThread(2451)) {
  let voteHistory = JSON.parse(GM_getValue(`voteHistory`, '[]'));
  let numPosts = getNumPosts();
  let curVoteHistoryLength = voteHistory.length;
  while (voteHistory.length < numPosts) {
    let page = await getDocument(2451, voteHistory.length);
    voteHistory = tallyPage(voteHistory, page);
    if (voteHistory.length == curVoteHistoryLength) break;
  }
  GM_setValue(`voteHistory`, JSON.stringify(voteHistory));

  document.addEventListener('keyup', handleKeyUp, false);
};
User avatar
katze
:joy_cat:
Posts in topic: 205
Posts: 298
Joined: Sun Apr 18, 2021 5:06 pm
Gender: nope
Preferred Pronouns: any
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2635

Post by katze »

[VOTE: guillotina] aubergine
😹
User avatar
Hally
alien shapeshifter
Posts in topic: 602
Posts: 8869
Joined: Thu Jun 18, 2020 1:00 pm
Preferred Pronouns: they/them

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2636

Post by Hally »

Marmot wrote: Sun Dec 04, 2022 7:50 pm ITA Hally

hehe
A shot rings out!

Hally has died. They were:
Spoiler: show
Mafia Goon
Spoiler: show
ImageImageImageImageImageImage Image ImageImage
User avatar
Lumi
Corrupt Union Official
Posts in topic: 259
Posts: 626
Joined: Fri Feb 11, 2022 10:08 pm
Preferred Pronouns: she/her/they/them
Aka: Luminous

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2637

Post by Lumi »

How to set up a Tampermonkey Script:
1) Get the tampermonkey extension (https://www.tampermonkey.net/)
2) While on this page click the tampermonkey extension and click "Create New Script"
3) Copy the code I sent, select all the code in the new script, paste my code
4) Hit Ctrl+S to save
5) Reload the page, the hotkeys should work for you.
User avatar
katze
:joy_cat:
Posts in topic: 205
Posts: 298
Joined: Sun Apr 18, 2021 5:06 pm
Gender: nope
Preferred Pronouns: any
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2638

Post by katze »

Hally wrote: Sun Dec 04, 2022 7:54 pm
Marmot wrote: Sun Dec 04, 2022 7:50 pm ITA Hally

hehe
A shot rings out!

Hally has died. They were:
Spoiler: show
Mafia Goon

is this a scumslip
😹
User avatar
katze
:joy_cat:
Posts in topic: 205
Posts: 298
Joined: Sun Apr 18, 2021 5:06 pm
Gender: nope
Preferred Pronouns: any
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2639

Post by katze »

lumi ur almost as big of a nerd as arete is
😹
tutuu
Capo Regime (Street Boss)
Posts in topic: 94
Posts: 12784
Joined: Wed Jun 17, 2020 3:38 pm

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2640

Post by tutuu »

[VOTE: Chelsea] aubergine

i dunno the vote count katze didnt copy paste i dont have time!
User avatar
Lumi
Corrupt Union Official
Posts in topic: 259
Posts: 626
Joined: Fri Feb 11, 2022 10:08 pm
Preferred Pronouns: she/her/they/them
Aka: Luminous

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2641

Post by Lumi »

katze wrote: Sun Dec 04, 2022 7:56 pm lumi ur almost as big of a nerd as arete is
I take that as a compliment :joy_cat:
User avatar
Creature
Made Man
Posts in topic: 124
Posts: 7965
Joined: Mon May 13, 2019 5:51 pm

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2642

Post by Creature »

Ok I'm prob staying where I am

May the rand lynch be in our favor
User avatar
Marmot
Marmot
Posts in topic: 98
Posts: 30972
Joined: Sat Jan 11, 2014 11:21 am
Location: Oregon
Gender: Genderfluid
Preferred Pronouns: they/them
Aka: Marmot
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2643

Post by Marmot »

Hally wrote: Sun Dec 04, 2022 7:54 pm
Marmot wrote: Sun Dec 04, 2022 7:50 pm ITA Hally

hehe
A shot rings out!

Hally has died. They were:
Spoiler: show
Mafia Goon
HYYYPYPYEEE
Image

Banners and Stuff
Spoiler: show
My Syndicate Mafia Wins:

Full Games Civilian: Image

Mafia: Image Image Image Image

Independent: Image Image
Speed Games Civilian: Image Image Fiddler on the Roof

Mafia: Image Image Image Image
Heists Civilian: Image Image Image Image Image

MVP: RED vs BLUE
Burglaries Independent: The Theme Is Literally a Burglary
Special Games Civilian: Image Image Image Image

Independent: Image

My Syndicate Hosted Games:

Speed Games Image Image Image
Heists Image Image Image

Some other Banners:

2014 Sockys Image
2015 Sockys Image Image Image
Miscellaneous Image Image

Image
Dragon D. Luffy wrote: Wed Dec 16, 2020 7:33 pm Just how many days of "let's yeet them tomorrow" can a mafioso survive?

The answer: all of them, if you are a marmot.
User avatar
DrWilgy
Capo Regime (Street Boss)
Posts in topic: 213
Posts: 14883
Joined: Thu Aug 13, 2015 10:54 am

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2644

Post by DrWilgy »

So I vote right?
[VOTE: TSP] aubergine

What after that. What list do I append currently?
nutella wrote: Wed Feb 21, 2018 2:56 pm Image
@DrWilgy don't post any more k
Spoiler: show
Image Image Image
JaggedJimmyJay wrote:Wilgy's vote is an enigma of science. Philosophers are known to throw their tomes across the auditorium in a fit of frustration after failing to solve its mystery.
insertnamehere wrote: Wed Jun 28, 2017 11:50 pm WTF was up with Wilgy's entire deal?
User avatar
katze
:joy_cat:
Posts in topic: 205
Posts: 298
Joined: Sun Apr 18, 2021 5:06 pm
Gender: nope
Preferred Pronouns: any
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2645

Post by katze »

Lumi wrote: Sun Dec 04, 2022 7:57 pm
katze wrote: Sun Dec 04, 2022 7:56 pm lumi ur almost as big of a nerd as arete is
I take that as a compliment :joy_cat:
i outlined what this means in p#1765

i know postnums dont work like that here but youll find a way im sure
😹
User avatar
iaafr
Racketeer
Posts in topic: 293
Posts: 3809
Joined: Thu Sep 26, 2019 4:46 am
Gender: male
Preferred Pronouns: any/especially "big chungus iaafr"

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2646

Post by iaafr »

prince j could be a wolf
User avatar
Creature
Made Man
Posts in topic: 124
Posts: 7965
Joined: Mon May 13, 2019 5:51 pm

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2647

Post by Creature »

Damn this is still tense
tutuu
Capo Regime (Street Boss)
Posts in topic: 94
Posts: 12784
Joined: Wed Jun 17, 2020 3:38 pm

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2648

Post by tutuu »

@Lumi do the thing pls
User avatar
Creature
Made Man
Posts in topic: 124
Posts: 7965
Joined: Mon May 13, 2019 5:51 pm

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2649

Post by Creature »

arogame123 wolf or NPC

Prob NPC because I feel like he would fight his lynch harder as wolf too
User avatar
c4e5g3d5
Drug Dealer
Posts in topic: 88
Posts: 1314
Joined: Mon Feb 01, 2021 10:03 pm

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2650

Post by c4e5g3d5 »

SUB TO MY WALRUS
Spoiler: show
Image
Image
Progression cases are bad.
User avatar
katze
:joy_cat:
Posts in topic: 205
Posts: 298
Joined: Sun Apr 18, 2021 5:06 pm
Gender: nope
Preferred Pronouns: any
Contact:

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2651

Post by katze »

iaafr wrote: Sun Dec 04, 2022 7:58 pm prince j could be a wolf
insightful
😹
User avatar
DrWilgy
Capo Regime (Street Boss)
Posts in topic: 213
Posts: 14883
Joined: Thu Aug 13, 2015 10:54 am

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2652

Post by DrWilgy »

Oh shit. There's a tie and I can kill Golden?

[VOTE: Golden] aubergine
nutella wrote: Wed Feb 21, 2018 2:56 pm Image
@DrWilgy don't post any more k
Spoiler: show
Image Image Image
JaggedJimmyJay wrote:Wilgy's vote is an enigma of science. Philosophers are known to throw their tomes across the auditorium in a fit of frustration after failing to solve its mystery.
insertnamehere wrote: Wed Jun 28, 2017 11:50 pm WTF was up with Wilgy's entire deal?
User avatar
hollowkatt
Racketeer
Posts in topic: 81
Posts: 4523
Joined: Thu May 28, 2020 10:20 pm
Location: Michigan USA

Re: Secret Playerlist - Day 1 Ends 10am Dec 5 GMT +10 (Aus Eastern Standard Time)

#2653

Post by hollowkatt »

I sorted by postcount and I can confirm Sabi is 100% in the Sabi post count range. You're welcome for this insight
Spoiler: show
ImageImageImageImageImage
tutuu wrote:fluffy furry
fluffy fluffy
kitty kitty
oiiii oiii oiiii
soft fluffy paws
Post Reply

Return to “Previous Sit Downs”