Random Chance and Number Generator - Batch File Tool
Uploader Comments (ScrewTheLotOfYou)
All Comments (21)
-
:RC1
cls
echo Good Luck!
set /a chanceVar= %random% %% %3%
set /p chanceVar= %random% %% %2%
if /i %chanceVar% lss %2% goto You Win
if /i %chanceVar% lss %1% goto You Win
if /i %chanceVar% lss %3% goto You Lose
this is the code I have but it always goes to you win did i do something wrong? if you can, plz try it out
-
@ScrewTheLotOfYou Wher did you learn batch? Please answer quickly!!
-
Hey man, thanks for the tutorial. I think it's cool how you have your own website and everything where you've made some games. But anyway, I used your random number generation to help me in this game I'm making called Dwarven Seige. I used the number generator to estimate critical strikes in battle.
-
is there any way to make a batch file type on other things besides the cmd? like if iw anted it to type google it could do that :o?
-
Fuu, no matter what I write, it says either "Enter numerator" or "Enter the minimum value the number can take"
-
SUBSCRIBE! :D
-
I'm gonna use this as a map generator in a video game mod :)
I'm also making a random maze generator too, again this is useful.
-
@ScrewTheLotOfYou give me code
-
@ScrewTheLotOfYou Thank you very much! I'm going to make a tic tac toe batch file game and then i need
to know if naught's or cross' start :)
-
2:38 u skipped a 1
I made a "guess the number" game. But i use %random% to get the number.. how do i set a range from like 1-150? can you even do that? please help. Not from a begining coder either. somebody who knows what they are saying
sparkytycoon 2 years ago
Yes you can, to generate a number from 1-150 in a batch file do this:
set /a RandomNumber= %random% %% 150 + 1
ScrewTheLotOfYou 2 years ago 3
Awesome Video 5/5
Also I downloaded a most of your batch files off your site. They're beast!!
One question though. How do you find enough time to right them, and how do you know all those more complex codes?
ClanUPKxLeader 2 years ago
Thank you! :D
Believe it or not it doesn't take that long to write them! In general it'll take a week to write one from scratch. I only write them at nights after a day working.
I don't know any special codes, it's all standard batch code. I just try lots of different things :)
ScrewTheLotOfYou 2 years ago
great video, you really are skilled with batch
higginsiv 3 years ago
Thanks very much! :)
ScrewTheLotOfYou 3 years ago