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
Glinka
Wanderer


Joined: 20 Dec 2000
Posts: 53
Location: USA

PostPosted: Thu Jan 15, 2004 9:19 am   

Loops, Variables, etc...
 
Hi again,

Here's what i'm tryin to do...

I have this now..
Alias ss
value smile to %1 softly, with a wink...

I'd like to choose between 3 or 4 different
messages and run them sequentially..

so if i do..
ss Lilyth
ss Gwen
ss Litortha

id get three different end messages..like so

you smile at lilyth softly, with a wink..
you smile at gwen gently, eyes wide..
you smile at litortha Impishly, blushing softly

I can almost get them to work using a %random thing,
but it gives too many of the same messages in a row.

should i use variables?..or can you fire aliases from a main alias?

what would be best for variables..
%case, %item, %expandlist, #forall ?


sorry..kinda sleepy, can't think.

Thanx for any..
G.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Jan 15, 2004 2:25 pm   
 
%random should work. Getting too many of the same in a row is just a statical probability that may happen from time to time, even more so if your list of messages is short. If you want to lower this chance a bit, then add some duplicates of each message in random order. For example, suppose your messages are A, B, and C, then you could create the list of possible messages like:
B, C, A, B, A, C, A, C, B

Since each message appears the same number of times, they all still have the same probability of being selected. However, since the list is bigger, you get less problems from rounding.
Reply with quote
Glinka
Wanderer


Joined: 20 Dec 2000
Posts: 53
Location: USA

PostPosted: Fri Jan 16, 2004 2:29 am   
 

Great idea, thanks, i'll try it!
G.
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