|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Wed May 28, 2008 10:43 pm
Ok for those that have an extra bit of Time, want help creating a equipment DB |
Ok using the spell or scroll to cast identify on item you get examples like this
You recite a scroll of insight which turns to dust in your hands.
a wicked waraxe covered in runes weighs 15 pounds and is worth roughly 81 platinum, and 9 gold.
The following abilities are granted when using this item:
HASTE REGENERATION
The item is magical, protection against being slept, protection against being charmed, able to float on water, throwable, and automatically returning.
This item appears to be imbued with some magic beyond your comprehension!
You feel as if there is something more to a wicked waraxe covered in runes that you can't quite reveal!
You magically sense that the damage dice for this weapon are '4D5'
This item also affects your:
HITROLL by +3
DAMROLL by +6
For axe it should populate something like this
#say Item: a wicked waraxe covered in runes Dice:4d5 Affects: Hitroll by+3 Damroll by+6 Proc:Yes Grants:HASTE REGENERATION Effects: Magical !Charm !Sleep Float Throw Return
You recite a scroll of insight which turns to dust in your hands.
a spiked dragonskin bracelet weighs 1 pounds and is worth roughly 19 platinum.
The following abilities are granted when using this item:
FARSEE
The item is magical and able to float on water.
This item also affects your:
HITROLL by +2
DAMROLL by +3
For Bracelet should populate something like this.
#say a spiked dragonskin bracelet: Hit:te2 Dam:+3 Grants:Farsee
Then it should store that info into DB so when i get a previously Identified item from some container it #says the stats agian
You get a spiked dragonskin bracelet from an adventurers backpack.
#say Item: a spiked dragonskin bracelet Affects: Hitroll by +2 Damroll by+3 Grants:Farsee
Not sure what additional info you may need to help with this. I'm not even sure where to get started. This is for those with the time to help. |
|
Last edited by Ggoss on Wed May 28, 2008 10:47 pm; edited 1 time in total |
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Wed May 28, 2008 10:45 pm |
Here is another example from the spell identify being cast
You complete your spell...
a dwarven earring weighs 1 pounds and is worth roughly 19 platinum, 3 gold, 9 silver, and 2 copper.
The item is magical.
This item also affects your:
HITPOINTS by +14
SV_SPELL by -2
#say Item:a dwarven earring Affects:Hitpoints by +14 Sv_Spell by -2 |
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Thu May 29, 2008 1:02 am |
Ok i've been trying to follow through some other peoples work, but i'm not sure how to capture the line after what starts the trigger
I want to Trigger off of
#Trigger {You complete your spell...}
then it should capture the next line name for example
it needs to capture
a dwarven earring for &{item.name}
then i need another trigger for
#Trigger {This item also affects your:}
capturing HITPOINTS by +14 and Sv_Spell by -2 &{item.Affects}
or i could also do multiple seperate triggers for each affect, but would like to make it one line if i can. Then after my DB captures all info it needs to #say it so i can see it as i posted above. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu May 29, 2008 5:02 pm |
Does the mud send anything specific AFTER the complete description? If so, that would be helpful
I would suggest starting with a multistate trigger. The first state would trigger on "You complete your spell...", and does nothing. The second state would trigger on the "weighs" line. For the rest of it, you may have to turn a separate trigger on and off.
To be more specific, we'd have to know exactly what information you want to capture. For instance, do you want to capture the weight and value? |
|
|
|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Fri May 30, 2008 2:03 am |
You might want to read this. The sections Loop Lines and Resetting Triggers might give you some ideas that tie in with Rehab's suggestion.
|
|
_________________ Sic itur ad astra. |
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Fri May 30, 2008 5:53 am |
Everything the mud sends is in my first 2 posts from the finishing of reciting scroll or casting spell to end of the item. I want to capture name, granted abilities, granted affects, dice, and whether the item is magical, prot from sleep, prot from charm, floats, throwable, returning, also need to detect if item has a proc (which is the imbued with magic beyond comprehension line) I underlined the stuff that should be captured. Most of the stuff is from a previous line.
You recite a scroll of insight which turns to dust in your hands.
a wicked waraxe covered in runes weighs 15 pounds and is worth roughly 81 platinum, and 9 gold.
The following abilities are granted when using this item:
HASTE REGENERATION
The item is magical, protection against being slept, protection against being charmed, able to float on water, throwable, and automatically returning.
This item appears to be imbued with some magic beyond your comprehension!
You feel as if there is something more to a wicked waraxe covered in runes that you can't quite reveal!
You magically sense that the damage dice for this weapon are '4D5'
This item also affects your:
HITROLL by +3
DAMROLL by +6 |
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Fri May 30, 2008 5:54 am |
i can trigger of each item for the affects stuff, but was wondering if i could do it quicker. I was looking at the looping thing, i'll mess with it some more see if i can get it to do what i want.
|
|
|
|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Fri May 30, 2008 6:10 am |
I don't know of a way (which doesn't mean that there isn't one) but that is why triggers exist, to do the kind of stuff you are hoping to do.
Different MUDs generate different IDENTIFY output, but they are basically the same at the core. You just have to capture the information and massage it the way you want for your purposes. The way your MUD displays the data is a lot easier to capture and process than some other where the information is more fancifully displayed making designing triggers a lot trickier. One other thing you could do since the output from the spell is rather verbose and contains waste text, is to send your data to a string list and then at your leisure process the string list using %regex() or match().
Then you could do something like:
Code: |
$index = %ismember("The following abilities are granted when using this item:",@datalist) + 1
|
Then $index would contain the string list entry where the abilites would be iterated and you can process that block just for that type of info.
Just a suggestion, mind you. The same thing can be done within the trigger, but if you are concerned with processing speed, post-processing a string list is much faster tha real-time processing the data within the trigger, since each trigger will have to wait for completion of the previous firing. That is why you see the MUD output stutter when data is being processed. Either way works, though. |
|
_________________ Sic itur ad astra. |
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Sat May 31, 2008 7:26 am |
Yeah i think this might be beyond my basic abilities to code. Someone wanted it, and i thought about making it for myself in the passed, so figured i'd try agian, but yeah...
|
|
|
|
|
|