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
slazza
Newbie


Joined: 13 Mar 2011
Posts: 4

PostPosted: Sun Mar 13, 2011 3:26 pm   

#gag related question
 
Hi, In another post i found help on using the #gag command, tho I cant seem to get it right.

I'm playing on duris and would like to make a gag for sailing. Namely to gag the docked ships.

docked ship: [**] Blood Feast X:53 Y:46 R:4.7 B:152 H:0 S:0 |RFD

sailing ship: [IJ] Forked Fury X:24 Y:69 R:32.5 B:306 H:315 S:36 |RR

so I tried #trigger {[**]} {#gag}, but that seems to gag the sailing ships aswell ([IJ] in this example)

Any ideas? Thanks
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Mar 13, 2011 5:11 pm   
 
* is a wildcard. [] is also a special pattern-matching construct, which allows the use of wildcards. You need to escape each character with the quote character, which is the tilde (~) by default. Thus, [**] becomes ~[~*~*~].

If you are not using any other wildcards in the trigger pattern, you can alternatively use the Verbatim trigger option instead of the quote characters.
_________________
EDIT: I didn't like my old signature
Reply with quote
slazza
Newbie


Joined: 13 Mar 2011
Posts: 4

PostPosted: Tue Mar 15, 2011 6:46 am   
 
Ah nice, it worked, thanks Matt ...

Now the next issue, I'm trying to make an alias to enable/disable it .. and of course i can't seem to get it to work.

This is what i did: Made new trigger, Pattern: ~[~*~*~] and Value: #gag .. which works fine.

Then I made an alias named dockoff and value:
#t- ~[~*~*~]
#ECHO ==========================DOCKED SHIPS SHOWING===========================

and one named dockon with value:
#t+ ~[~*~*~]
#ECHO ==========================DOCKED SHIPS HIDDEN===========================

But like i said, that doesnt seem to work (using 7.21 btw) I'm fairly new to making triggers like this so if you could speak noob would appreciate :P Laughing
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Tue Mar 15, 2011 10:53 am   
 
Give the trigger an ID name.
Then use the ID instead of the pattern in the #T+/- commands.
_________________
Discord: Shalimarwildcat
Reply with quote
slazza
Newbie


Joined: 13 Mar 2011
Posts: 4

PostPosted: Thu Mar 24, 2011 2:42 pm   
 
Perfect! works a charm. Thanks alot guys, appreciate it :)
Reply with quote
slazza
Newbie


Joined: 13 Mar 2011
Posts: 4

PostPosted: Thu Mar 31, 2011 2:19 pm   
 
Heh I'm back with another dilemma, this one might not be possible tho ...

Still to do with ships, when at docks you see all the ships that are docked there. Now this one dock at our hometown has so many ships (60+, most are never used) that it totally spams you and you can't see the map without scrolling up.
Now I wanted to make a trigger (that i can turn on/off) to gag them.

So it sorta looks like this:

The Yacht Za Kraken floats here.
The Caravel hello floats here.
The Sloop Morning Star floats here.
The Sloop hite/Black floats here.
The Galleon Willy Wonka floats here.
etc etc .. 60+ of these.

Problem is that I can't enter the entire list into the pattern section (or can i?). Is the only way to make like 60+ separate triggers? If so can't really turn them on/off with a single command hm. Or at least make ones that deal with the part that says "The Galleon" and "floats here".

Anywho thought i'd ask, still trying to learn so am sorry :)
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Thu Mar 31, 2011 5:09 pm   
 
You can actually, lists of items can be inserted into a pattern via {this|that|the other|etc} or {@varList}.
But unless you need to save the boat data for something, you don't need to take that step, use wildcards instead.

#TR "boatGag" {^The * floats here.$} {#GAG}

That should work, then just use the following to turn it on and off.

#T+/- boatGag
_________________
Discord: Shalimarwildcat
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