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
PuffTheDragon
Newbie


Joined: 18 Nov 2001
Posts: 2
Location: USA

PostPosted: Fri Nov 23, 2001 9:50 pm   

Setting Up Auto Database
 
I dont know how to auto setup my Database but my MUD seems more simple than these others here is what is looks like.

* Recite Identify ( Object) is the command*


You recite a scroll of identify which dissolves.
You feel informed:
Object 'belt golden goldenbelt', Item type: ARMOR
Item is: MAGICAL LIMITED NOBITS
Weight: 20, Value: 20000
AC-apply is 12
Can affect you as :
Affects : CON By 1
Affects : MANA By 20
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Mon Nov 26, 2001 6:28 pm   
 
First create your database with the name Equipment.
Your fields are:
Name as Text
Type as Single Option (enter the various options)
Properties as Option List (enter the various options)
Weight as Number (general, 0 to 999999)
Value as Number (general, 0 to 999999)
ACapply as Number (general, 0 to 999999)
Wear as Single Option (enter the various options)
Source as Text
CON as Number (-999999 to 999999)
MANA as Number (-999999 to 999999)
(any other Affects not shown in the example)

Then enter the script:


#TR {^Object '(*)', Item type: (%w)$} {
#VAR newItem %null
#ADDKEY newItem Name "%1"
#ADDKEY newItem Type %2
#TEMP {$} {
#DBLOAD Eq
#PROMPT newItem.Wear "Worn where?"
#PROMPT newItem.Source "Source Mob or Shop?"
#NEW All newItem
#DBSAVE
}
}
#TR {^Item is: (*)$} {#ADDKEY newItem Properties %replace(%1, " ", "|")}
#TR {^Weight: (%d), Value: (%d)$} {
#ADDKEY newItem Weight %1
#ADDKEY newItem Value %2
}
#TR {^AC-apply is (%d)$} {#ADDKEY newItem ACapply %1}
#TR {^Affects : (%w) By (%n)$} {#ADDKEY newItem %1 %2}


You only gave an armor as an example. Other item types will have additional data. Weapons will include damage data. Scrolls, potions, pills, wands, and staves will have spells, cast levels, and charges. Containers may have capacity information. To add these to the script, you need only turn the individual line of mud output into its own trigger. Ultimately your mud's information will be on par with most others in complexity.


Troubadour
Reply with quote
PuffTheDragon
Newbie


Joined: 18 Nov 2001
Posts: 2
Location: USA

PostPosted: Fri Nov 30, 2001 5:35 am   
 
Thanks im gonna try it no whopefully ti will 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