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
DarKarvin
Beginner


Joined: 26 Jul 2002
Posts: 12
Location: USA

PostPosted: Sun Jan 11, 2004 2:16 pm   

EQ database for Medievia
 
Does anyone have the code for this already done?
Here's some patterns of eq for adding to the database:

Your divination is complete...
Object: a throwing axe [axe throwing]
Item Type: WEAPON Effects: NoBits
Equipable Location(s): TAKE THROW
Weight: 3 Value: 200 Level Restriction: 9
Attributes: ANTI_MAGE ANTI_CLERIC
Damage Dice of 2d4
Item is THROWABLE

Your divination is complete...
Object: the tentacle of a talisar [tentacle talisar]
Item Type: WEAPON Effects: NoBits
Equipable Location(s): TAKE WIELD
Weight: 6 Value: 9800 Level Restriction: 14
Attributes: LONG
Damage Dice of 6d6
Affects:
+20 to HIT_POINTS
+2 to DAMROLL

Your divination is complete...
Object: a green potion [potion green]
Item Type: POTION Effects: MAGIC
Equipable Location(s): TAKE
Weight: 1 Value: 50 Level Restriction: 0
Level 20 spells of cure critic

Your divination is complete...
Object: an opaline potion [potion opaline]
Item Type: POTION Effects: NoBits
Equipable Location(s): TAKE HOLD
Weight: 2 Value: 300 Level Restriction: 0
Level 16 spells of detect evil, detect invisibility, detect magic

Your divination is complete...
Object: a scroll made from the bark of a crepe myrtle tree [scroll myrtle]
Item Type: SCROLL Effects: NoBits
Equipable Location(s): TAKE HOLD
Weight: 1 Value: 230 Level Restriction: 0
Level 1 spells of armor, bless

Your divination is complete...
Object: an oaken scabbard, attached to a leather harness [scabbard oaken leather harness]
Item Type: CONTAINER Effects: NoBits
Equipable Location(s): TAKE ABOUT WAIST
Weight: 2 Value: 50 Level Restriction: 0
Available Weight: 19 stones
Nothing
Affects:
+2 to STR
+2 to CON

This should be enough patterns for some help in getting started,
Sorry but after reading the helpfile, the finished scripts post..I'm still way lost on how to do this.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Jan 11, 2004 6:39 pm   
 
What are you having difficulty with?

The usual technique is to initialize variables and enable a trigger class by triggering on the text which indicates the beginning of an identify. Inside the class there would be several triggers to get information from the various lines and store it in a record variable. The keys of the record variable should match database field names.

In addition, most people have a trigger to detect the end of the identify. This trigger will usually disable the trigger class, check the database to see if this is a new entry, and add it to the database if it is. What criteria are used to identify duplicates is up to you. Usually, this trigger will either have a blank line or the MUD prompt as its pattern. If a suitable pattern can't be found, this can also be done manually in which case an alias would probably be useful.

Sample script
#TRigger {^Your divination is complete...} {#VAriable id {};#T+ Identify}
#CLAss Identify disable
#TR {^Object: (*) ~[(*)~]} {#ADDKey id Name {%1};#ADDK id Keywords {%2}}
#TR {^$} {#T- Identify;#IF (%query( {%db( @id, Name)} = {&Name})) {} {#NEW All @id}}
#CLA 0
#T- Identify

That should be enough triggers for some help in getting started. If you are still lost, please try to make your questions more specific.
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