Author Topic: MafiaBot - A IRC bot to play mafia  (Read 20775 times)

0 Members and 1 Guest are viewing this topic.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: [contest] MafiaBot
« Reply #15 on: August 12, 2012, 02:06:52 pm »
That are many ideas :D
Now i just need to add 'em and come up for better names for the mafia theme :P
and mafia is the original game :P

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: [contest] MafiaBot
« Reply #16 on: August 12, 2012, 09:20:26 pm »
@Sorunome:It looks like you've made a lot of progress on this, nice work! =)

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: [contest] MafiaBot
« Reply #17 on: August 13, 2012, 01:38:39 pm »
Haha , thanks :D
And don't even dare to believe that that program is finished :P
BTW, it is the largest program I made so far O.o
it has so far 1491 lines of code :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Horrowind

  • LV2 Member (Next: 40)
  • **
  • Posts: 25
  • Rating: +6/-0
    • View Profile
Re: [contest] MafiaBot
« Reply #18 on: August 13, 2012, 07:05:43 pm »
Well, you asked for ideas:

Mathematician: he can sacrifice himself during the day and then choose a group of people and gets answered how many of them are murderer.
Gardener/Miller: The Detective thinks he's of the mafia.
Cleaning Lady/Godfather: Opposite of the above.
Driver of oil-tankers (seems like translation is serious business  :) ) : when he dies, his neighbours also die (needs an arrangement of the players in a circle... or any other graph if you want to make simple things complex :) ).
Freemasons: Normal Townspeople who know each other.
A variation of the jester/Fool: he gets sharpened when the mafia tries to kill him (he survives this (first!) attack). He wins, when he is sharpened and is killed by vote. So he dies, when the mafia kills him twice or the town kills him before he is sharpened.
Matchmaker: During night he chooses two people and get the information whether they are in the same party.
Liar: He votes for the person to the left (or right, also needs an arrangement).
Three-headed monkey: He is just a distraction.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: [contest] MafiaBot
« Reply #19 on: August 14, 2012, 04:17:47 am »
wow, that are a lot of users, thanks :D
I think the three-headed monkey will be easy :P
and i don't quite get the mathematician and the freemasons and the jester/fool
And did I understand it correctly that the liar can then ONLY vote for one single person during all game?

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Horrowind

  • LV2 Member (Next: 40)
  • **
  • Posts: 25
  • Rating: +6/-0
    • View Profile
Re: [contest] MafiaBot
« Reply #20 on: August 14, 2012, 12:27:12 pm »
Okay, so here some clarification:

Freemasons are just ordinary townspeople, so they have no special ability, but they know every other Freemason (it is equivalent to the murderers, who also know each other, so they know during daytime which other persons are on there side).

The mathematician is on the "good" side, and can help his side by sacrificing himself for information (as described below/above... oh directions are so relative), he chooses a group of people and the GM/bot returns the number of murderers in this group). He has no real advantage of this information, as he then is dead, but the others can use it for the discussion/vote.

The Liar votes for another person (left/right neighbour of the person he appoints) in every vote he participates. So he can choose a different one. (I do not know if you plan to have a secret vote, but afaik they are public).

For the Fool: He has to different states: sharpened and unsharpened. At the begin of the game he is in the latter state. If he is killed by vote during daytime, he is dead an is unable to win. If he is killed in the night by the mafia he gets sharpened (the GM/Bot tells him, if this happens, he survives this attack). If he is sharpened and then is killed by vote he wins (or is the only survivor), otherwise he loses (so if he is killed by the mafia again).
The only gray-zone that could happen, is if the healers heals the fool in the same night he gets sharpened. This case is a GM dependent, so you can implement that as you wish.

