[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  A question of procedure
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

A question of procedure

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by MushclientNewbie   USA  (33 posts)  [Biography] 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.'
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] 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.
[Go to top] 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.


2,929 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]