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


Joined: 31 May 2004
Posts: 54
Location: USA

PostPosted: Tue Jun 08, 2004 12:43 pm   

Can this be done?
 
zMUD 7.05

First off, I run 3 characters simultaneously.
I want to make a script that will activate when someone enters the room.
The script will greet the person with 1 out of 5 greetings.
2 of the greetings are blank, so there is a chance to not greet them.

This is where I question the ability to do this.
I want all 3 of my characters to be able to greet the person, but I don't want any 2 of them greeting the same person at the same time.

Note: Since multiple people can enter the room at the same time, of course I want the script to disable itself for 30 seconds, afterwards it will reactivate.

-- Mini-Scenario -- !NOTE! This is what I would like to see if I am watching MyCharacter#3's Screen.

The following will activate script: (Can probably be made into 1 trigger)
<Person> arrives from the <north,east,south,west,northeast,northwest,southeast,southwest>.
<Person> arrives from <above/below>.
<Person> flies in from the <north,east,south,west,northeast,northwest,southeast,southwest>.
<Person> flies in from the <above/below>.
<Person> floats in from the <north,east,south,west,northeast,northwest,southeast,southwest>.
<Person> floats in from the <above/below>.

Scenario:

<Person> arrives from the southeast.

MyCharacter#2 says to <Person>, 'GreetMessage'

<Person> flies in from the north.

Nothing. (Helps to prevent spam)

<Person> arrives from below.

MyCharacter#1 greets <Person> warmly. (Social, Greet <Person>)

<Person> arrives from the east.

MyCharacter#2 says to <Person>, 'AnotherGreetMessage'

Any help appreciated,
~Zener
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Jun 08, 2004 6:25 pm   
 
#TR {^(%w) {arrives|flies in|floats in} from} {#CASE %random {:MyCharacter~#1:sayto %1 GreetMessage} {:MyCharacter~#2:sayto %1 GreetMessage} {:MyCharacter~#1:greet %1 warmly} {:MyCharacter~#2:greet %1 warmly} {#NOOP} {#NOOP}}
#COND {} {} {Wait:Param=30000}
Reply with quote
Zener
Wanderer


Joined: 31 May 2004
Posts: 54
Location: USA

PostPosted: Tue Jun 08, 2004 8:54 pm   
 
Thank you LightBulb, works perfectly, after some adjustment to the %random choices.
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