Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Minsk192
Newbie


Joined: 02 Mar 2002
Posts: 7

PostPosted: Sat Mar 02, 2002 1:56 am   

Help making a game
 
I need help. how would i generate a random number when someone activated my trigger?
Example: If someone says 'I pick number 3'
I would say a random number 1-10.

-~~~===|!!MINSK!!|===~~~-
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Sat Mar 02, 2002 2:20 am   
 
I suppose you need it stored any number of ways. So I will write it that way.

#VAR PlayerPick {}
#VAR SystemPick {}
#TR {I pick number (%d)} {PlayerPick=%1;SystemPick=%random(1,10);#IF (@PlayerPick!=@SystemPick) {#SEND You lose the number was @SystemPick.} {#SEND Wow your good, you got my number.}}

Thanks for playing Elmo's Guessing Game.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net