|
slazza Newbie
Joined: 13 Mar 2011 Posts: 4
|
Posted: 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 |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
slazza Newbie
Joined: 13 Mar 2011 Posts: 4
|
Posted: 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 |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
slazza Newbie
Joined: 13 Mar 2011 Posts: 4
|
Posted: Thu Mar 24, 2011 2:42 pm |
Perfect! works a charm. Thanks alot guys, appreciate it :)
|
|
|
|
slazza Newbie
Joined: 13 Mar 2011 Posts: 4
|
Posted: 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 :) |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
|
|