Off-topic

Off-topic

I made a DBD Skillcheck machine

This snippet of Python will "trigger" a "Skillcheck" based on random odds. The odds here are 2/8 chances for a Skillcheck

Source:

#dbd skillcheck odds machine

#Importing modules

import random

from time import sleep

#Setting up odds and timer. 1 is skillcheck and 0 is not

odds= ["1", "0", "0", "0", "1", "0", "0", "0", "0", "0"]

#The Odds of a skillcheck/second is 2/8

timer= []

#Loop at 1/sec for 80 seconds

while (len(timer)) != 80:

  timer.append(len(timer))

  sleep(1)

  sc=random.choice(odds)

  if sc == "0":

    print ("You did not get a skillcheck")

     

  else:

    print ("You got a skillcheck")

Welcome to BHVR Forums

Please sign in to join in the discussions.

Comments

Welcome to BHVR Forums

Please sign in to join in the discussions.

Welcome to BHVR Forums

Please sign in to join in the discussions.