Here we go, i think i'm in over my head with this one. I would like to take a list of items, add them to a table and then autobuy them when i get a list from a shop that has said items in stock.
<triggers>
<trigger
enabled="y"
match="^Phase .\: Recover ((?i)an|a) (.*?)\.$"
regexp="y"
send_to="12"
sequence="100"
>
<send>Items["%2"]=true
</send>
</trigger>
</triggers>
matches my item addition trigger just fine, witch looks like this:
Phase 1: Recover a glass of mead.
Phase 2: Recover a bottle of Beltane red beer.
ect.
now my shop list looks like this:
No. Item Name Level Amount Price
1) A quill pen 6 No limit [ 90 gp]
2) A page of parchment 6 No limit [ 50 gp]
3) A postage stamp 5 No limit [ 130 gp]
4) A stamp collector's book 10 261 [ 25,000 gp]
5) A page of vellum 6 0/1 [ 60,000/3,999 gp]
the trigger that i was working on to match the shop list looks like this:
<triggers>
<trigger
enabled="y"
match="^ \d\) (.*?) /s {1,31} /d"
regexp="y"
send_to="12"
sequence="100"
>
<send>Note ("%1 %2 %3 %4 %5")
if Items["%2"] then -- check item name for match in table
Send ("buy '" .. "%1" .. "'")
end -- if
</send>
</trigger>
</triggers>
but i cannot get it to match with my limited knowledge of expessions in lua, any suggestions?
<triggers>
<trigger
enabled="y"
match="^Phase .\: Recover ((?i)an|a) (.*?)\.$"
regexp="y"
send_to="12"
sequence="100"
>
<send>Items["%2"]=true
</send>
</trigger>
</triggers>
matches my item addition trigger just fine, witch looks like this:
Phase 1: Recover a glass of mead.
Phase 2: Recover a bottle of Beltane red beer.
ect.
now my shop list looks like this:
No. Item Name Level Amount Price
1) A quill pen 6 No limit [ 90 gp]
2) A page of parchment 6 No limit [ 50 gp]
3) A postage stamp 5 No limit [ 130 gp]
4) A stamp collector's book 10 261 [ 25,000 gp]
5) A page of vellum 6 0/1 [ 60,000/3,999 gp]
the trigger that i was working on to match the shop list looks like this:
<triggers>
<trigger
enabled="y"
match="^ \d\) (.*?) /s {1,31} /d"
regexp="y"
send_to="12"
sequence="100"
>
<send>Note ("%1 %2 %3 %4 %5")
if Items["%2"] then -- check item name for match in table
Send ("buy '" .. "%1" .. "'")
end -- if
</send>
</trigger>
</triggers>
but i cannot get it to match with my limited knowledge of expessions in lua, any suggestions?