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 178 forks source link

error in pick #284

Closed hwoo79 closed 8 years ago

hwoo79 commented 8 years ago

I'm sure this has something to do with a setting that I'm missing in my yaml, but I've tried to search for ensure_copper_on_hand and lockpick_costs and am coming up with nothing.

>
--- Lich: error: comparison of Fixnum with nil failed
    common:407:in `>='
    common:407:in `ensure_copper_on_hand'
--- Lich: pick has exited.
rpherbig commented 8 years ago

It looks like you have lockpick_type: master in your yaml file. pick uses that to refill your lockpick ring when it is done. Pick does a lookup on @lockpick_costs to figure out how much money it needs to have on hand. Since master is not in that hash, you got an error.

I'll add a check for unknown pick types and not refill the ring in that case.