a guest Jan 24th, 2020 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import discord, os, time, random
  2. roles = ["Werewolf", "Sherif", "Wizard", "Damned", "Alpha Werewolf", "Seer", "Soldier", "Werewolf Seer", "Werewolf"]
  3. random.shuffle(roles)
  4. print("availeble roles: ",roles)
  5. speelers = []
  6. players= []
  7. i = 0
  8. running = False
  9. client = discord.Client()
  11. @client.event
  12. async def on_ready():
  13.     print('We have logged in as {0.user}'.format(client))
  15. class Players():
  16.     def __init__(self, nummer, user):
  17.         self.nummer = nummer
  18.         self.role = roles[nummer]
  19.         self.hashtacknummer = user
  20.         print(self.nummer, print(user), "=", self.role)
  22. async def Creategame(message, gamestate):
  23.     global running
  24.     if not in speelers:
  25.         running = True
  26.         await"Type $join to join")
  28. async def Playerjoin(message):
  29.     global i
  30.     if not in speelers:
  31.         speelers.append(
  32.         await"{0} Joined the hunt".format(
  33.         players.append(Players(i+1,
  34.         print("player",i+1,"has been created.")
  35.         i+=1
  37. async def Startgame(message, gamestate):
  38.     global running
  39.     if in speelers:
  40.         running = "In Progress"
  41.         await"Starting the game in 10 seconds")
  42.         time.sleep(5)
  43.         await"5")
  44.         time.sleep(1)
  45.         await"4")
  46.         time.sleep(1)
  47.         await"3")
  48.         time.sleep(1)
  49.         await"2")
  50.         time.sleep(1)
  51.         await"1")
  52.         time.sleep(1)
  53.         await"Let the hunt\n     **begin**")
  54.         for i in players:
  55.             await i.hashtacknummer.send(f"You are a **{i.role}**")
  56.             if i.role == "Werewolf":
  57.                 await i.hashtacknummer.send("Your job is to kill all the Non-Werewolfs.\nTo talk to other Werewolfs use the private Werewolf chat.\nEvery night you wil get a chance to vote who to kill.(only 1 kill per night in total).")
  58.             elif i.role == "Sherif":
  59.                 await i.hashtacknummer.send("Your job is to kill all the bad guys.\nYou can only shoot once every two turn.s\nWhenever you shoot someone Everyone will know.")
  60.             elif i.role == "Wizard":
  61.                 await i.hashtacknummer.send("Your job is to assist the Humans, and to stop the Non-Humans.\nYou can once choose a potion to give a person a extra live.\nAnd you can give a bad person a potion that makes them skip a day/night.")
  62.             elif i.role == "Damned":
  63.                 await i.hashtacknummer.send("Aww to bad as a Damned there isnt mutch to do.\nAt first you are a human and you wil sta a human until attacked.\nIf you do get atacked you wil turn into a Werewolf.")
  64.             elif i.role == "Alpha Werewolf":
  65.                 await i.hashtacknummer.send("Your job is to kill all the Non-Werewolfs.\nTo talk to other Werewolfs use the private Werewolf chat.\nAt night you are just the same as a normal Werewolf but you have twice the vote power(at night).")
  66.             elif i.role == "Seer":
  67.                 await i.hashtacknummer.send("Your job is to instpect all people and expose the Werewolfs.\nEvery night you can inspect 1 person and it will tell you who they are.\nIf you die in any way you wont be able to tell who you inspected.")
  68.             elif i.role == "Soldier":
  69.                 await i.hashtacknummer.send("Your job is to protect all the people against any threats.\nEveryday you can choose 1 person to protect, if you protect them you will take a hit for them.\nFor you to die you will need to be hit twice.\nIf you do not choose anyone to protect you will have a 1 in 4 chance to kill your weakest attacker and live.")
  70.             elif i.role == "Werewolf Seer":
  71.                 await i.hashtacknummer.send("Your job is to kill all the Non-Werewolfs.\njust like a normal seer you can see peoples class, whenever you do every wolf in the game gets that info.\nYou can also vote at night who to kill.(like a normal Werewolf)")
  72.             else:
  73.                 await i.hashtacknummer.send("No description made yet")
  75. @client.event
  76. async def on_message(message):
  77.     global running, speelers, i
  78.     if is not client.user and ( == False):
  79.         if message.content.startswith('$start') and running == False:
  80.             await Creategame(message, running)
  81.         elif message.content.startswith('$start') and running == True:
  82.             await Startgame(message, running)
  83.         elif message.content.startswith('$join') and running == True:
  84.             await Playerjoin(message)
  85.         elif running == "In Progress":
  86.             for j in players:
  87.                 if j.hashtacknummer == and j.role == "Werewolf" or "Werewolf Seer" or "Alpha Werewolf" or "Damned":
  88.                     WWmessage = message.content
  89.                     channel = client.get_channel(668781270213591040)
  90.                     await channel.send(WWmessage)
  91.                     print(WWmessage, j.hashtacknummer,, j.role)
  92.         elif message.content.startswith('$test'):
  93.             await Creategame(message, running)
  94.             await Playerjoin(message)
  95.             await Startgame(message, running)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand