Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ A question of procedure
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| MushclientNewbie
USA (33 posts) Bio
|
Date
| Mon 03 Oct 2005 10:22 PM (UTC) Amended on Tue 04 Oct 2005 04:03 PM (UTC) by MushclientNewbie
|
Message
| Righto, so I've got the database plugin that Nick made all hacked up and mutilated to suit my perverted whims. It handles sql entry and queries just great, but now I'm stumped about how I want to go about entering all the data that comes from the endless and often random information one might try to collect about a mud. What follows are three examples of stats you might see from an identify:
Object 'leather armor' is type armor, material leather.
Extra flags: none.
Weight is 5, value is 220, level is 22.
Armor class is 7 pierce, 7 bash, 7 slash, and 0 vs. magic.
Object 'two-handed two sword' is type weapon, material steel.
Extra flags: magic antievil.
Weight is 24, value is 3300, level is 26.
Weapon type is two-handed sword.
Damage is 2d12 (average 13).
Affects damroll by 3.
Affects hitroll by 2.
Object 'stolen ring' is type jewelry, material gold.
Extra flags: glow.
Weight is 2, value is 5000, level is 30.
Affects con by 1.
Affects damroll by 1.
Affects hitroll by 1.
From these sorts of lists I've setup a few trigers that capture stats and add them into the database. After a few hours and about 20 triggers I'm starting to get a little nervious about the size of the project I've taken on. Is there something I can do besides setting up dozens of fire-once triggers? Triggers that get activated by the 'type' and etc? Even then I'm running into problems where items like the 'stolen ring' are actually named 'Nice looking ring.' | Top |
|
Posted by
| Ked
Russia (524 posts) Bio
|
Date
| Reply #1 on Wed 05 Oct 2005 07:26 AM (UTC) |
Message
| Normally such matching tasks include a group of triggers to signal the start of processing, a group(s) of triggers to gather data from the main block of text, and a group of triggers to signal the end of processing, close all interim triggers and process the gathered information. Judging from your examples, at least the start and "mining" triggers should be possible to do. You could indeed work off the object type to enable a specific trigger group suited just for that type. If you have a prompt after that output, then you could just use that to close all triggers and process the data, store it in a db, whatever. If you don't have any "standard closure", then you could maybe work out whether each object type has the same last line in its description block and use that for closing. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
10,862 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top