|
Quit Wanderer
Joined: 19 Jul 2008 Posts: 59
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sat Aug 28, 2010 4:41 pm |
The ANSI color probably changed related to bug fixes.
To fix this, make a copy of your trigger. Then copy one of the lines from the MUD that you want to match from the MUD window and paste it into the Pattern window in the copy of the trigger. This will show you any ANSI code the MUD is sending. Then post the resulting Pattern into this forum and we can help you update your pattern to match it. |
|
|
|
Quit Wanderer
Joined: 19 Jul 2008 Posts: 59
|
Posted: Sat Aug 28, 2010 4:59 pm |
Room example: {rname}The Aardwolf Plaza Hotel (G)
This is my old trigger that use to work:
Code: |
^~{rname~}(%e~[[%d;]m)(*)%e~[0m(*)$ |
This is a new trigger with ansi on:
Code: |
^%e[37m{rname}%e[1;32mThe Aardwolf Plaza Hotel (G)%e[0m$ |
I did try but with out any luck:
Code: |
^%e[37m~{rname~}%e[1;32m(*)%e[0m$ |
This is all I got.
Made by MattLofton
Code: |
<trigger priority="30" id="29">
<pattern>^~{rname~}(%e~[[%d;]m)(*)%e~[0m(*)$</pattern>
<value>#PSUB "" 0 6
Rexits = %replace(%1," ","|")
#local $color $exits
$exits = %1
#forall "north|south|east|west|up|down|other|none" {
#switch (%i = "none") {$color = "8"}
(%i = "other") {$color = "deeppink"}
(1) {$color = ""}
$exits = %replace($exits,%i,%concat("",%i,""))
}
#tag exit %1
#PSUB $exits %x1
CurVnum = %roomnum()</value>
<trigger>
<pattern>^~{coords~}([%d~,-])</pattern>
<value>#nomap
#local $x $y $notes
Rcoords.x = ""
Rcoords.y = ""
#if (%1 != "-1") {#call %match(%1,"(%d),(%d),(%d)",@Rcontinent,$x,$y)}
#switch (%zonename() = "Continent of Mesolar") {
Rcoords.x = $x
Rcoords.y = $y
#if (%concat("0,",$x,",",$y) != %roomnote()) {
//#location @FindRoomByCoords("The Continent of Mesolar")
}
#sub %concat(%t1,%t2,%ansi(8)," (",@Rcontinent,",",@Rcoords.x,",",@Rcoords.y,")")
}
(%zonename() = "The Southern Ocean") {
Rcoords.x = $x
Rcoords.y = $y
#if (%concat("1,",$x,",",$y) != %roomnote()) {
//#location @FindRoomByCoords("The Southern Ocean")
}
#sub %concat(%t1,%t2,%ansi(8)," (",@Rcontinent,",",@Rcoords.x,",",@Rcoords.y,")")
}
(%zonename() = "Gelidus") {
Rcoords.x = $x
Rcoords.y = $y
#if (%concat("2,",$x,",",$y) != %roomnote()) {
//#location @FindRoomByCoords("Gelidus")
}
#sub %concat(%t1,%t2,%ansi(8)," (",@Rcontinent,",",@Rcoords.x,",",@Rcoords.y,")")
}
(%zonename() = "The Dark Continent, Abend") {
Rcoords.x = $x
Rcoords.y = $y
#if (%concat("3,",$x,",",$y) != %roomnote()) {
//#location @FindRoomByCoords("The Dark Continent, Abend")
}
#sub %concat(%t1,%t2,%ansi(8)," (",@Rcontinent,",",@Rcoords.x,",",@Rcoords.y,")")
}
(%zonename() = "Alagh, the Blood Lands") {
Rcoords.x = $x
Rcoords.y = $y
#if (%concat("4,",$x,",",$y) != %roomnote()) {
//#location @FindRoomByCoords("Alagh, the Blood Lands")
}
#sub %concat(%t1,%t2,%ansi(8)," (",@Rcontinent,",",@Rcoords.x,",",@Rcoords.y,")")
}
(%zonename() = "The Uncharted Oceans") {
Rcoords.x = $x
Rcoords.y = $y
#if (%concat("5,",$x,",",$y) != %roomnote()) {
//#location @FindRoomByCoords("The Uncharted Oceans")
}
#sub %concat(%t1,%t2,%ansi(8)," (",@Rcontinent,",",@Rcoords.x,",",@Rcoords.y,")")
}
(%zonename() = "Vidblain, the Ever Dark") {
Rcoords.x = $x
Rcoords.y = $y
#if (%concat("6,",$x,",",$y) != %roomnote()) {
//Curloc = @FindRoomByCoords("Vidblain, the Ever Dark")
}
#sub %concat(%t1,%t2,%ansi(8)," (",@Rcontinent,",",@Rcoords.x,",",@Rcoords.y,")")
}
(1) {
#sub %concat(%t1,%t2,%ansi(8)," (",@Rcontinent,",",%zonename(),")")
}</value>
</trigger>
</trigger>
|
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sat Aug 28, 2010 5:07 pm |
You need to make sure your trigger has the ANSI option enabled for it. I did a test and with the ANSI Trigger option turned on, your new pattern seemed to work for me here.
The reason your original trigger stopped working is because of the ^ at the beginning of the trigger, prevent it from matching the ESC[37m at the beginning of the line. The missing ESC[37m was a bug in previous versions.
Not sure how your ANSI option got turned off unless that happened when you were creating the new trigger. |
|
|
|
Quit Wanderer
Joined: 19 Jul 2008 Posts: 59
|
Posted: Sat Aug 28, 2010 6:04 pm |
yes it works now :)
but I find out that the #Find does nothing or it can't find any rooms
I did a reconfigure after I got the trigger to work again |
|
|
|
|
|
|
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
|
|