 |
TGH Beginner
Joined: 22 Nov 2025 Posts: 24
|
Posted: 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>
|
|
|
|
|
 |
chris123zugg Adept
Joined: 23 Aug 2013 Posts: 227
|
Posted: 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.
|
|
|
|
 |
TGH Beginner
Joined: 22 Nov 2025 Posts: 24
|
Posted: 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? |
|
|
|
 |
TGH Beginner
Joined: 22 Nov 2025 Posts: 24
|
Posted: 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. |
|
|
|
 |
|
|
|