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")
Comments
-
Me reading this while confused on what the ######### this even is
0 -
What coding language are you using? JavaScript, Python, and so on?
1 -
Is this meant to just be a tool for practice?
0 -
Ehh just wanted to see how well I could emulate it
1 -
If you read the post you would see the word Python
0 -
Why 2/8 instead of 1/4?
0 -
Because I felt like it XD
0