rpherbig / dr-scripts

A series of Lich 5 (https://github.com/elanthia-online/lich-5) scripts for use with DragonRealms (http://www.play.net/dr/). Donations are welcome (http://www.paypal.me/rcuhljr)!
GNU General Public License v2.0
53 stars 177 forks source link

Looting needs to be more specific #393

Closed rpherbig closed 8 years ago

rpherbig commented 8 years ago

"Coral deerskin scarf" matches "coral".


You search the pile of rubble.
The rubble was carrying a coral deerskin scarf!
The rock guardian closes to pole weapon range on you!
* Tentatively, a rock guardian feints low at you.  You evade, stepping aside with ease.  
[You're nimbly balanced and in excellent position.]
A pile of rubble crumbles into dark minerals and sifts in between the cracks of the rocks until it's completely gone.

[combat-trainer]>stow coral

Stow what?  Type 'STOW HELP' for details.

[combat-trainer]>attack

< Moving in gracefully, you jab a steel akabo at a rock guardian.  A rock guardian fails to dodge, stepping partly into the blow.  The akabo lands a good hit (2/23) to the guardian's back.
[You're nimbly balanced and in strong position.]
[Roundtime 1 sec.]

[combat-trainer: action count: 2 vs 10]

[combat-trainer: skill exp: 1 vs 4]

[combat-trainer]>stow coral

Stow what?  Type 'STOW HELP' for details.
rpherbig commented 8 years ago

Here is the correct text:

[combat-trainer]>stow coral

You pick up a medium chunk of coral.
You open your pouch and put the chunk of coral inside, closing it once more.
rcuhljr commented 8 years ago

I'm thinking we can just anchor the loot to the end of the string. The current loot regex is /\b#{noun}/i I'd suggest changing that to /\b#{noun}$/i

rpherbig commented 8 years ago

I'll make that change locally and run it to see if anything goes haywire.

On Tue, May 24, 2016 at 3:18 PM, Robert Uhl notifications@github.com wrote:

I'm thinking we can just anchor the loot to the end of the string. The current loot regex is /\b#{noun}/i I'd suggest changing that to /\b#{noun}$/i

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/rpherbig/dr-scripts/issues/393#issuecomment-221369256

rpherbig commented 8 years ago

I looked at combat-trainer (LootProcess), but the regex there is /\b#{item}/. Is that where the change needs to be made?

rpherbig commented 8 years ago

b82749b19bff2f8f90cc663e759ae033fa447451