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
52 stars 177 forks source link

Crafting should cancel a craft already in progress #342

Closed rpherbig closed 5 years ago

rpherbig commented 8 years ago

StormFront crashed while doing a workorder. I restarted SF and ran training-manager, which tried to craft again.

--- Lich: sew active.

[sew]>get my tailoring book

You get a book of apprentice tailoring instructions from inside your backpack.

[sew]>turn my book to chapter 5

You turn your book to chapter 5, entitled "Knitted Clothing".

[sew]>turn my book to chapter 5

The book is already turned to chapter 5, entitled "Knitted Clothing".

[sew]>read my book

              -=    Chapter 5 : Knitted Clothing    =-

 Page 1: a knitted napkin                        Page 10: a knitted scarf
 Page 2: a knitted armband                       Page 11: some knitted slippers
 Page 3: some knitted socks                      Page 12: a knitted skirt
 Page 4: a knitted ankleband                     Page 13: a knitted shirt
 Page 5: a knitted headband                      Page 14: some knitted gloves
 Page 6: some knitted mittens                    Page 15: some knitted legwarmers
 Page 7: a knitted hood                          Page 16: a knitted towel
 Page 8: some knitted booties                    
 Page 9: a knitted hat                           

[sew]>turn my book to page 10

You turn your book to page 10, instructions for crafting a knitted scarf.

[sew]>study my book

You scan the knitted scarf instructions with a glance and completely understand all facets of the design.
You now feel ready to begin the crafting process.
Roundtime: 4 sec.

[sew]>put my book in my backpack

You put your book in your backpack.

[sew]>get my knitting needle

You get some iron knitting needles from inside your backpack.

[sew]>get my wool yarn

You get some wool yarn from inside your backpack.

[sew]>knit my yarn with my needles

You are already knitting an unfinished knitted wool hat on the yarn.  You must finish this before starting another project.

[sew: *** No match was found after 15 seconds, dumping info]

[sew: messages seen length: 2]

[sew: message: You are already knitting an unfinished knitted wool hat on the yarn.  You must finish this before starting another project.]

[sew: message:  Python (long time)]

[sew: checked against [/Now the needles must be turned/i, /Some ribbing should be added/i, /Next the needles must be pushed/i, /ready to be pushed/i, /The garment is nearly complete and now must be cast off/i, /Roundtime/i]]

Crafting (the wrong item) continued from this point (since the commands are item-agnostic). And then:

[sew]>stow my needles

You put your needles in your backpack.

[sew]>get my outfitting logbook

You get an outfitting work order logbook from inside your backpack.

[sew]>bundle my scarf with my logbook

That's not going to work.  Type BUNDLE HELP for details.

[sew: *** No match was found after 15 seconds, dumping info]

[sew: messages seen length: 2]

[sew: message: That's not going to work.  Type BUNDLE HELP for details.]

[sew: message:  Python (long time)]

[sew: checked against [/You notate the/i, /This work order has expired/i, /The work order requires items of a higher quality/i]]

[sew]>put my outfitting logbook in my backpack

You put your logbook in your backpack.

--- Lich: sew has exited.

--- Lich: sew active.

[sew]>get my tailoring book

You get a book of apprentice tailoring instructions from inside your backpack.

[sew]>turn my book to chapter 5

You turn your book to chapter 5, entitled "Knitted Clothing".

[sew]>turn my book to chapter 5

The book is already turned to chapter 5, entitled "Knitted Clothing".

[sew]>read my book

              -=    Chapter 5 : Knitted Clothing    =-

 Page 1: a knitted napkin                        Page 10: a knitted scarf
 Page 2: a knitted armband                       Page 11: some knitted slippers
 Page 3: some knitted socks                      Page 12: a knitted skirt
 Page 4: a knitted ankleband                     Page 13: a knitted shirt
 Page 5: a knitted headband                      Page 14: some knitted gloves
 Page 6: some knitted mittens                    Page 15: some knitted legwarmers
 Page 7: a knitted hood                          Page 16: a knitted towel
 Page 8: some knitted booties                    
 Page 9: a knitted hat                           

[sew]>turn my book to page 10

You turn your book to page 10, instructions for crafting a knitted scarf.

[sew]>study my book

You scan the knitted scarf instructions with a glance and completely understand all facets of the design.
You now feel ready to begin the crafting process.
Roundtime: 4 sec.

[sew]>put my book in my backpack

You put your book in your backpack.

[sew]>get my knitting needle

You get some iron knitting needles from inside your backpack.

[sew]>get my wool yarn

You need a free hand to pick that up.
OdnaZvezda commented 8 years ago

Just in case you didn't already know how and for the information of anyone that reads these issues.

study need These needles appear to be used to knit clothing. You think you can read some instructions for making a knitted item, and then knit an appropriate length of yarn with the needles to begin the crafting process. Then you can continue knitting the knitting needles until finished, though turning, pushing or casting of the knitting needles may also be required. If you wish to stop crafting and throw away an unfinished item, just pull the needles. pull need You consider pulling off and discarding an unfinished knitted wool scarf from around your needles.

[Do you really want to discard the scarf from around the needles? Pull the needles one more time to destroy it forever.]

pull need You untie and discard an unfinished knitted wool scarf from around the needles.

rpherbig commented 8 years ago

Thanks!

Do you have messaging for forging and engineering? On Apr 7, 2016 7:41 AM, "OdnaZvezda" notifications@github.com wrote:

Just in case you didn't already know how and for the information of anyone that reads these issues.

study need These needles appear to be used to knit clothing. You think you can read some instructions for making a knitted item, and then knit an appropriate length of yarn with the needles to begin the crafting process. Then you can continue knitting the knitting needles until finished, though turning, pushing or casting of the knitting needles may also be required. If you wish to stop crafting and throw away an unfinished item, just pull the needles. pull need You consider pulling off and discarding an unfinished knitted wool scarf from around your needles.

[Do you really want to discard the scarf from around the needles? Pull the needles one more time to destroy it forever.]

pull need You untie and discard an unfinished knitted wool scarf from around the needles.

— 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/342#issuecomment-206828021

OdnaZvezda commented 8 years ago

forging http://pastebin.com/YCUPsBZn If there is an ingot on the anvil, you can just pick it up and drop it in the bucket(CLEAN won't work)

With engineering, if you're working on stone that is too heavy to pick up, the item you're crafting will be on the ground. If it's in your hand, depending on where you were in the craft, you'll be holding lumber, an unfinished <wood/stone> or the finished item.

rpherbig commented 8 years ago

We may not need to do anything special for forging since we already check rooms for clean anvils.

OdnaZvezda commented 8 years ago

It checks for clean anvils, but it doesn't clean them if there is nobody else in the room. Under extreme circumstances, I've had the script keep checking for clean anvils here in TF because there were ingots or unfinished items on all of them.

rpherbig commented 8 years ago

Cleaning an anvil seems risky. What if done one stepped out for a second and we destroy their item?

I don't think it's likely, but imagine if they left a tool in storage and only noticed after starting, then went to get it?

What do you think?

OdnaZvezda commented 8 years ago

In prime I can see that being an issue, in TF not so much since most things are done by script here. Maybe add an empty room to a list for rechecking if all the other anvils are in use and wait there for 30-60 seconds before cleaning an anvil? (checking to see if that room is in use when you get back to it obviously)

rpherbig commented 8 years ago

@rcuhljr Thoughts?

rcuhljr commented 8 years ago

You can just record a hash of room+anvil contents, if the same item is still there with no one on your second trip clean it off.