(as if you couldn't implement anything as you wish :) )

Hope that helps.
« Last Edit: August 14, 2012, 12:27:42 pm by Horrowind »

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: [contest] MafiaBot
« Reply #21 on: August 14, 2012, 12:30:23 pm »
Aaaaaaaah, that is helping A LOT, thanks :D
And just a little question to the mathematician: how large is the group of people?

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Horrowind

  • LV2 Member (Next: 40)
  • **
  • Posts: 25
  • Rating: +6/-0
    • View Profile
Re: [contest] MafiaBot
« Reply #22 on: August 14, 2012, 03:16:30 pm »
as he wishes... it is a bit selfbalancing: if the group he chooses is too large, he doesn’t get very valuable information (as in under these 14 people 5 are murderers), if it is too small, chances are, that he is not very helpful (as in random townie is good, so that's great, but it is not that helpful that others had to die for it)...

But don't think that the roles are so strict as I describe them here, these are how I know/play them. For gameplay and balancing reasons it is often reasonable to adjust them, for example by making the terrorist known to the murderers, disallow the healer to heal himself, and so on. So be encouraged to just take these rules as consideration and adjust them as you please.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: [contest] MafiaBot
« Reply #23 on: August 14, 2012, 04:24:58 pm »
well, i have to program it anyways somehow ^^
I already added the gardner and the godfather, am currently working on the fool :D
And thanks for all these special characters :D
EDIT: Also done with the fool :D
EDIT2: I got a question to matchmaker and gardner/godfather: do they also fool the matchmaker? (not only the detective)
« Last Edit: August 14, 2012, 07:01:30 pm by Sorunome »

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline AzNg0d1030

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 522
  • Rating: +45/-4
  • Hardcore anime watcher.
    • View Profile
Re: [contest] MafiaBot
« Reply #24 on: August 16, 2012, 08:05:05 pm »
This reminds me of an existing IRC MafiaBot on Rizon (sorry if you think this is advertising, trying not to make it seem that way).
It's really complete with scripts and a lot of roles, as well as several commands and leveling.  You should check that one out for ideas. (Mafbot.com)

Good luck developing a good mafiabot :)

edit: If you want to know some roles from that mafbot, here they are:
Civilian: Doesn't do anything but watch and vote (until Lvl 4 where they become a good role)
Killer: Well, kills.  Works alone, unless someone invites him to help.  Can't be killed unless by a kill_killer command or hanged
Mafia: Kills.
Detective: Checks people and is able to kill people

These are the roles that start to get added in when there are more players
Mafia's snitch: Works like a detective and sees what the other people's roles are
Mafia (again)
Homeless Bum: Works with detective, checks people
Schizophrenic: Sees if people are 'asleep' or not. Asleep means they are a role that doesn't do anything (civ) not asleep means they do something.  20% wrong
Doctor: Heals
Prostitute: Sleeps with players, which figures their roles, is a neutral role, can infect with AIDS
Mafia's lawyer: Watches a player so that if hanged, will be considered innocent
Mafia's agent: Prevents players from checking whoever the agent watches (they get the wrong answer.  check maf and get civ or something)
Drug lord: deals drugs, figures what roles people are, neutral
Hacker: Hacks and publicly tells what the victim's role is, unless faked
Hitman: Kills people when requested

Extra's (after dead)
Ghost: tries to kill who killed him.  Doesn't work otherwise
Farmer: Can kill anyone, however misses like 90% of the time
Crackhead: A zombie revived by  druglord that does what the druglord orders

:) And this is only the basic stuff, nevermind when the roles start leveling up
« Last Edit: August 16, 2012, 08:14:33 pm by AzNg0d1030 »
You just lost the game.



Offline p2

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 849
  • Rating: +51/-11
  • I'm back :)
    • View Profile
Re: [contest] MafiaBot
« Reply #25 on: August 17, 2012, 07:00:46 am »
Spoiler For all those who don't understand how to use the MafiaBot:
HOW TO USE THE MafiaBot

Spoiler For Characters:
Quote from: Mafiabot    in: Mafia IRC Game
   Special characters available: detective, doctor, justin, hunter, gardner, fool, freemason, matchmaker, terrorist, godfather
there's a little bug in this text bacause you won't find info about the character, using
Quote
>help gardner
The correct name is gardener, so use
Quote
>help gardener
to get known sth about this special character.


