Could you help with the triggers for a multiple lines?

Post Reply
Slimp
Posts: 2
Joined: Tue May 23, 2023 8:06 am

Could you help with the triggers for a multiple lines?

Post by Slimp »

Hello, I want to catch the item's description after checking the characteristics and put it in the DB.
Could you suggest how I can catch these multi lines:

Code: Select all

========= 1 item
You have learned the following:
Subject "chronicle about the protective properties of air", type : MAGIC BOOK
Weight: 1, Price: 1, Rent: 1(1)
Material : BIRCH, max. strength : 20, current strength : 20
Uncomfortable: nothing
Unavailable : none
Has extra flags: !rent,!sell,!scout
contains the spell: "air shield"
level of study (for you) : 34
Affects you: none
========= 2 item
You have learned the following:
Item "heavy boots made of luxurious Chupacabra skin with a steel horseshoe and spur", type: ARMOR
Can be worn.
Weight: 30, Cost: 600, Rent: 150(100)
Material : LEATHER, Max Durability : 250, Current Durability : 250
Uncomfortable: nothing
Unavailable : none
Requires transformations: 3
Has extra flags: blessed, resistant to magic,! indestructible
protection (AC) : 4
armor : 6
Gives you the following effects:
inclination.definition, prowess, alertness, stone.hand, air.aura, fiery.aura
Additional properties :
    damage improves by 6
    dexterity improves by 2
Change skills:
    fighting on horseback improves by 20%
============
Some items can skip some lines if they don't have info.
I created the trigger with AND/Multiline where I described each string for the 1st item (in this case I can catch only the first record of "Additional properties :"), but it doesn't match for the second item because needs a different template. I can create a few triggers for each structure but it's not good as I think, could you suggest any other solutions?

User avatar
demonnic
Posts: 886
Joined: Sat Dec 05, 2009 3:19 pm

Re: Could you help with the triggers for a multiple lines?

Post by demonnic »

I actually did a blog post about capturing data like this recently at https://demonnic.com/a-look-at-trigger-gates-in-mudlet/
And you may also want to have a look at http://www.youtube.com/watch?v=nwfjzRlgG9E&hd=1

Slimp
Posts: 2
Joined: Tue May 23, 2023 8:06 am

Re: Could you help with the triggers for a multiple lines?

Post by Slimp »

It's very helpful! thank you.

Post Reply