|
jtrent Beginner
Joined: 22 Nov 2001 Posts: 18 Location: USA
|
Posted: Fri Dec 07, 2001 10:27 am
Greet all button help |
O.K. I used Zmud quite some time ago, and things were quite different. Now i'm using 6.22 and I would like to set up a greet/leave all button.
On my current mud, the who list changes. (not entirely, but enough, that I have not been able to do simple triggers to match)
e.g.
( 54 Ninja Werewolf ) Giant Person1 their title.
( 10 Trader Elf ) Person2 their title.
( 27 Thi/Sup Vampire ) Person3 their title.
( 27 Cle/Wri Elf ) Explorer Person4 their title.
( Castle Captain ) Person5 their title.
You see 5 players in the game.
With the level class race changes, or something else in their place, and players being able to have short descriptions that can go in front of their name if they choose. I have had no luck being able to get a trigger to recognize just the name. Even if I could have it set up so that the trigger did the same response on the first to words.
e.g.
push greet all button,
who
( 54 Ninja Werewolf ) Giant Person1 their title.
( 27 Thi/Sup Vampire ) Person2 their title.
You see 2 players in the game.
wave giant; wave person1; wave person 2; wave their
Also, Is there a way to set it so that it only activates when the button is pushed? Otherwise I dont believe it would work properly. e.g. You type who later on, see the list, then wave to everyone again. Or you push the greet all button, and it follows the script, as well as triggers the leave all button.
The mud is Continents, continents.cx:5050 if you want to look at the who list to get a better idea.
quote:
-J |
|
|
|
Toetag Magician
Joined: 10 Oct 2000 Posts: 356 Location: USA
|
Posted: Fri Dec 07, 2001 8:56 pm |
How about something like:
Trigger:
( (%n) (%w)*)*.
Command:
tell %2 Good to see you again.
Killing a fly on a friends forhead may not be overkill, use a hatchet to make sure the job is done.
Tested offline with 6.21 |
|
|
|
Drakus Beginner
Joined: 01 Nov 2001 Posts: 21 Location: USA
|
Posted: Sat Dec 08, 2001 12:11 am |
hi,
Is their a way to turn off pretitles so you wouldnt' see Giant, or Explorer??
If so you can just do this.
When you want to use the script turn it on.
e.g.
#alias hiall {nopretitle;#T+ hiall;who}
then have these triggers..
#Trigger {~(*~)} (%w)(*)} {wave %2} {hiall}
#Trigger {You see (%d) players in the game.} {#T- hiall;nopretitle}
I could be wrong, but i think this will work if you can get pretitle to turn off.
What this will do is when you type hiall, it will turn off pretitles (if possible) then type who, wave at all the players on the game, then when it triggers on there are x players in the game. it will turn off the script and also turn back on pretitles. This will keep it from firing later on when you type who.
If you cannot remove pretitles, then i am not sure exactly how you would do it since the (%w)would capture the pretitle and not the name of the person.
Any Guru's have any suggestions??
Drakus of Aardwolf
aardwolfmud.org 4000
Happy 5th Anniversary Aard! |
|
|
|
Drakus Beginner
Joined: 01 Nov 2001 Posts: 21 Location: USA
|
Posted: Sat Dec 08, 2001 12:13 am |
oh,
I think i made a syntax error on one of the triggers, instead of
#Trigger {~(*~)} (%w)(*)} {wave %2} {hiall}
try this instead.
#Trigger {~((*)~)} (%w)(*)} {wave %2} {hiall}
Drakus of Aardwolf
aardwolfmud.org 4000
Happy 5th Anniversary Aard! |
|
|
|
Craivus Novice
Joined: 24 Jan 2001 Posts: 47
|
Posted: Sat Dec 08, 2001 2:38 am |
It's quite impossible, and here's why. One word is like any other to zMUD -- it's a computer program. "Giant Person1 Blah Blah Blah" and "Person2 Blah Blah Blah Blah" mean the same thing. zMUD doesn't know, unless you specifically tell it through a string list or the like of names or pretitles, what the difference is. The word Bob is a name, but as far as zMUD is concerned, it might as well be a pretitle. See where I'm going with this?
The only solutions I can think of are to either a) turn off pretitles temporarily as has been suggested above, in which case you can simply take the first word after the close parenthesus, or b) make a string list of all possible pretitles, or one of all the people who you wish to say hi to.
All the pretitles would be preferable, because it is conceivable that if the pretitles can be more than one word (in which case you would simply have to use %pos, and couldn't check a specific word in the who string) that someone could put someone else's name in their title, and thus you would get confused.
*shrug* If you can make the pretitles temporarily go away or list all the possible pretitles, I'd be happy to give you some pointers with the coding :)
-Craivus |
|
|
|
jtrent Beginner
Joined: 22 Nov 2001 Posts: 18 Location: USA
|
Posted: Sun Dec 09, 2001 5:08 am |
Well I attempted what Drakus posted.
I ended up with an endless string, and no result.
However, I can get a list of players that are on, in a fairly straight column.
I tried shortening the triggers to basically (%w), that didnt work for me.
But I can get a list like the following -
You see:
person1
person 2
person 3
So any help would be appreciated.
-J |
|
|
|
jtrent Beginner
Joined: 22 Nov 2001 Posts: 18 Location: USA
|
Posted: Mon Dec 10, 2001 8:28 am |
I was writing another post, and the thought of logging came to mind.
Possibly some way when someone signs on, store name to a list.
And when they sign off remove their name from the list.
For the people on the mud before you got there, possibly echo the sign on
(and sign off if you should want to be selective of who is on the list?)
and make a hiall button, click the button, and you wave hello to everyone on the list.
login = (%w) has returned to our world.
logout = (%w) has left our world.
Or possibly an easier way to accomplish the same task?
-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 |
|
|
|
jtrent Beginner
Joined: 22 Nov 2001 Posts: 18 Location: USA
|
Posted: Sun Dec 16, 2001 2:47 am |
Ok. I have been playing around with this for quite some time now.
Here is what I have so far.
I have been able to isolate the names and acquire the trigger to recognize this.
#ALIAS hello {#t+ people;where}
#TRIGGER {Player locations:} {} "people"
#COND {(%w) *$} {hwave %1}
#COND {^Time:} {#t- people}
So, I type hello, then it sends where to the mud, I see Player locations:, which triggers the first condition. The trigger then waves at player1, but does not contnue to player2. 3, 4, etc.
Player1 the altar
Player2 above the altar
What I am trying to get is hwave player 1,2,3,etc until it sees Time, and turnes off the people class.
-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 |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Dec 16, 2001 7:45 am |
I don't believe you can effectively use State triggers for what you want to do. State triggers work more like saying look for a red bus. If I see one then look for a blue bus. If I see one look for a green bus. It won't see a blue bus while it is looking for a green bus. What you have now could work though. You have to remove the #COND {^Time:}, and put #IF ("%1"="Time:") {#T- people;#STATE 0} into your second condition. That way when it sees the blue bus it should keep looking. Of course I have not use the State triggers at all yet.
|
|
|
|
jtrent Beginner
Joined: 22 Nov 2001 Posts: 18 Location: USA
|
Posted: Sun Dec 16, 2001 8:07 am |
quote:
{^Time:}, and put #IF ("%1"="Time:") {#T- people;#STATE 0} into your second condition. That way when it sees the blue bus it should keep looking.
Should keep looking, but It fires on the first name and stops.
-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 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Dec 17, 2001 4:50 pm |
Anything dealing with "state" triggers should be posted on the beta forum since they haven't been incorporated in the public version yet. This problem should be fairly easy to solve without them, anyway.
#ALIAS hello {#t+ people;where}
#CLASS people
#TR {^(%w)} {#IF (%1 = "player" OR %1 = "You"} {} {#IF (%1 <> "Time"} {hwave %1} {#T- people}}} {} {notrig}
#CLASS 0
NOTE: You might need double quotes around the %1 in the #IF conditions, I'm not sure.
LightBulb
Edited to add notrig option and filter for You wave hello. As was pointed out on a similar trigger, this will trigger itself otherwise, leading to massive spam. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Dec 18, 2001 5:34 pm |
A better approach to avoiding spam might be to collect the names in a stringlist variable and wave hello to them all after the trigger is safely turned off. (Thanks, Iljhar)
#ALIAS hello {#VAR greetlist %null;#t+ people;where}
#CLASS people
#TR {^Player locations} {#T+ greetlist} {} {notrig}
#TR {^Time:} {#T- greetlist;#DELITEM greetlist Time;#FORALL @greetlist {hwave %i}}
#TR "greetlist" {^(%w)} {#ADDITEM greetlist %1}
#CLASS 0
LightBulb |
|
|
|
|
|
|
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
|
|