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
zanakobu
Beginner


Joined: 12 Oct 2002
Posts: 10
Location: Canada

PostPosted: Sat Oct 12, 2002 4:44 pm   

Random trigger
 
Allright, here is the problem. I need to make a trigger, so that when a person says heads. there is a 50% chance that i will emote heads, and a 50% chance i will say tails. i also need it for when they say tails. thanks.
Reply with quote
zanakobu
Beginner


Joined: 12 Oct 2002
Posts: 10
Location: Canada

PostPosted: Sat Oct 12, 2002 4:45 pm   
 
heh. that should be that i emote heads aswell, not i say heads. :P thanks.
Reply with quote
zanakobu
Beginner


Joined: 12 Oct 2002
Posts: 10
Location: Canada

PostPosted: Sat Oct 12, 2002 4:46 pm   
 
and that should be tails, not heads :(
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Oct 12, 2002 4:57 pm   
 
#TR {%w says Heads} {emote %if(%random(1,2) > 1, heads, tails)}
#TR {%w says Tails} {emote %if(%random(1,2) > 1, heads, tails)}

LightBulb
Senior Member
Reply with quote
zanakobu
Beginner


Joined: 12 Oct 2002
Posts: 10
Location: Canada

PostPosted: Sat Oct 12, 2002 5:05 pm   
 
thanks lightbulb, exactly what i needed
Reply with quote
zanakobu
Beginner


Joined: 12 Oct 2002
Posts: 10
Location: Canada

PostPosted: Sat Oct 12, 2002 5:42 pm   
 
ok having problems now, it is saying one way more than the others, how can i make it if the person says 'heads' it says tails 2/3 times. thanks.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Oct 12, 2002 8:26 pm   
 
quote:

ok having problems now, it is saying one way more than the others, how can i make it if the person says 'heads' it says tails 2/3 times. thanks.



Increase the max %random() value (in Lightbulb's post, that would be the number 2) to 3, and increase the > 1 part to > 2:

%random(1,3) > 2

li'l shmoe of Dragon's Gate MUD
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