Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
meddlesome
Wanderer


Joined: 24 Aug 2012
Posts: 70

PostPosted: Sun Sep 30, 2012 1:53 am   

Automapper - updating current room. CMUD v237 [SOLVED]
 
The Mud I play isn't consistent. The room name shows up in different locations, plus I would like to add any stationary MOBs to the room description.

I have this working to capture the description.

#TRIGGER {ROOMNAME occurrence #1} {#VAR RoomName {%1};#TAG name {@RoomName};#VAR mapRoomDESC {};#T+ {DESCRIPTION}

And so on with all the other variants of where the ROOMNAME shows up. All triggered with same code.

The turn off is this trigger...

#TRIGGER {Obvious exits:} {#VAR mapDIR {};#VAR mapRoomNAME {};#VAR mapRoomDESC {};#T- {DESCRIPTION};#TAG desc @mapRoomDESC}

The routine I have for grabbing the description is based on this logic. Anything between {Room Name} and "Obvious exits:" gets captured and added to the description variable.

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <class name="DESCRIPTION" copy="yes">
    <trigger priority="680" copy="yes">
      <pattern>(%*)</pattern>
      <value>#VAR mapRoomDESC {@mapRoomDESC %1}</value>
    </trigger>
  </class>
</cmud>


So I kinda get what I want and now I just want to update it to the room that I am in. #LOOK right? Doesn't do it. I even tried a variant of #MAKEROOM, but fail. What can I do to get it to update this current room in the mapper with the current room from the Mud?
_________________
Intel Core 2 Quad Q9450 @2.66GHz
MDAC 2.8 SP1 ON WINDOWS XP SP3
Msjet40.dll ver 4.0.9511.0 + Security Bulletin MS08-028
CMUD v237
Order number: **7829

Last edited by meddlesome on Sun Sep 30, 2012 4:57 am; edited 1 time in total
Reply with quote
meddlesome
Wanderer


Joined: 24 Aug 2012
Posts: 70

PostPosted: Sun Sep 30, 2012 3:51 am   
 
A better question is how do I use this predefined variable to set this...

%roomdesc(@mapRoomDESC)
_________________
Intel Core 2 Quad Q9450 @2.66GHz
MDAC 2.8 SP1 ON WINDOWS XP SP3
Msjet40.dll ver 4.0.9511.0 + Security Bulletin MS08-028
CMUD v237
Order number: **7829
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sun Sep 30, 2012 3:54 am   
 
If I understand correctly, you have the rooms already created and you're trying to set the description on them? You can use the %roomdesc function for that.

EDIT: You posted at the same time. Try #CALL %roomdesc(, @mapRoomDESC).
Reply with quote
meddlesome
Wanderer


Joined: 24 Aug 2012
Posts: 70

PostPosted: Sun Sep 30, 2012 4:22 am   
 
#CALL %roomdesc(, @mapRoomDESC) is just what I came up with from looking at http://forums.zuggsoft.com/forums/viewtopic.php?p=168177, but for some reason it is not working for me.

I added it just as it looks to the "Obvious exits:" trigger as well as feeding it straight at the command line and still no change to the description.
_________________
Intel Core 2 Quad Q9450 @2.66GHz
MDAC 2.8 SP1 ON WINDOWS XP SP3
Msjet40.dll ver 4.0.9511.0 + Security Bulletin MS08-028
CMUD v237
Order number: **7829
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sun Sep 30, 2012 4:33 am   
 
Is your map in map mode? Didn't test, but I'm pretty sure you can't change it in follow mode.
Reply with quote
meddlesome
Wanderer


Joined: 24 Aug 2012
Posts: 70

PostPosted: Sun Sep 30, 2012 4:53 am   
 
What I have is this now...and this is everything...

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <class name="KeypadMapping" copy="yes">
    <trigger priority="30" copy="yes">
      <pattern>´(%*)Ã</pattern>
      <value>#VAR RoomName {%1};#TAG name {@RoomName}
