 |
Colbey Newbie
Joined: 14 May 2004 Posts: 3 Location: USA
|
Posted: 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. |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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. |
|
|
 |
Colbey Newbie
Joined: 14 May 2004 Posts: 3 Location: USA
|
Posted: 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.
|
|
|
 |
Colbey Newbie
Joined: 14 May 2004 Posts: 3 Location: USA
|
Posted: 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. |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat May 15, 2004 7:37 am |
"(U)se #NEW to add the contents of the record variable as a new record."
|
|
|
 |
|
|