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
`auni
Newbie


Joined: 09 Feb 2002
Posts: 2

PostPosted: Sat Feb 09, 2002 12:32 am   

Database programming
 
For the life of me I can't figure out how to make a database script for my mud. if someone could write the triggers for me I'd be very happy. I've included my muds format of armor and weapons. Thanks in advance.

-`auni

You hold a gleaming gold ring with both hands, and chant softly.
You are filled with a rush of knowledge!
Object: 'a gleaming gold ring' is type armor.
Extra flags glow magic.
Weight is 2.0, value is 4900, level is 30.
Material is gold.
Armor class is 2 pierce, 2 bash, 3 slash, and 3 vs. magic.
Affects damage roll by 2.
Affects armor class by -5.

237(237)hp 531(606)ma 115mv (3536tnl) 85906g (Center Square) 2:30t - (NESW) c id staff
You lost your concentration.

237(237)hp 525(606)ma 115mv (3536tnl) 85906g (Center Square) 2:30t - (NESW) c id staff
You hold a thin oak staff with both hands, and chant softly.
You are filled with a rush of knowledge!
Object: 'a thin oak staff' is type weapon.
Extra flags none.
Weight is 18.0, value is 100, level is 35.
Material is oak.
Weapon type is staff.
Damage is 3d12 (average 19).
Weapons flags: two-handed
Affects dexterity by 1.
Affects damage roll by 1.
Affects hit roll by 2.

237(237)hp 513(606)ma 115mv (3536tnl) 85906g (Center Square) 2:30t - (NESW) remove doublet
You stop using a doublet of meshed steel.

237(227)hp 513(606)ma 115mv (3536tnl) 85906g (Center Square) 2:30t - (NESW) c id doublet
You hold a doublet of meshed steel with both hands, and chant softly.
You are filled with a rush of knowledge!
Object: 'a doublet of meshed steel' is type armor.
Extra flags none.
Weight is 11.0, value is 1100, level is 30.
Material is steel.
Armor class is 7 pierce, 3 bash, 7 slash, and 3 vs. magic.
Affects hit roll by 3.
Affects hp by 10.
Affects damage roll by 1.

237(227)hp 501(606)ma 115mv (3536tnl) 85906g (Center Square) 2:30t - (NESW) wear double
You do not have that item.

237(227)hp 501(606)ma 115mv (3536tnl) 85906g (Center Square) 2:30t - (NESW) wear doublet
You wear a doublet of meshed steel on your torso.
A doublet of meshed steel seems bulky enough to impede spellcasting.

237(237)hp 501(606)ma 115mv (3536tnl) 85906g (Center Square) 2:30t - (NESW) remove staff
You stop using a staff studded with iron.

237(237)hp 501(606)ma 115mv (3536tnl) 85906g (Center Square) 2:30t - (NESW) c id staff
You hold a staff studded with iron with both hands, and chant softly.
You are filled with a rush of knowledge!
Object: 'a staff studded with iron' is type weapon.
Extra flags none.
Weight is 12.0, value is 500, level is 40.
Material is wood.
Weapon type is staff.
Damage is 2d22 (average 23).
Weapons flags: two-handed
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Sat Feb 09, 2002 5:28 am   
 
I am not the database expert, I think that was Tarn. However this looks like the basic Rom/Diku mud and you should be able to find a db populator in the finished scripts forum. If not I will include a few triggers to get the ball rolling and you will just have to setup the database and transfer the captured stuff to it.

#AL id {#IF (%numparams=0) {#SHOW Usage: ID item} {#T+ IDTriggers;ClearIDData;c id %-1}}

#CLASS {IDTriggers}
#VAR IDObject {}
#VAR IDType {}
#VAR IDFlags {}
#VAR IDMaterial {}
#VAR IDWeight {}
#VAR IDValue {}
#VAR IDLevel {}
#VAR IDArmors {}
#VAR IDAffects {}
#VAR IDDamage {}
#VAR IDWeaponType {}
#VAR IDWeaponFlags {}
#AL ClearIDData {#VAR IDObject {};#VAR IDType {};#VAR IDFlags {};#VAR IDMaterial {};#VAR IDWeight {};#VAR IDValue {};#VAR IDLevel {};#VAR IDArmors {};#VAR IDAffects {};#VAR IDDamage {};#VAR IDWeaponType {};#VAR IDWeaponFlags {}}
#TR {^Object:'&{IDObject}' is type &%w{IDType}.$} {}
#TR {^Extra flags &{IDFlags}.$} {}
#TR {^Weight is &{IDWeight}, value is &%d{IDValue}, level is &%d{IDLevel}.$} {}
#TR {^Material is &{IDMaterial}.$} {}
#TR {^Armor clase is (%d) pierce, (%d) bash, (%d) slash, and (%d) vs. magic.$} {IDArmors=%concat("%1","|","%2","|","%3","|","%4")}
#TR {^Affects (*).$} {IDAffects=%additem("%1",@IDAffects)}
#TR {^Damage is &%w{IDDamage} ~(average %d~)$} {}
#TR {^Weapon type is &%w{IDWeaponType}.$} {}
#TR {^Weapon flags~: &*{IDWeaponFlags}$} {}
#TR {^You lost your concentration.$} {T- IDTriggers}
#TR {^$} {#IF (@IDObject!="") {#NOOP Do database alias here;#T- IDTriggers}}
#CLASS 0
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