MUD stands for Multi-User Display, but I think everyone pretty much uses as a name for a console RPG or role playing game. - cerin
MUD stands for Multi-User Display, but I think everyone pretty much uses as a name for a console RPG or role playing game. - cerin
PLay MystWind beta , within two years
Umm...
Just call rand() every time you need a random number...
Also, a common problem is not seeding the generator.
Stupid things pop singers say
"I get to go to lots of overseas places, like Canada."
- Britney Spears
"I love what you've done with the place!"
-Jessica Simpson upon meeting the Secretary of Interior during tour of the White House
Heres what I do:
You can have a random character by doing this:Code:while(1) { srand(time(NULL)); var = rand() % LIMIT; cout << var; }
Just make an array of string sthat the shopkeeper would say and call msg[rand() % NUMMESSAGES];Code:char string[5] = "abcde"; cout << string[rand() % 5];
That should make it a bit easier for you. Hope it helps.
-Blizz
This war, like the next war, is a war to end war.