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

Bundle logic fails with summoned weapons #333

Closed rpherbig closed 8 years ago

rpherbig commented 8 years ago
[combat-trainer]>skin

Moving with impressive skill and grace, you effortlessly retrieve a perfect pelt from the silver-backed bear.
Roundtime: 2 sec.

* Tentatively, a silver-backed bear charges with surprising speed at you.  You evade.  
[You're nimbly balanced and in better position.]

[combat-trainer]>get bundling rope

You need a free hand to pick that up.

Your formation of a targeting pattern around a silver-backed bear has completed.
* Looking as if this were a bad idea, a silver-backed bear swipes with powerful and sharp claws at you.  You knock aside nearly all the claw with a stone marauder blade.  
[You're nimbly balanced and in better position.]
* In a weak and directionless display of aggression, a silver-backed bear swipes with powerful and sharp claws at you.  You beat off nearly all the claw with a stone marauder blade.  
[You're adeptly balanced and in superior position.]

[combat-trainer]>bundle

Where did you intend to put that?  You don't have any bundles or they're all full or too tightly packed!  Type BUNDLE HELP for more details.

[combat-trainer]>wear bundle

Wear what?

This occurs because (currently) summoned weapons do not have any data in gear, so equipmanager cannot look up the tie/stow/wear info for use in the stow_weapon call (see https://github.com/rpherbig/dr-scripts/blob/master/combat-trainer.lic#L342).

rpherbig commented 8 years ago

After the change in 3c12d233e55e66d3a2a6e5ba0c858dbe7447a9c5, the behavior is better (not yet correct though):

[combat-trainer]>skin

Moving with impressive skill and grace, you effortlessly retrieve a perfect pelt from the dire bear.
Roundtime: 2 sec.

[combat-trainer]>get bundling rope

You need a free hand to pick that up.

[combat-trainer: failed to match a weapon for bola]

[combat-trainer]>drop my pelt

You drop a bear pelt.

[combat-trainer]>loot

You search the dire bear.
You find nothing of interest.
A dire bear rots away into nothingness.
rpherbig commented 8 years ago

The root cause of this is what you need both hands to make a bundle. Summoned weapons are finicky in terms of emptying your hands.

Keep in mind that elemental weapons can be stowed or dropped, but only for a few seconds. Moonblades cannot be stowed or dropped, but can be worn.

A possible solution for this is to move the logic in SetupProcess::check_weapon to, say, equipmanager. While I'd hate to break my elemental weapon just to make a bundle, it should only happen 0 or 1 times per hunt.