|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Sun Jun 01, 2003 2:22 am
Scripting and database [ver 6.62] |
DragonRealms is a very skills-based game - you don't have a general exp pool, but instead an individual exp pool for each skill. I'm trying to create a script to capture individual skill ranks and record them to my database.
Here is a sample of experience from my young paladin (multiple spaces replaced by . . .):
quote: Circle: 10
Showing only skills with field experience.
To see all your skills, type EXP ALL
SKILL: Rank/Percent towards next rank/Amount learning
Primary Magic: 15 47% learning . . . Harness Ability: 15 96% learning
Power Perceive: 22 58% thoughtful . . . Perception: 17 22% pondering
Foraging: 11 66% learning . . . Mechanical Lore: 20 91% concentrating
Appraisal: 18 15% learning
Time Development Points: 5 Favors: 5 Deaths: 3
Overall state of mind: clear
The database has the name of each skill in the Field "Skill" (there are 63 in all) and a few numbers and whatnot for other fields. I currently have my trigger set up as: quote: (*): (*) (*)~% ({clear|learning|thoughtful|pondering|concentrating|muddled|very muddled|perplexing|perplexed|bewildered|bewildering|dazed|mind lock})
(the "clear|learning|etc" is the field experience, also important) This matches successfully (for the first skill of a line - a similar trigger for the second skill), but I'm having difficulty putting the information in the right record. The only way I've successfully done so is by using #LOOPVIEW {#IF {%1=%rec.Skill} {#DBSET %rec.Num}}. But because it has to flip through 63 records for every skill, it pauses for approx 1 second between each skill.
Basically, what I need is a quick way for zMUD to set %rec.Num so that %rec.Skill matches %1. |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Fri Jun 06, 2003 2:40 pm |
I've had some success by naming the fields as the skills, and the records are the various numbers. This way, when a trigger matches %1 as "Heavy Edged", it will work with %db(#,%1), where # is 0 for rank, 1 for current percent, 2 for field experience, etc. While it's correctly and quickly recording the stats in the database, this has reduced a lot of options... and it's got an akward feel to it.
I'd prefer have one field be "Skill", and each record be a different skill. But, I'm still faced with the issue of having zMUD automate without creating 63 seperate but nearly identicle triggers. |
|
|
|
|
|
|
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
|
|