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


Joined: 14 May 2004
Posts: 3
Location: USA

PostPosted: Fri May 14, 2004 8:25 pm   

Identification trigger
 
I looked back through the forum to see if a trigger like this may have been posted and couldn't find one so I thought I'd ask.

I am looking for a trigger that will export information from equipment that is identified into a database. I would also like it if I could get the database organised into levels so that I can view it based on levels of identified equipment.

The mud has 401 mortal levels so as you can see the database could get rather large.

Any input is greatly appreciated.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri May 14, 2004 10:39 pm   
 
Use triggers to take the information from an identify spell/command and put it into a record variable, using keynames which match your database fieldnames. When you reach the end of the identify info, have your trigger check the database, using the %query function, for existing records if you don't want duplicates. If none are found, use #NEW to add the contents of the record variable as a new record.

Provided your input includes the equipment level, you can certainly use the level in defining either views or queries.
Reply with quote
Colbey
Newbie


Joined: 14 May 2004
Posts: 3
Location: USA

PostPosted: Sat May 15, 2004 3:28 am   
 
quote:
Originally posted by LightBulb

Use triggers to take the information from an identify spell/command and put it into a record variable, using keynames which match your database fieldnames. When you reach the end of the identify info, have your trigger check the database, using the %query function, for existing records if you don't want duplicates. If none are found, use #NEW to add the contents of the record variable as a new record.

Provided your input includes the equipment level, you can certainly use the level in defining either views or queries.

Reply with quote
Colbey
Newbie


Joined: 14 May 2004
Posts: 3
Location: USA

PostPosted: Sat May 15, 2004 3:31 am   
 
Ok, sorry about that last reply,

The only problem I have now is the command to export the data into a database after I input the identification command.

Thanks in advance for any help.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat May 15, 2004 7:37 am   
 
"(U)se #NEW to add the contents of the record variable as a new record."
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