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
TGH
Newbie


Joined: 22 Nov 2025
Posts: 8

PostPosted: Sat Nov 22, 2025 3:08 pm   

Can anyone see what is wrong?
 
Hi, All

Aardwolf is kind enough to provide tags for roomdata. This is very helpful as the mapper has never picked up description in all the time I have used it.
So, room data looks like:

{rname}Vegetable Seller
{rdesc}
You walk into an explosion of color: bright green spinach, orange
pumpkins, purple cabbage, and red apples. Pile upon pile of fresh fruits
and vegetables fill the air with rich, earthy scents.
{/rdesc}

{exits}[ Exits: south ]

My mapper config picks up the name and exits without any real problems but my map has no descriptions at all. So I made the following:

Code:
<trigger name="startDescTrig" priority="20160" id="3253">
  <pattern>^~{rdesc~}$</pattern>
  <value>#T+ getRoomDescTrig</value>
</trigger>


And my getRoomDesc trigger looks like:

Code:
<trigger name="getRoomDescTrig" priority="11610" enabled="false" id="837">
  <pattern>($roomDesc:*)</pattern>
  <value>$descLine=%line(0)
roomDescription/roomText=%concat(@roomDescription/roomText,$descLine,%char(10))
</value>
  <arglist>$roomDesc</arglist>
  <trigger type="Within Lines" param="1">
    <pattern>~{~/rdesc~}</pattern>
    <value>#STATE 1

#T- getRoomDescTrig</value>
  </trigger>
</trigger>



Currently, I am calling this manually via a button:

Code:
<button name="roomDescButton" autosize="false" width="60" height="35" toolbar="3" color="black" textcolor="white" priority="32830" id="3283">
  <caption>ADD%char(10)Description</caption>
  <value>#VAR roomDescription/roomText ""
#T+ startDescTrig

#SEND look
#WAITFOR ~{~/rdesc~}

#CALL %maplocked(0)
#CALL %roomdesc(,@roomText)
#WAIT 100
#CALL %maplocked(1)</value>
</button>


...and @roomText contains exactly what I want.
Code:
<var name="roomText" id="3295">  You walk into an explosion of color: bright green spinach, orange
pumpkins, purple cabbage, and red apples.  Pile upon pile of fresh fruits
and vegetables fill the air with rich, earthy scents. 
</var>



The problem is that nothing is being written to the room description. However, if I use #CALL %roomdesc(,@roomText) on the command line it works. So I cannot see why "#CALL %roomdesc(,@roomText)" should fail in a script when it is the same code.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4777
Location: Pensacola, FL, USA

PostPosted: Sun Nov 23, 2025 11:34 am   
 
Are you toggling %maplocked as well?
Like your script does.

The mapper can be very finicky about when its database can be edited.

It it possible your trigger is hanging on the waitfor and never gets to the rest?
_________________
Discord: Shalimarwildcat
Reply with quote
TGH
Newbie


Joined: 22 Nov 2025
Posts: 8

PostPosted: Sun Nov 23, 2025 1:21 pm   
 
I can see maplocked and mapedit icons becoming active/inactive. I also tried by commenting out the maplocked(1) code and the mapper stayed in edit mode. The waitfor does its job as commenting it out adds {/redsc} (and the prompt line) to the variable
Reply with quote
TGH
Newbie


Joined: 22 Nov 2025
Posts: 8

PostPosted: Sun Nov 23, 2025 2:29 pm   
 
I adjusted the code:

Code:
#CALL %maplocked(0)
#SH %maplocked()
#CALL %roomdesc(,@roomText)
#SH "FRED"
#WAIT 100
#CALL %maplocked(1)


'0' is shown for %maplocked and "FRED"is displayed on screen. So the CALL is definitely not working inside this script but will work from command line. None of this seems logical.
Reply with quote
TGH
Newbie


Joined: 22 Nov 2025
Posts: 8

PostPosted: Sun Nov 23, 2025 3:00 pm   
 
OK. Here's what I see. So, obviously, the LOOK and assignment has a decided lag.

Code:
[7312/7312hp 5331/5377mn 7220/7220mv 0qt 2315tnl] > 0
FRED
{rname}A Glowing Gateway (G)
{rdesc}
  The noises that you heard seem to originate from the creatures that
circle this glowing gateway in the middle of the floor.  Beware of what
awaits you- the dark magics are at work. 
{/rdesc}

{exits}[ Exits: south ]


So, I put the CALL into the second trigger state

Code:
#STATE 1

#CALL %roomdesc(,@roomText)
#T- getRoomDescTrig


and SUCCESS. But I really have no idea why.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4777
Location: Pensacola, FL, USA

PostPosted: Mon Nov 24, 2025 2:13 am   
 
Odd, not sure I can explain it either.
Glad you found a working solution.
_________________
Discord: Shalimarwildcat
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