Put in right after
have_disk = GameObj.loot.any? { |obj| (obj.noun == 'disk') and obj.name =~ /#{checkname}/ }
Code:
## quick hack to stop running all over creation
boxdb = [ 'box', 'coffer', 'chest', 'strongbox', 'trunk' ]
unless boxsack = GameObj.inv.find { |obj| obj.name =~ /#{Regexp.escape(UserVars.boxsack.strip)}/i } || GameObj.inv.find { |obj| obj.name =~ /#{Regexp.escape(UserVars.boxsack).sub(' ', ' .*')}/i }
echo "Couldn't find boxsack"
exit
end
fput "open my #{boxsack}"
fput "look in my #{boxsack}"
contents = waitfor("In the .+ you see").gsub(/ and (?:an|a|some)/, ',')
boxes = contents.scan(/\b(?:#{boxdb.join('|')})(?=,|\.)/)
if (boxes.length == 0 || boxes.nil?)
respond ("You got nuttin' here for me\!")
exit
end
## end of quick hack to stop running all over creation
If ya want.
- Smythe