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
Tigger
Novice


Joined: 07 Oct 2002
Posts: 46
Location: USA

PostPosted: Fri Oct 11, 2002 12:17 pm   

how to put this in a data base
 
the mud I am on has equ that idents like this
Object '(Unique) Wilson the king's polished ring of the moons unique' is type armor, extra flags no_locate burn_proof unique.
Weight is 0, value is 0, level is 250.
Armor class is 499 pierce, 500 bash, 499 slash, and 500 vs. magic.
Affects dexterity by -26.
Affects hit roll by -43.
Affects hit roll by -17.
Affects damage roll by -27.
Affects save vs spell by 28.
Affects damage roll by 56.
Affects moves by 553.
Affects strength by 14.
Affects hit roll by 33.
Affects constitution by 23.
Affects hit roll by 39.
Affects damage roll by 34.
Affects hit roll by 17.

now you can remove the negs but at a very high cost. I am trying to make a DB capture that would remove the negs (excpt -ac and -save) and add all the positives like hit roll by 33 and hit roll by 39

could someone help me set this up?
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Fri Oct 11, 2002 6:27 pm   
 
I'm assuming that each "affect" has its own field in the database with the exact same name as appears in you identification message.

#TR {Object '(*)' is type (%w), extra flags (*).} {Item.Name = "%1"; Item.Type = %2; Item.Flags = "%3"; #TEMP dbentry {^$} {#T- dbentry; #NEW All @Item}}

#TR {Weight is (%d), value is (%d), level is (%d).} {Item.Weight = %1; Item.Value = %2; Item.Level = %3}

#TR {Armor class is (%d) pierce, (%d) bash, (%d) slash, and (%d) vs. magic.} {Item.Pierce = %1; Item.Bash = %2; Item.Slash = %3; Item.Magic = %4}

#TR {Affects (*) by (%n).} {#IF ((%2 > 0) OR (%1 = "ac") OR (%1 = "save")) {#ADDKEY Item "%1" %eval(%db(@Item, "%1") + %2)}


Troubadour
(Win 98, Pentium III, 550 MHz)
Reply with quote
Tigger
Novice


Joined: 07 Oct 2002
Posts: 46
Location: USA

PostPosted: Sat Oct 12, 2002 2:29 am   
 
thanks a lot but it doesn't seem to work...what fields do I need in the DB ( I figured name type flags, pierce and stuff, but the extras I don't know) also the pierce et all flags don't go to the DB (the var has it but the DB doesn't)
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