#VAR mapRoomDESC {}
#T+ {DESCRIPTION}</value>
    </trigger>
    <var name="RoomName" type="String" copy="yes">A Brightly Lit Corridor</var>
    <trigger priority="50" prompt="true" copy="yes">
      <pattern><%d/%dhp %d/%dm %d/%dmv %dbr</pattern>
      <value>#TAG prompt</value>
    </trigger>
    <trigger priority="7230" ansi="true" copy="yes">
      <pattern>^%e[1;33m(%*)%e[0m$</pattern>
      <value>;If the RoomName starts or ends with anything other than an
;alphabetic, then it is not a valid room name.

#IF (%ascii(%left(%1,1))>64) {#IF (%ascii(%left(%1,1))<123) {
#IF (%ascii(%right(%1,%len(%1)-1))>64) {#IF (%ascii(%right(%1,%len(%1)-1))<123) {

#VAR RoomName %1
#TAG name {@RoomName}
;#Show ROOM NAME STORED AS: @RoomName
}}}}
#VAR mapRoomDESC {}
#T+ {DESCRIPTION}</value>
    </trigger>
    <trigger priority="100" copy="yes">
      <pattern>Obvious exits:</pattern>
      <value>#VAR mapRoomN {};#VAR mapRoomE {};#VAR mapRoomS {};#VAR mapRoomW {};#VAR mapRoomU {};#VAR mapRoomD {};#T- {DESCRIPTION};#TAG desc @mapRoomDESC;#CALL %roomdesc(, @mapRoomDESC)</value>
    </trigger>
    <var name="mapRoomN" type="String" copy="yes"/>
    <var name="mapRoomE" copy="yes">A Turn in the Corridor</var>
    <var name="mapRoomS" copy="yes">Inside Falconspire</var>
    <var name="mapRoomW" copy="yes">A Turn in the Corridor</var>
    <var name="mapRoomU" type="String" copy="yes"/>
    <var name="mapRoomD" type="String" copy="yes"/>
    <trigger priority="260" copy="yes">
      <pattern>North  - (%*)</pattern>
      <value>#VAR mapRoomN %1</value>
    </trigger>
    <trigger priority="270" copy="yes">
      <pattern>East   - (%*)</pattern>
      <value>#VAR mapRoomE %1</value>
    </trigger>
    <trigger priority="280" copy="yes">
      <pattern>South  - (%*)</pattern>
      <value>#VAR mapRoomS %1</value>
    </trigger>
    <trigger priority="290" copy="yes">
      <pattern>West   - (%*)</pattern>
      <value>#VAR mapRoomW %1</value>
    </trigger>
    <trigger priority="300" copy="yes">
      <pattern>Up     - (%*)</pattern>
      <value>#VAR mapRoomU %1</value>
    </trigger>
    <trigger priority="310" copy="yes">
      <pattern>Down   - (%*)</pattern>
      <value>#VAR mapRoomD %1</value>
    </trigger>
    <var name="MapperStatus" copy="yes">1</var>
    <class name="DESCRIPTION" copy="yes">
      <trigger priority="680" copy="yes">
        <pattern>(%*)</pattern>
        <value>#VAR mapRoomDESC {@mapRoomDESC %1}</value>
      </trigger>
    </class>
    <var name="mapRoomDESC" type="String" copy="yes"><![CDATA[Some obscure room description, that is most likely copyrighted so I won't display it here, is here.]]></var>
  </class>
</cmud>


To put it simple. It takes the Room name from the Exit and uses that to prebuild the room before I move into that direction. Then once I get into the room, it adds the description because I don't have the description until I get into the room.
_________________
Intel Core 2 Quad Q9450 @2.66GHz
MDAC 2.8 SP1 ON WINDOWS XP SP3
Msjet40.dll ver 4.0.9511.0 + Security Bulletin MS08-028
CMUD v237
Order number: **7829

Last edited by meddlesome on Sun Sep 30, 2012 5:01 am; edited 1 time in total
Reply with quote
meddlesome
Wanderer


Joined: 24 Aug 2012
Posts: 70

PostPosted: Sun Sep 30, 2012 4:56 am   
 
Curses you smarty pants. Yeah that was it. I jump around so much I didn't notice that I was in follow mode and not edit mode. Good call. Thanks for your help.
_________________
Intel Core 2 Quad Q9450 @2.66GHz
MDAC 2.8 SP1 ON WINDOWS XP SP3
Msjet40.dll ver 4.0.9511.0 + Security Bulletin MS08-028
CMUD v237
Order number: **7829
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net