If you are too lazy, here is a list! ;)
Spoiler For SPECIAL CHARACTERS:
Spoiler For detective:
You are detective, part of the citizen community. During night you can find out who is mafia and who not.
Shown as: ------O
Spoiler For dotor:
You are doctor, part of the citizen community. During night you can save a person from death, but you don't know who will die.
Shown as: ------O
Spoiler For justin:
You are justin. If you manage to be killed in the first round you win the game, otherwise you are a normal citizen.
Shown as: ------O
Spoiler For hunter:
You are hunter, part of the citizen community. If you are killed you can kill immidatley one other person.
Shown as: ------O
Spoiler For gardener:
You are gardener, part of the citizen community. If the detective spys on you he thinks you are for the mafia.
Shown as: ------O
Spoiler For fool:
You are fool, your own party. If you are killed in the night you don't die, you are 'sharpened'. If you are voted to death during day and are 'sharpened' you win. If you die in other ways you lose.
Shown as: ------O     UNKNOWN
Spoiler For freemason:
You are a freemason, part of the citizen community. You know all other freemasons and know for sure that they are not mafia.
Shown as: ------O
Spoiler For matchmaker:
You are matchmaker, part of the citizen community. During nighttimes must choose two people and it returns if they are in the same group or not.
Shown as: ------O
Spoiler For terrorist:
You are terrorist, part of the mafia community. You can't vote during night-time as the other mafia, you don't even know who the other mafia is. The other mafia also don't know who you are. During daytime you can bomb a person, that person will die immediately, so will you.
Shown as: ------O
Spoiler For godfather:
You are godfather, part of the mafia community. If the detective spys on you he thinks you are for the citizens.
Shown as: ------O
Colors: FOR CITICENS UNKNOWN FOR MAFIA
Spoiler For How to play mafia:
This should tell you, how to play it using the MafiaBot, not what Mafia is. If you don't know the game, search for it in the internet! ;)

If you want to play the game, use
Quote from: >help login
/msg MafiaBot login <USERNAME> <PASSWORD>
to login. But If you haven't ever played it before you first need to register with
Quote from: >help new user
/msg MafiaBot new user <USERNAME> <PASSWORD>
If you are logged in, you can play Mafia. To join a game, use
Quote from: >help join
>join
But this is only possible, if you aren't already in-game.

As soon as a new game begins, the MafiaBot tells you, who you are. (specialCharacters)
Always look at the messages which are sent private to you!





I'll maybe add more info of how to play it.
I forgot my own pass, so I currently can't try it out! :P
*insert supercool signature*

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: [contest] MafiaBot
« Reply #26 on: August 17, 2012, 07:03:33 am »
yay I'm not the only one that forgot my password :P
« Last Edit: August 17, 2012, 07:21:17 am by ruler501 »
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline p2

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 849
  • Rating: +51/-11
  • I'm back :)
    • View Profile
Re: [contest] MafiaBot
« Reply #27 on: August 17, 2012, 07:05:03 am »
^^

Is there any possibillity to delete one's account??
*insert supercool signature*

Offline alberthrocks

  • Moderator
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 876
  • Rating: +103/-10
    • View Profile
Re: [contest] MafiaBot
« Reply #28 on: August 17, 2012, 09:46:58 pm »
Just a word of advice: build a framework before building the bot!

When I was coding AtomBot (and subsequently its clones Lua2TNS and AtomASM), my code became so unmanageable that I simply gave up and started anew (which also hasn't really gone anywhere :P). For me, I was just writing a command based bot - you're writing something more complex!

Basically, you should have some kind of system (an OOP one is nice) that handles commands, server communication, etc. Then you can be sure that you cover all of the possible communication cases, and have a solid foundation to build on! :)

If you already have done that... kudos to you! You've done something I should have done a long time ago... :P
Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/


Proud member of ClrHome!

Miss my old signature? Here it is!
Spoiler For Signature:
Alternate "New" IRC post notification bot (Newy) down? Go here to reset it! http://withg.org/albert/cpuhero/

Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/

Activity remains limited due to busyness from school et al. Sorry! :( Feel free to PM, email, or if you know me well enough, FB me if you have a question/concern. :)

Don't expect me to be online 24/7 until summer. Contact me via FB if you feel it's urgent.


Proud member of ClrHome!

Spoiler For "My Projects! :D":
Projects:

Computer/Web/IRC Projects:
C______c: 0% done (Doing planning and trying to not forget it :P)
A_____m: 40% done (Need to develop a sophisticated process queue, and a pretty web GUI)
AtomBot v3.0: 0% done (Planning stage, may do a litmus test of developer wants in the future)
IdeaFrenzy: 0% done (Planning and trying to not forget it :P)
wxWabbitemu: 40% done (NEED MOAR FEATURES :P)

Calculator Projects:
M__ C_____ (an A____ _____ clone): 0% done (Need to figure out physics and Axe)
C2I: 0% done (planning, checking the demand for it, and dreaming :P)

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: [contest] MafiaBot
« Reply #29 on: August 17, 2012, 10:05:52 pm »
^^

Is there any possibillity to delete one's account??
Since I doubt the database goes with the bot it will probably switch over to all acounts deleted when its run for the contest(since he gave me the source I said I'd set up its own channel and run it from my server)
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y