vendredi 25 janvier 2019

Choose more words in a token

I am trying to make a random event that chooses from a list of words and sentences. Whenever the event happens it only displays the first word in every line. How do I make it so that it will display the entire line?

Here is the batch file.

set /a groceryrandom=%random%%%16
for /f "tokens=1,2" %%a in (groceryevents.txt) do if %groceryrandom%==%%a echo %%b

Here is the text file its referencing

1 Nothing
2 Nothing
3 "You have gained 1 survivor!"
4 Nothing
5 Nothing
6 "You have lost 1 survivor!"
7 Nothing
8 Nothing
9 "You have gained 1 survivor!"
10 Nothing
11 Nothing
12 "You have found 1 weapon!"
13 Nothing
14 Nothing
15 "You have found 5 ammo!"




Aucun commentaire:

Enregistrer un commentaire