changing triggers

Posted by FishOnSpeed on Mon 26 Nov 2007 07:57 PM — 7 posts, 22,654 views.

USA #0
ok ... is this possible.

i need to be able to have triggers check what is being aucioned and tell me what the stats are on it.

but the output from the mud is always a little different
how could i do this.

Australia Forum Administrator #1
It would help to post examples of the output. So far your question is extremely general.
USA #2

| Desc       : A Two-Handed Bastard Sword                         |
| Type       : Weapon                    Level  :    25           |
| Worth      : 250                       Weight :     8           |
| Wearable   : take wield                                         |
| Flags      : auctioned v3                                       |
| Weapon Type: sword                     Damage : 8d4             |
| Inflicts   : chop                      Average:   20            |
| Specials   : two-handed                                         |

| Desc       : the Crest of Wood                                  |
| Type       : Armor                     Level  :     1           |
| Worth      : 6                         Weight :     1           |
| Wearable   : take shield                                        |
| Flags      : magic auctioned v3                                 |
| Armor      : Pierce    :    0        Bash      :    2           |
|              Slash     :    3        Magic     :    0           |
| Stat Mods  : Constitution : +1                                  |

| Desc       : a hallowed light                                   |
| Type       : Light                     Level  :     1           |
| Worth      : 0                         Weight :     3           |
| Wearable   : take                                               |
| Flags      : glow magic bless auctioned v3                      |
| Stat Mods  : Hit roll     : +3                                  |

| Desc       : Mithril Bastard Sword                              |
| Type       : Weapon                    Level  :    20           |
| Worth      : 300                       Weight :     6           |
| Wearable   : take wield                                         |
| Flags      : magic auctioned v3                                 |
| Weapon Type: sword                     Damage : 4d7             |
| Inflicts   : slash                     Average:   16            |
| Specials   : sharp                                              |

| Desc       : Wild Flower Pollen                                 |
| Type       : Potion                    Level  :    10           |
| Worth      : 0                         Weight :     1           |
| Wearable   : take                                               |
| Flags      : glow hum magic auctioned v3                        |
| Spells     :                                                    |
|   Level 10 spell of 'cure light'                                |
|   Level 10 spell of 'cure light'                                |
|   Level 10 spell of 'cure light'                                |

and there are many more possibilities
Amended on Tue 27 Nov 2007 07:54 PM by Nick Gammon
USA #3
What exactly are you trying to extract there? It looks like the information is fairly compact already.
USA #4
what im wanting to do is pick up the stats and such of the items and then compare them to variables that i have preset. then tell me wether or not i need to bother bidding on it ... or looking at it.

so say im a level 10 with a body equip that has +2 str

and someone auctions a level 9 body with +3 str

i want it to tell me that there is a better item than what i have being auction ... and any other items to just not show up at all
Australia Forum Administrator #5
It can be done, it will be a bit fiddly because the output is fiddly.

From your example output I would make a trigger that matches on the first line (Desc : <something> ) which turns on further triggers which match the other lines. You then need to collect the stats as they roll by (storing them in variables). Once the item is finished (by the look of it, by a blank line) then you could look at the variables and start comparing things. Then disable the middle lines, and wait for a new item to appear.
USA #6
ahh that sounds messy .. guess if its the only way then thats how im going to have to do it .. thanks