|
bedwas Newbie
Joined: 14 Jul 2002 Posts: 3 Location: United Kingdom
|
Posted: Mon Mar 01, 2004 7:22 pm
Little help DB. Map |
Hi,
I've been having some trouble with writing my idenify script. I'm a novice and don't really understand what I'm doing.
Once the data is loaded into the database the key record NAME is populated correctly but, when I click on it or a db scan is performed it resets to 0.
Also the room and zone do not populate based upon the room and zone fields. When I check manually the fields never update. &zone &room etc. Sorry not sure how to make this more readable.
#CLASS {Identify};#TRIGGER {Object '(*)' is type (%w), extra flags (*).} {#ADDKEY Item {Name="%1"|Flag="%3"|kind="%2"} {} Identify} "" {nocr|disable};#TRIGGER {Weight is (%d), value is (%d), level is (%d)} {#ADDKEY Item {Weight=%1|cost=%2|level=%3}};#TRIGGER {$} {#dbfirst;#WHILE (!%null( %rec)) {#IF (@Item.name=&Name) {ObjectExist = 1};#DBNEXT};#IF (@ObjectExist = "") {#NEW @Item.kind @Item};#T- Identify};#TRIGGER {damage is &Item.Hit ~(average &Item.Damage~).} {};#TRIGGER {Weapon type is (&Item.Type).} {};#TRIGGER {Weapons flags: (&Item.WeapFlag)} {};#TRIGGER {Affects dexterity by (&Item.Dexterity).} {};#TRIGGER {Affects hit roll by (&Item.Hit).} {};#TRIGGER {Affects damage roll by (&Item.Dam).} {};#TRIGGER {Affects intelligence by (&Item.Intelligence).} {};#TRIGGER {Affects wisdom by (&Item.Wisdom).} {};#TRIGGER {Affects Strength by (&Item.Strength).} {};#TRIGGER {Affects constitution by (&Item.Const).} {};#TRIGGER {Capacity: &Item.Capacity# Maximum weight: &Item.Maxweight# flags: &Item.FlagsC} {};#TRIGGER {Weight multiplier: &Item.WeightMulti} {};#TRIGGER {(*)This object is a (*) and came from (&Item.Lore)} {#addkey item {Lore"%3"}} "" {nocr};#TRIGGER {Affects hp by (&Item.hp)} {};#TRIGGER {Object '&Item.Name' is type &Item.Kind, extra flags &Item.Flag.} {};#TRIGGER {Has (*) charges of level &Item.SpellLevel '&Item.spells'.} {};#TRIGGER {Level &SpellLevel spells of: &Item.spells.} {};#TRIGGER {Armor class is &item.Pierce pierce, &item.Bash bash, &item.Slash slash, and &item.Saves vs. magic.} {};#CLASS 0;
I can't see the above script updating the name field as the script disables. But why does the db program allow scrolling through the fields to reset it to zero.
Thanks Gareth |
|
|
|
DeReP Adept
Joined: 14 Jun 2003 Posts: 222 Location: Chile
|
Posted: Mon Mar 01, 2004 7:31 pm |
Try saving the database every time after you add a new item
#DBSAVE dbname |
|
|
|
bedwas Newbie
Joined: 14 Jul 2002 Posts: 3 Location: United Kingdom
|
Posted: Tue Mar 02, 2004 1:08 am |
Thanks #DBSAVE didn't help thou.
Still can't get the rooms zone field to populate correctly.
Is there any tools to repack and reindex the db's? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Mar 05, 2004 1:25 am |
The Zone and Room field-types were removed around version 6.16 I think. These fields must be changed to another field-type or they won't work.
|
|
|
|
|
|