|
avatarius79 Newbie
Joined: 07 May 2010 Posts: 3
|
Posted: Fri May 07, 2010 4:35 am
Trigger Multiline Room Description w/o exits |
Hi,
i want to trigger only some lines out of the room descritption w/o the exits, and only the "uppercase" words...(i´m playing on a german mud btw.)
Here´s an example of a Room with prompts etc.
> look
You are in a huge Room with some nice Pictures.
In the left Wall is an opening.
On the right Wall is a big Hole.
Exits: west and east.
>
i just want to trigger the uppercase words between >look and Exits:
and save them into a string list (that only the uppercase words are in the list)
any tips / ideas ?
Ava
PS: sorry for my very bad english :) |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri May 07, 2010 5:25 pm |
You said the room as no exits though? I'm confused. In any case, something like this should work:
Code: |
<class name="Room Gather" id="52">
<trigger name="room-desc-on" priority="480" id="48">
<pattern>> look</pattern>
<value>#T+ room-desc-gather</value>
</trigger>
<trigger name="room-desc-gather" priority="490" enabled="false" id="49">
<pattern>(*)</pattern>
<value>#LOCAL $_params
#IF (%trigger!="> ") {
$_params=%replace( %trigger, ".", "")
$_params=%replace( $_params, ",", "")
$_params=%replace( $_params, ";", "")
$_params=%replace( $_params, "'", "")
$_params=%replace( $_params, """, "")
$_params=%replace( $_params, ":", "")
$_params=%replace( $_params, ">", "")
$_params=%replace( $_params, " ", "|")
}
{#T- room-desc-gather}
#WINDOW Test $_params
#IF ($_params!=%null) {#FORALL $_params {
$_str_mod=%i
$_str_first=%left( $_str_mod, 1)
$_str_mod=%right( $_str_mod, 1)
$_str_first=%upper( $_str_first)
$_str_mod=%concat( $_str_first, $_str_mod)
#WINDOW Test %i" and "$_str_mod
#IF ($_str_mod=%i) {#VAR _room_list %additem( %i, @_room_list)}
}}</value>
</trigger>
<var name="_room_list" type="StringList" id="50">You|Room|Pictures|In|Wall|On|Wall|Hole|Exits</var>
</class>
|
|
|
|
|
avatarius79 Newbie
Joined: 07 May 2010 Posts: 3
|
Posted: Sat May 08, 2010 6:58 am |
This ist exactly what i´ve been looking for. thank you :)
|
|
|
|
|
|
|
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
|
|