Ansi colour in trigger

Post Reply
Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Ansi colour in trigger

Post by Nyyrazzilyss »

I need to add ansi colours to some triggers.

In cmud, for example, I have the following trigger:

*group-*'%e[1;36mI've rolled a 100 sided dice 1 times, the total result is: %e[1;34m(%d)%e[0m'$

The main thing i'm concerned with is picking up the display being in a defined colour, and not normal text. Could someone post an example of a similar trigger in mudlet? Thanks.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Ansi colour in trigger

Post by Vadi »

Here's an example:

Image

User avatar
SlySven
Posts: 1023
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Ansi colour in trigger

Post by SlySven »

Please be aware that there is a problem bug 1103545 with the colour trigger part of the above dialogue that causes problems for dark (normal) Cyan Foreground colour (ANSI Escape Code: "<Esc>[0;36m") and light (bright) White Foreground colour (ANSI Escape Code: "<Esc>[1;37m") which goes back to version 1.0 IIRC and is present in at least the 2.1 release. Though, as you are looking for Light Cyan you should be OK. I found this when I tried to process Room Names for a DikuMud derivative that happened to reserve that colour for that (and the global comms. from Immortals). ..

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: Ansi colour in trigger

Post by Nyyrazzilyss »

Thanks, got it working.
Attachments
dicepic.png

Post Reply