Re: Secret Playerlist - Day 3 Ends 10am Dec 11 GMT +10 (Aus Eastern Standard Time)
Posted: Fri Dec 09, 2022 8:57 pm
Murder, Mayhem, and Mafia
https://www.mafiathesyndicate.com/
Actually Wilgy could be a wolf for coming to my defense like thatkatze wrote: ↑Fri Dec 09, 2022 8:39 pmw/wRondoDimBuckle wrote: ↑Fri Dec 09, 2022 8:38 pm<3<3<3<3<3 wanna make out?DrWilgy wrote: ↑Fri Dec 09, 2022 8:29 pmI agree, but in Rondo specifically, is a performance AI? I've never caught Rondo before, but I have seen them gimmick, I have seen them put a stick in between their own bike spokes as town.SilverKeith wrote: ↑Fri Dec 09, 2022 7:14 pm I don't like Rondo's approach here. Feels fake/performative
theres nerds with a script now so u dont actually need to find the tally yourselfJaggedJimmyJay wrote: ↑Fri Dec 09, 2022 8:59 pm I was about to place an enjoyable vote for katze, but I realized I would have to find the tally. Maybe next time.
what's all this then?katze wrote: ↑Fri Dec 09, 2022 9:00 pmtheres nerds with a script now so u dont actually need to find the tally yourselfJaggedJimmyJay wrote: ↑Fri Dec 09, 2022 8:59 pm I was about to place an enjoyable vote for katze, but I realized I would have to find the tally. Maybe next time.
Sloonei wrote: ↑Fri Dec 09, 2022 9:24 pmwhat's all this then?katze wrote: ↑Fri Dec 09, 2022 9:00 pmtheres nerds with a script now so u dont actually need to find the tally yourselfJaggedJimmyJay wrote: ↑Fri Dec 09, 2022 8:59 pm I was about to place an enjoyable vote for katze, but I realized I would have to find the tally. Maybe next time.
^v^O.O^v^Michelle wrote: ↑Fri Dec 09, 2022 9:12 amCreature wrote: ↑Wed Dec 07, 2022 7:13 pm [VOTE: Santygrass] aubergine
Not Voting (7): MacDougall (33), Inawordyes (19), JaggedJimmyJay (35), risiinq- (44), sabie12 (2), Fext (5), Porscha (73)
chelsea (2): Golden (47), ~Prince J~ (18)
enderwiggin (2): nutella (167), Neon (88)
marmot (2): Marmot (84), sprityo (24)
michelle (4): NANOOKTHEGREATANDFEARSOME (21), hollowkatt (81), Chelsea (18), TonyStarkPrime (31)
scotty (3): Lilypetal (39), EnderWiggin (159), tutuu (62)
hollowkatt (5): iaafr (229), Jackofhearts2005 (108), Hally (173), Dyslexicon (100), Vivax (40)
drwilgy (1): SilverKeith (66)
lily (1): falcon45ca (17)
guillotina (1): katze (131)
nutella (1): Michelle (116)
master radishes (1): Sloonei (33)
c4e5g3d5 (1): c4e5g3d5 (85)
jackofhearts2005 (1): Schiavetto (20)
sloonei (3): santygrass (74), Scotty (52), Ricochet (10)
santygrass (6): RondoDimBuckle (141), DeeZees (39), pyxxy (14), Guillotine (192), Ranmilia (118), Creature (118)
manny (1): Manny (200)
golden (1): lucy (19)
guillotine (1): Seanzie (10)
test (1): Lumi (78)
unvote (2): WindwardAway (105), arogame123 (61)
arogame (1): Sabiplz (243)
golden the coward (1): G-Man (23)
dr. wilgy (1): ilario (43)
hk (1): DrWilgy (26)Creature came back to Eod just to post 3 fluff posts.
Wolfy behavior imo
thats just lunchnutella wrote: ↑Fri Dec 09, 2022 9:51 pm https://www.tiktok.com/t/ZTRVduPTM/ @katze refusing to be boxed in
ty marmar!Marmot wrote: ↑Fri Dec 09, 2022 12:47 pmsantygrass wrote: ↑Fri Dec 09, 2022 11:58 am C4
Chelsea
Creature
DeZees
DrWilg
Dyslexicon
Ender
Falcon
G-Man
Guillo
Hally
Iaafr
Ilario
Inawy
Jack
Jjj
Katze
Lily
Lumi
Manny
Marmot
Michelle
Nanook
Neon
Nutella
Porscha
Pyxyy
Ranmilia
Ricochet
Rondo
Santy
Scotty
Seanzie
Schiavetto
Silverkeith
Sloonei
Sprityo
Vivax
Think this is the list of remaining slots rn
As the person who is in charge of keeping track of players meeting the post count minimum, I can confirm that this is the current living playerlist.
honored to be in this companyRanmilia wrote: ↑Fri Dec 09, 2022 1:33 pm Pyxyy - 0 content minposter. No objections to yeeting.
Ricochet - 0 content minposter. No objections to yeeting. The "voted Sloonei" shield has expired with the revelation that mafia can't find real players.
Seanzie - 0 content minposter, tutuu died actively scumreading, #respectthedead
Schiavetto - 0 content, wolfy poppins, eminently yeetable
Sprityo - 0 content minposter, the "voted Radishes" shield is mostly expired
(im catching up)Ranmilia wrote: ↑Fri Dec 09, 2022 4:02 pmBut y'know if I were to be an NPC this game, that would be really interestingsantygrass (6): Guillotine (48), Vivax (26), pyxxy (7), EnderWiggin (67), DeeZees (25), Creature (46)
hollowkatt (6): santygrass (59), Jackofhearts2005 (46), Ranmilia (96), Dyslexicon (46), tutuu (66), DrWilgy (16)
marmot (2): Marmot (14), sprityo (6)
deezees (1): iaafr (104)
enderwiggin (2): nutella (53), Neon (19)
scotty (1): Lilypetal (24)
guillotine (1): Seanzie (5)
manny (1): Manny (63)
michelle (3): NANOOKTHEGREATANDFEARSOME (8), hollowkatt (17), Chelsea (7)
drwilgy (2): SilverKeith (22)
sloonei (1): Ricochet (5)
nutella (1): Michelle (74)
unvote (2): Hally (75), RondoDimBuckle (48)
Not Voting (13): MacDougall (5), katze (37), c4e5g3d5 (5), Sloonei (9), JaggedJimmyJay (5), Lumi (36), G-Man (6), risiinq- (6), Porscha (26), Inawordyes (9), WindwardAway (4), Schiavetto (14), falcon45ca (5)
Because HK's wagon went over, so there are at least two real votes on it, and tutuu was NPC, so that would hypothetically be saying "at least two real among santy, jack, dizzy, wilgy"
(and chances are it's more than two real)
(and also there are fewer real on the santy wagon. or equal? I'm not sure @MacDougall ever clarified what happens on ties.)
So y'know what I'm sayin I think Wilgy is a pretty good vote for trying to hit real wolf and am less interested in Guillo Vivax DeeZees mmhm
Of course, if I live to tomorrow, then I made a horrible mistake in which box I checked on the form and the weight of this is lessened, but, still
town-sided til the end, best marmot ever
Why do people post a votecount and then not order by number of votes?iaafr wrote: ↑Fri Dec 09, 2022 10:10 pm Not Voting (16): MacDougall (6), katze (32), Lumi (18), Sloonei (6), DrWilgy (10), Jackofhearts2005 (13), Porscha (28), c4e5g3d5 (3), G-Man (2), pyxxy (8), Lilypetal (27), Inawordyes (2), Guillotine (2), Marmot (5), falcon45ca (4), JaggedJimmyJay (3)
ranmilia (1): iaafr (52)
drwilgy (4): nutella (59), Vivax (35), Ranmilia (56), SilverKeith (9)
dezees (1): santygrass (83)
pyxxy (1): EnderWiggin (32)
nutella (1): NANOOKTHEGREATANDFEARSOME (20)
neon (2): Seanzie (5), Hally (41)
rondodimbuckle (1): RondoDimBuckle (35)
nanookthegreatandmightywizardfirstofhisnameandfatherofdragons (1): Scotty (18)
dr wilgy (1): ilario (14)
nanookthegreatandfearsome (1): Manny (10)
falcon45ca (1): Michelle (40)
sloonei (1): Ricochet (8)
ricochet (1): Neon (27)
rondo (1): Dyslexicon (9)
not bothering to fix names this time
You see here though, that requires effortRanmilia wrote: ↑Fri Dec 09, 2022 11:08 pm The case on Wilgy is that it appears that the mafia are not following the game very closely, so we're gonna round up all the people posting no content or saying things like "I'll get into this game once the NPCs leave" and put them into the murderblender happy fun time Red Rider rocket wagon!
Also his posts are wolfy.
There are a lot of people who fit the bill though and the bar is not tremendously high, in fact it's currently at "posted literally any content showing they put thought into the game" so if you'd like to not be on the Red Rider Group of Friends - post some content! Any content!
Here are ISOs! You can look at Nutella's and my ISOs for our thoughts on people to focus on today!
Spoiler: show
Let’s be friends, start our own private equity firmpyxxy wrote: ↑Fri Dec 09, 2022 9:56 pmhonored to be in this companyRanmilia wrote: ↑Fri Dec 09, 2022 1:33 pm Pyxyy - 0 content minposter. No objections to yeeting.
Ricochet - 0 content minposter. No objections to yeeting. The "voted Sloonei" shield has expired with the revelation that mafia can't find real players.
Seanzie - 0 content minposter, tutuu died actively scumreading, #respectthedead
Schiavetto - 0 content, wolfy poppins, eminently yeetable
Sprityo - 0 content minposter, the "voted Radishes" shield is mostly expired
Mac goatMacDougall wrote: ↑Thu Dec 08, 2022 9:36 pm Several Americans have complained that I've put the eod in my timezone.
As a world citizen I must remind you that we as non American internet users spend most of our life working around the fact that the majority of the global social internet is American.
I am sure in this one game you can handle having to do your own timezone conversion. It's not hard. Google is your friend. I know you, Americans, are used to have everything fed to you through a tube but I will not be your tube this time.
Wait, are you actually DZ?DeeZees wrote: ↑Sat Dec 10, 2022 3:27 am @Lumi
As i see it mafia optimum strat to work out the plauer list would be to stack first and second wagons bkth day Nd see who dies. They have the numbers to decrease the pool and control the lunch/work out the player list
Flip side- they also have the risk that kf they do that the plauers may cotton on and narrow down the pl
So they might do something in middle
What you reckon mafia did?
Is there a way from d1/2 wagons we have some pools on who could/is more/is less likely to be players bassd on who died?
One key issue with "optimum mafia strategy" is that if town anticipates them doing that strategy then it's no longer optimum.DeeZees wrote: ↑Sat Dec 10, 2022 3:27 am @Lumi
As i see it mafia optimum strat to work out the plauer list would be to stack first and second wagons bkth day Nd see who dies. They have the numbers to decrease the pool and control the lunch/work out the player list
Flip side- they also have the risk that kf they do that the plauers may cotton on and narrow down the pl
So they might do something in middle
What you reckon mafia did?
Is there a way from d1/2 wagons we have some pools on who could/is more/is less likely to be players bassd on who died?
Code: Select all
// ==UserScript==
// @name Secret Playerlist Vote Counter
// @namespace mailto:luminouslag@gmail.com
// @version 1.1
// @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);
let 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]]];
}
}
}
let output = voteCountToString(voteCount);
output = `[size=150][b]Day ${day} Vote Count[/b][/size]\nSoD: [url=https://mafiathesyndicate.com/viewtopic.php?t=2451&start=${SoD}]#${SoD}[/url] EoD: [url=https://mafiathesyndicate.com/viewtopic.php?t=2451&start=${EoD}]#${EoD}[/url]\n\n` + output;
return output
}
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 = '';
let voteCounts = Object.entries(voteCount).sort((a, b) => b[1].length - a[1].length);
for (const v of voteCounts) {
let key = v[0];
let value = v[1].sort((a,b) => parseInt(a[1]) - parseInt(b[1]));
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);
};
@iaafrLumi wrote: ↑Sat Dec 10, 2022 3:56 amCode: Select all
// ==UserScript== // @name Secret Playerlist Vote Counter // @namespace mailto:luminouslag@gmail.com // @version 1.1 // @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); let 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]]]; } } } let output = voteCountToString(voteCount); output = `[size=150][b]Day ${day} Vote Count[/b][/size]\nSoD: [url=https://mafiathesyndicate.com/viewtopic.php?t=2451&start=${SoD}]#${SoD}[/url] EoD: [url=https://mafiathesyndicate.com/viewtopic.php?t=2451&start=${EoD}]#${EoD}[/url]\n\n` + output; return output } 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 = ''; let voteCounts = Object.entries(voteCount).sort((a, b) => b[1].length - a[1].length); for (const v of voteCounts) { let key = v[0]; let value = v[1].sort((a,b) => parseInt(a[1]) - parseInt(b[1])); 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); };
Version 1.1 Released
- Wagons are now sorted in descending order from most votes to least votes
- Votes on a wagon are now sorted by the order in which the votes were placed
- Title text that shows what days vote count you're posting as well as what the SoD and EoD post you have logged in your script. (For the current ongoing day, EoD will be 0
- Added Cake
EBWODPLumi wrote: ↑Sat Dec 10, 2022 3:57 am@iaafrLumi wrote: ↑Sat Dec 10, 2022 3:56 amCode: Select all
// ==UserScript== // @name Secret Playerlist Vote Counter // @namespace mailto:luminouslag@gmail.com // @version 1.1 // @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); let 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]]]; } } } let output = voteCountToString(voteCount); output = `[size=150][b]Day ${day} Vote Count[/b][/size]\nSoD: [url=https://mafiathesyndicate.com/viewtopic.php?t=2451&start=${SoD}]#${SoD}[/url] EoD: [url=https://mafiathesyndicate.com/viewtopic.php?t=2451&start=${EoD}]#${EoD}[/url]\n\n` + output; return output } 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 = ''; let voteCounts = Object.entries(voteCount).sort((a, b) => b[1].length - a[1].length); for (const v of voteCounts) { let key = v[0]; let value = v[1].sort((a,b) => parseInt(a[1]) - parseInt(b[1])); 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); };
Version 1.1 Released
- Wagons are now sorted in descending order from most votes to least votes
- Votes on a wagon are now sorted by the order in which the votes were placed
- Title text that shows what days vote count you're posting as well as what the SoD and EoD post you have logged in your script. (For the current ongoing day, EoD will be 0
- Added Cake
Pinging rabbit with this specifically since I saw big chungus iaafr using the script earlier
tbf i was an actual player that randed!v i would have a lot of fun having reads of like 40 people since this is basically a mash and i love mashes lmao
LolLumi wrote: ↑Sat Dec 10, 2022 3:32 amWait, are you actually DZ?DeeZees wrote: ↑Sat Dec 10, 2022 3:27 am @Lumi
As i see it mafia optimum strat to work out the plauer list would be to stack first and second wagons bkth day Nd see who dies. They have the numbers to decrease the pool and control the lunch/work out the player list
Flip side- they also have the risk that kf they do that the plauers may cotton on and narrow down the pl
So they might do something in middle
What you reckon mafia did?
Is there a way from d1/2 wagons we have some pools on who could/is more/is less likely to be players bassd on who died?
Why that pfp rather than your usual doggie![]()