|
ixy Novice
Joined: 18 Mar 2007 Posts: 39
|
Posted: Tue May 26, 2009 1:35 am
removing the end line in a variable |
i have a trigger that captures all of a item, and ends with the vendor line, but i cant get it to not capture the vendor line, is there a way to trim the last line out of a variable?
Item 'the obsidian helmet' is type armor, alignment 0, made of obsidian,
has keywords 'helmet obsidian', equipped over the head.
This item weighs 0 stones and 70 pebbles, and is valued at 6,750 gp.
This level 30 item has the attributes: wont-fuse
The obsidian helmet is in excellent condition.
Armor resistance is 9 pierce, 10 bash, 7 slash, and 3 exotic.
Affects strength by 1.
Affects hp by 10.
*This item may be repaired 7 times.
This black helmet appears to be made of the purest obsidian stone. The
depths of the blackness seem to absorb all light. It is polished to an
extremely lustrious finish that bespeaks the creative genius that created
this masterpiece. You feel a calm and reassuring power exuding from this
helmet that radiates its positive energy into the depths of your soul.
Gulmond tells you 'I can sell you this item for 6,750 gold.'
Thanks |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Mon Jun 01, 2009 2:21 pm |
If you post your trigger, we can either point out the error in it, or recommend a better way to capture the information.
|
|
_________________ Asati di tempari! |
|
|
|
ixy Novice
Joined: 18 Mar 2007 Posts: 39
|
Posted: Tue Jun 02, 2009 8:47 pm |
for starting capture:
#CLASS {equipment_database}
#REGEX {^This item is up for auction from (.+)\.} {#t+ equipment_database_capture;item = ""}
#COND {^Item '%1' is type %2, alignment %3, made of %4,$} {item.zone = None;item.name = %1}
#COND {has keywords '%1'} {item.keywords = %1} {looppat}
for completing the capture:
#CLASS {equipment_database_capture} {disable}
#TRIGGER {(*)} {#var item.capture @item.capture%cr%TRIGGER}
#REGEX {^The minimum bid on this item is [(.+)] gp\.} {#t- equipment_database_capture;#dbload items;item.capture = %ansi( 16, 0)@item.capture;#if (%numitems( %query( ((&name = @item.name) & (&keywords = @item.keywords)), All)) = 0) {#new items @item} {#echo "";#echo %ansi( 15, 0)@item.name %ansi( 16, 0)already in database.};#dbsave items;#dbclose items}
Thanks. |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|