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

Forging unfinished workorders (drawknife) leads to a ;shaping script failure when the unfinished drawknife(s) accumulate--error checking is needed. #1698

Closed cafeTechne closed 7 years ago

cafeTechne commented 7 years ago

Upon review it looks like the problem was ultimately caused by the error checking not differentiating the fact that my oil was in a pack in my pack... How would we introduce error checking for this use-case where you have oil in a nested bag of the same name (pack in pack)?

I included game console output of the first failure, and then the failure that resulted as a consequence!


[forge]>get my short.pole

You get a short oak pole from inside your traveler's pack.

[forge]>assemble my drawknife with my short.pole

You place your pole with your short drawknife and carefully mark where it will attach when you continue crafting.

[forge]>get my oil

What were you referring to?

[forge: You seem to be missing: oil]

--- Lich: forge has exited.

[DRPrime]-DR:Embrace: "I think so too" [workorders]>get my forging logbook

You get a forging work order logbook from inside your traveler's pack.

[workorders]>bundle my drawknife with my logbook

Only completed items can be bundled with the work order.

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

[workorders: messages seen length: 1]

[workorders: message: Only completed items can be bundled with the work order.]

[workorders: checked against [/You notate the/i, /This work order has expired/i, /The work order requires items of a higher quality/i, /That's not going to work/i]]

[workorders]>stow right

You put your drawknife in your traveler's pack.

[workorders]>stow left

You put your logbook in your traveler's pack.

--- Lich: go2 active.

[go2: ETA: 0:00:00 (3 rooms to move through)]

[go2]>go building

The sun sinks below the horizon, turning the clear sky a thousand shades of ever-deepening blue as the day fades into night.

[Forging Society, Book Store] Freshly chiseled granite walls surround an area where forgers can quickly resupply. A passageway covered by a leather flap pierces the wall to the south, and from the passage resound the clangs of an anvil chorus. A simple wooden door leads back outside. You also see a large sign and a prestige board. Obvious exits: south.

Room Number: 8771

[go2]>south

You go south.

[Forging Society, Lobby and Maker's Mark Ordering] A chamber with stone walls and a lofty, vaulted ceiling links the rooms of the forge. Its high arches help to subdue the clangor, letting it rise and echo in the space overhead. Waves of heat and flickering reddish light from the foundries to the west strive with the scream of the grindstones to the east and the pounding din of metal on metal from the smithies to the south. You also see a blacksmithing chart hanging from the wall, a weaponsmithing chart hanging from the wall, an armorsmithing chart hanging from the wall and a large sign. Obvious exits: north, east, south, west.

Room Number: 8772

[go2]>south

You go south.

[Forging Society, Supplies] A chamber with stone walls and a lofty, vaulted ceiling links the rooms of the forge. Its high arches help to subdue the clangor, letting it rise and echo in the space overhead. Waves of heat and flickering reddish light from the foundries to the west strive with the scream of the grindstones to the east and the pounding din of metal on metal from the smithies to the south. You also see an eastern arch, a western arch, a central arch and a large sign. Obvious exits: north.

Room Number: 8775

[go2: travel time: 0:00:01]

--- Lich: go2 has exited.

[workorders]>order 11

The attendant says, "You can purchase a huge bronze ingot for 562 Kronars. Just order it again and we'll see it done!"

[workorders]>order 11

The attendant takes some coins from you and hands you a huge bronze ingot.

[workorders]>stow left

You put your ingot in your traveler's pack.

[smith]>wealth kronars

21 platinum, 14 gold, 8 bronze, and 8 copper Kronars (224,088 copper Kronars).

[smith]>get my short pole

What were you referring to?

--- Lich: go2 active.

[go2: ETA: 0:00:00 (2 rooms to move through)]

[go2]>north

You go north.

[Forging Society, Lobby and Maker's Mark Ordering] A chamber with stone walls and a lofty, vaulted ceiling links the rooms of the forge. Its high arches help to subdue the clangor, letting it rise and echo in the space overhead. Waves of heat and flickering reddish light from the foundries to the west strive with the scream of the grindstones to the east and the pounding din of metal on metal from the smithies to the south. You also see a blacksmithing chart hanging from the wall, a weaponsmithing chart hanging from the wall, an armorsmithing chart hanging from the wall and a large sign. Obvious exits: north, east, south, west.

Room Number: 8772

[go2]>east

The wings of your boots stretch for a moment.

You go east.

[Forging Society, Tool Store] Masters and journeyman of the forging craft find a home in this room purchasing tools and ingredients. Loud thumps and groaning accompany the loading and unloading of goods from storage. You also see Forging Society Mistress Yalda, a clerk, a sturdy low counter with a small placard on it, a large sign and a steel crate. Also here: Merchant Marine Barder. Obvious exits: north, south, west.

Room Number: 8776

[go2: travel time: 0:00:01]

--- Lich: go2 has exited.

[smith]>buy short pole

You decide to purchase the pole, and pay the sales clerk 100 Kronars. The sales clerk hands you your short pole.

[smith]>stow short pole

You put your pole in your traveler's pack.

[smith]>inv search flask of oil

You rummage about your person, looking for something...

Your oil is in a dark oilcloth pack with reinforced straps, which is in an oiled leather traveler's pack.

Roundtime: 6 secs

[Type INVENTORY HELP for more options] R> [smith]>tap anvil

I could not find what you were referring to.

--- Lich: go2 active.

[go2: ETA: 0:00:00 (1 rooms to move through)]

[go2]>north

You go north.

[Forging Society, Forge] Several large grindstones on wooden frames stand in the middle of the workroom. From time to time, a Dwarven apprentice scatters sand over the floor, both for more secure footing and as a safeguard against fire from the sparks cascading off the grindstones. A high-pitched keening and the smell of hot metal rise from those in use and from others to the south. You also see a glowing forge, an iron anvil, a pile of fuel, a slack tub filled with water and a large waste bucket. Obvious exits: south.

Room Number: 8778

[go2: travel time: 0:00:00]

--- Lich: go2 has exited.

[smith]>look on anvil

The anvil's surface looks clean and ready for forging.

--- Lich: forge active.

[forge]>get my blacksmithing book

You get a book of apprentice blacksmithing instructions from inside your traveler's pack.

[forge]>turn my book to chapter 3

You turn your book to chapter 3, entitled "Engineering Tools".

[forge]>read my book

          -=    Chapter 3 : Engineering Tools    =-

Page 1: some short metal chisels Page 6: a metal straight bone saw Page 2: a short metal drawknife Page 7: a metal straight wood saw Page 3: some long metal chisels Page 8: a long metal drawknife Page 4: some square metal rifflers
Page 5: a thin metal rasp

[forge]>turn my book to page 2

You turn your book to page 2, instructions for crafting a short metal drawknife.


//here is me manually unloading a bunch of the drawknifes in order to fix the shaping loop You get an unfinished short bronze drawknife from inside your traveler's pack. P> drop my draw

You drop an unfinished short bronze drawknife.

P> get my draw drop my draw

You get an unfinished short bronze drawknife from inside your traveler's pack. P> get my draw

You drop an unfinished short bronze drawknife.

P> drop my draw get my draw

You get an unfinished short bronze drawknife from inside your traveler's pack. P> drop my draw

You drop an unfinished short bronze drawknife.

P> get my draw

You get a metal drawknife from inside your traveler's pack. drop my draw P> get my draw

You drop a metal drawknife.

[shape: checked against [/a wood shaper is needed/i, /ready for shaping with a wood shaper/i, /carved with a carving knife/i, /further carving with a knife/i, /continued knife carving/i, /rubbed out with a rasp/i, /A cluster of small knots/i, /Applying the final touches/i, /That tool does not seem suitable for that task./i, /while it is inside of something/i, /Glue should now be applied/i, /glue to fasten it/i, /ready to be clamped/i, /pushed with clamps/i, /pushing it with clamps/i, /Some wood stain/i, /You fumble around but/i, /ASSEMBLE Ingredient1/i]]

[shape]>scrape my lumber with my drawknife

P> What were you referring to? P> What were you referring to? P> What were you referring to? P> What were you referring to? P> What were you referring to? P> You need to be holding a hide scraper tool to do that. P> get draw

You pick up a metal drawknife.

P> stand You stand back up.

look [The Crossing, Town Green Southeast] This tranquil corner of the Green has a small bower of entwined modwyn vines, laden with tempting, grape-like clusters. A limestone bench and some sawed-off sections of trees that serve as rustic stools make up an open-air performance space, where bards, musicians and poets can demonstrate their talents. You also see an unfinished short bronze drawknife, an unfinished short bronze drawknife, an unfinished short bronze drawknife, an unfinished short bronze drawknife, an unfinished short bronze drawknife, an unfinished short bronze drawknife, an unfinished short bronze drawknife, an unfinished short bronze drawknife, an unfinished short bronze drawknife, an unfinished short bronze drawknife, an unfinished short bronze drawknife, an unfinished short bronze drawknife, an unfinished short bronze drawknife, an unfinished short bronze drawknife, an unfinished short bronze drawknife, a young alchemist student, a strong and stately mature oak, a gilded walkway, the Amphitheater gate, a grass path leading behind the amphitheater and a waste bin. Also here: Endith who is lying down and Kawill. Obvious paths: north, west, northwest.

Room Number: 793

cafeTechne commented 7 years ago

As Uidin noted IG, if I had set crafting_items_in_container in the YAML file it would have error checked... here is the relevant line, 118, from common-crafting.lic : command += " from my #{bag}" if bag_items && bag_items.include?(name)