Cmud room name/description window management - hud (script)

From Elanthipedia
Jump to navigation Jump to search
Cmud room name/description window management - hud (script)
Category utility,hud
Front-end cmud
Author Tirsten


General Information

This script will gag the roomname/description/also here etc and populate a custom window with that information

Front end: Cmud

The Script population portion

<class name="room" id="36">
  <trigger priority="40" id="4">
    <pattern>^~[(*)~]$</pattern>
    <value>#gag
      #win roomdesc %line
      </value>
    <trigger>
      <pattern>^(*)$</pattern>
      <value>#gag
        #win roomdesc %line
        </value>
    </trigger>
  </trigger>
  <trigger priority="60" id="6">
    <pattern>^Obvious {paths|exits}: (*).$</pattern>
    <value>#gag
      #win roomdesc %line
      </value>
    <trigger name="asdfasdf" type="Within Lines" param="1">
      <pattern>^Placed around the interior, you see:</pattern>
      <value>#gag
        #win roomdesc %line
        </value>
    </trigger>
  </trigger>
  <trigger priority="80" id="8">
    <pattern>^Also here: </pattern>
    <value>#gag
      #win roomdesc %line
      </value>
  </trigger>
</class>

The Script colorization portion these scripts run inside the window created

<trigger priority="140" id="14">
  <pattern>^Obvious {paths|exits}: (*).$</pattern>
  <value>#CO cyan</value>
  <trigger type="Within Lines" param="1">
    <pattern>^Placed around the interior, you see:</pattern>
    <value>#CO red</value>
  </trigger>
</trigger>
<trigger priority="120" id="12">
  <pattern>^~[(*)]$</pattern>
  <value>#CO green</value>
  <trigger>
    <pattern>^(*)$</pattern>
    <value>#CO silver</value>
  </trigger>
</trigger>