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


Joined: 22 Nov 2001
Posts: 18
Location: USA

PostPosted: Mon Dec 10, 2001 7:54 am   

Variable/trigger help
 
quote:

Do something like this:

Create a stringlist with various greetings:

#var greetlist "Hey!|Hiya!|Glad to see you back!"

Then create a trigger for people when they enter.

Trigger: ^%w enters the game.
Action: ooc %item(@greetlist,%random(%numitems(@greetlist)))

This trigger assumes that people can only have one name, like:

Joe enters the game.

and not:

Billy Joe Bob enters the game.


A simple trigger, but it gets the job done :)

Iljhar





I set it up, and it worked great for me.
Trigger:
(%w) has returned to our world.
Action:
%item( @greetlist, %random( %numitems( @greetlist))) %1


I have been trying some variations, and I have been unsuccessful in correlating it with a block list.

Some people like getting the random greetings, and others would rather not.

#if (ismember(%1, @block)) {True} {sigh}

Something similar to the above? And then just put all person(s) in the block variable.
What I would like to have is it reference with a friendlist, enemylist, and a block list.

So-

(%w) has returned to our world.

It would then check %w with the friendlist, enemylist, and block list.

If block, nothing happens, if friend then use greetlist1, if enemy use greetlist2.

Any help would be greatly appreciated.

-J

The system doesn't really work, it can't be fixed,
no one understands it, no one is in charge of it,
it can't be lived without, and it gets worse every year.
- Stewart Brand
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Dec 10, 2001 6:31 pm   
 
#TR {^(%w) enters the game.} {#IF (%ismember(%1,@friendlist)) {say %item(@greetlist1,%random(%numitems(@greetlist1))) %1} {#IF (%ismember(%1,@enemylist)) {say %item(@greetlist2,%random(%numitems(@greetllist2))) %1} {#IF (ismember(%1,@blocklist)) {} {#beep;say Hi, %1! I haven't seen you before, are you new here?}}}}

You didn't have a channel command, so I used "say", this can easily be changed to ooc, ic, gossip, chat, etc. as appropriate. I put a conversation starter at the end for those people who aren't on any of your lists.

LightBulb
Reply with quote
jtrent
Beginner


Joined: 22 Nov 2001
Posts: 18
Location: USA

PostPosted: Tue Dec 11, 2001 6:14 am   
 
Thanks, That did the trick. Actually, I didnt have a speach channel specified. I was using emotes in the greetlists.

Here it is complete, should someone else like to use/expand upon it further.

#VAR friendlist {"Person"|"Person"|"Person"|"etc"}
#VAR enemylist {"Person"|"Person"|"Person"|"etc"}
#VAR blocklist {"Yourself"|"Person"|"Person"|"etc"}

You put yourself in the blocklist, unless you like to give yourself a random greeting every time you signon.

#VAR greetlist1 {"happy"|"bow"|"beam"|"bpat"|"beer"|"bearhug"|"etc"}

#VAR greetlist2 {"eyebrow"|"bow"|"beam"|"sigh"|"snowball"|"tip"|"etc"}

#TRIGGER {(%w) has returned to our world.}
{#IF (%ismember( %1, @friendlist)) {%item( @greetlist1, %random( %numitems( @greetlist1))) %1};#IF (%ismember( %1, @enemylist)) {%item( @greetlist2, %random( %numitems( @greetlist2))) %1};#IF (%ismember( %1, @blocklist))}


-J

The system doesn't really work, it can't be fixed,
no one understands it, no one is in charge of it,
it can't be lived without, and it gets worse every year.
- Stewart Brand
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