 |
godzilla1 Beginner
Joined: 14 Jul 2005 Posts: 22 Location: Budapest
|
Posted: Sat Jul 30, 2005 5:44 pm
#sub/#psub |
Ive had this trigger:
#TRIGGER {({@grouplist})(%q)} {#SUBSTITUTE {%if( "%1", "%1"" [F"%ismember( "%1", @grouplist)"]")%2}} "path" {case}
It substitues a groupmember name to name [F1] etc.
If there are more names in one line, it substitue each one. The problem is, if there are too many names (names fill an entire line, and start a new one) then some infinite loop start. It is probably something bug in zmud.
Ive had other triggers like this:
#TRIGGER {^(*) seems weaker.} {#IF (%ismember( %1, @grouplist)) {#SUBSTITUTE {"** "%1" seems weaker. (str"%ismember( %1, @grouplist)") **"};#COLOR grey}} "path"
These works together well, if i have a line like this:
Name seems weaker. -->> ** Name [F1] seems weaker. (str1) **
I made a new substitute instead of first one for avoid loop on more lines of names:
#TRIGGER {({@grouplist})(%q)} {#PSUB "%1 [F"%ismember( "%1", @grouplist)"]" %x1} "Group|groupmembers" {case}
This trigger does the same: substitute to Name [F1], and this trigger is always active.
With the other triggers i get substitued messages like this:
Name seems weaker. -->> Nameame [F1] ame [F1] seems weaker (str1)eemsweaker.
Can you tell me an example pls how to modify this trigger, for work together with psub one?
#TRIGGER {^(*) seems weaker.} {#IF (%ismember( %1, @grouplist)) {#SUBSTITUTE {"** "%1" seems weaker. (str"%ismember( %1, @grouplist)") **"};#COLOR grey}} "path" |
|
|
 |
godzilla1 Beginner
Joined: 14 Jul 2005 Posts: 22 Location: Budapest
|
Posted: Sun Jul 31, 2005 7:26 am |
Or at least tell me, why zmud crash if i use this trigger and there are a full line of names + 1 more name:
#TRIGGER {({@grouplist})(%q)} {#SUBSTITUTE {%if( "%1", "%1"" [F"%ismember( "%1", @grouplist)"]")%2}} "path" {case} |
|
|
 |
godzilla1 Beginner
Joined: 14 Jul 2005 Posts: 22 Location: Budapest
|
Posted: Sun Jul 31, 2005 9:12 am |
Well, this seems to work:
#TRIGGER {^({@grouplist})*seems weaker.} {#PSUB "** %1 seems weaker (str"%ismember(%1,@grouplist)")**" 0 %abs( %len( %line)+3)} |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Jul 31, 2005 2:05 pm |
There's a bug with #SUBSTITUTE (dunno if it applies to #PSUB) that involves wordwrapping. Basically, it works correctly and without flaw when the line doesn't wrap. It's not fixable by any script or workaround we players might be able to come up with, so we have to wait on Zugg to do it.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
godzilla1 Beginner
Joined: 14 Jul 2005 Posts: 22 Location: Budapest
|
Posted: Sun Jul 31, 2005 7:32 pm |
QUESTION:
I have these triggers:
#TRIGGER {(*) steps aside as ({@grouplist}) attempts a bash, stumbles, and falls flat on his face.} {#PSUB "%2 >>failed bash>>%1 |||||||%2 --------||||FAILED BASH" 0 %abs( %len( %line)+4);#COLOR 12;#IF (@state%2.11=1) {state%2.1=1} {state%2.1=2}} "path"
#TRIGGER {(*) steps aside as ({@pklist}) attempts a bash, stumbles, and falls flat on his face.} {#PSUB "%2 >>failed bash>>%1 |||||||%2 --------||||FAILED BASH" 0 %abs( %len( %line)-1);#COLOR 10;#IF (@state%2.11=1) {state%2.1=1} {state%2.1=2}} "path"
Also have tehse triggers:
#TRIGGER {({@grouplist})(%q)} {#PSUB "%1 [F"%ismember( %1, @grouplist)"]" %x1} "path" {case}
#TRIGGER {({@pklist})(%q)} {#PSUB %ansi(high,white)"%1 (p"%ismember( %1, @pklist)")" %x1} "path" {case}
You can notice: I basically have the same trigger twice. Once with @grouplist, once with @pklist.
Why does it substitue to
Name2 >>failed bash>>Name1 |||||||Name2 --------||||FAILED BASH
if name2 member of @grouplist and
Name2 >>failed bash>>NamName2 (p1) |||||||Name2 --------||||FAILED BASH
if name 2 member of @pklist?
edited----
Hmm. Restarted zmud, now it works. |
|
|
 |
|
|
|
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
|
|