Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
bedwas
Newbie


Joined: 14 Jul 2002
Posts: 3
Location: United Kingdom

PostPosted: 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
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Mon Mar 01, 2004 7:31 pm   
 
Try saving the database every time after you add a new item
#DBSAVE dbname
Reply with quote
bedwas
Newbie


Joined: 14 Jul 2002
Posts: 3
Location: United Kingdom

PostPosted: 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?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net