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
Beginner


Joined: 22 Nov 2025
Posts: 24

PostPosted: Fri Sep 25, 2026 12:46 pm   

Help with timing.
 
I want to grab all this data - some items have even more lines of data in other +---+ sections - but I cannot figure out how to guarantee the timing.

The FRED text should appear AFTER the final +--- ... ---+ line (it is only used to verify that the timing is off).

Code:
+-----------------------------------------------------------------+
| Keywords   : silvery bone shard skylight                        |
| Name       : a shard of Skylight                                |
| Id         : 3917938214                                         |
FRED
| Type       : Weapon                    Level  :   161           |
| Worth      : 1,000                     Weight :    10           |
| Wearable   : wield                                              |
| Score      : 1614                                               |
| Material   : bone                                               |
| Flags      : glow, magic, V3, nodrop                            |
| Found at   : The Mountains of Desolation                        |
+-----------------------------------------------------------------+
| Weapon Type: dagger                 Average Dam :    366        |
| Inflicts   : freezing bite          Damage Type : Cold          |
| Specials   : frost                                              |
+-----------------------------------------------------------------+
| Stat Mods  : Hit roll     : +20      Intelligence : +5          |
+-----------------------------------------------------------------+

[5472/7206hp 5284/5284mn 7565/7565mv 27qt 2499tnl] >


All this item data is transmitted very fast and, even though I have a WAIT delay of 1000ms it is still off. I would prefer to use some kind of waitsignal or wait pattern but what I have seems to miss.

Code:
<trigger name="endItemDataTrig" priority="10460" trigontrig="false" newline="false" id="93">
  <pattern>^~+[---]~+$</pattern>
  <trigger name="EOLTrig" type="Within Lines" param="2" trigontrig="false" newline="false">
    <pattern>~[%d~/%dhp*~]</pattern>
    <value>#C-
#WAIT 1000
#SH "FRED"
#T- getItemData</value>
  </trigger>
</trigger>
Reply with quote
chris123zugg
Adept


Joined: 23 Aug 2013
Posts: 227

PostPosted: Sun Sep 27, 2026 2:19 pm   
 
using #WAIT will pause all operations of the client, use either a "within lines" or a range of lines to process the looked for information, use the +-----------------------------------------------------------------+ as your anchor.
Reply with quote
TGH
Beginner


Joined: 22 Nov 2025
Posts: 24

PostPosted: Thu Oct 01, 2026 4:55 pm   
 
Yeah. I have NO idea what I was thinking of with that. I removed it and put the wait into the calling script. I guess I was hoping for something a little more elegant than a time-based delay, like the data collection sending a specific signal.

...or would #SECTION work somehow?
Reply with quote
TGH
Beginner


Joined: 22 Nov 2025
Posts: 24

PostPosted: Sun Oct 04, 2026 12:04 pm   
 
OK. The data gathering is not the problem. Using it for a single item is not the problem. I am using for a variable number of items so I cannot use a time delay (WAIT milli) in the calling script. I have to trigger a wait somewhere OUTSIDE the item loop.

I have tried

LOOP 1,x items
#WAIT per item (to populate all item vars)
SIGNAL end_item_loop

WAITSIGNAL end_item_loop (and with "end_item_loop")

and also tried

THREAD get_item_data
LOOP 1,x items

with

WAITTHREAD get_item_data (also with "get_item_data")

to continue once all items have been processed and all triggers for that closed up. Nothing seems to really work to prevent the calling script from continuing along.
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