 |
Morten Apprentice
Joined: 17 Feb 2001 Posts: 119 Location: Denmark
|
Posted: Sat Mar 16, 2002 4:39 am
list checking |
ok when i'm in a shop and type list i get a out put that could look like this:
List # Avail Name/id Gold Condition Max. Cond.
1 15 Forest green leather leggi 1,005 New New
2 84 Platemail of hardened fur 1,155 New New
3 11 Loincloth 480 New New
4 2 Gum Leaf 180 New New
5 81 Elven chainmail suit 4,905 New New
6 14 Elven robes 2,655 New New
7 26 Turanian Bandmail 780 New New
8 99 White Robes 330 New New
9 53 Blue Robes 330 New New
10 23 Black Robes 330 New New
13 15 Baggy pants 180 New New
14 16 Flowing shirt 405 New New
topline is alwas the same, but items in the shop change from time to time and is diffenrente from shop to shop.
what i need is a "scan" through every piece of eq in the list check its name on a list/database to see if it is a piece i can use. when the scan is done it should tell me what pieces there have check out and how many there is in the shop
any help will be a biiig help
Yugo
Yugo Sangori |
|
|
 |
Morten Apprentice
Joined: 17 Feb 2001 Posts: 119 Location: Denmark
|
Posted: Sun Mar 17, 2002 3:43 am |
i have try this trigger to catch the name of the item:
#trig { (%d) (%d) (*) (%d)} {#VAR namelist %addItem( "%3", @namelist)}
and i'm am able to catch 1 item. if i remove the last (%d) then i can catch 7-8 items but it takes all of the things after the name in the variable.
it is zmud that is too slow?
any help would be great
Yugo
Yugo Sangori |
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sun Mar 17, 2002 2:06 pm |
The problem is that the number after the name may or may not have commas. Try using this pattern instead:
%d %d (*) [0-9,]
Notice that I only put parenthesis around the * because if that is the only thing you want to capture, there is no need to put the parenthesis around the other. Also, I changed the last %d to a range of [0-9,] which means that it will match one or more characters that are either digits from 0 to 9 or commas.
Kjata |
|
|
 |
|
|