Guest User

Untitled

a guest
Feb 21st, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.11 KB | None | 0 0
  1. junk_regex = /^(?:scratched|corroded|polished|shiny|tarnished|dented|rusty|bent) (?:ring|medallion|earring|anklet|bracelet|fork|spoon|plate|coin|cup|nail|doorknob)$|^(?:drake|feras) (?:dagger|mace|greataxe|greatsword|yierka-spur|tiger-claw|scimitar)$|^smooth stone$|^steel shield$|^some tree bark$|^table leg$|^moldy bone$|^some tattered cloth$|^piece of iron$|^chipped brick$|^scratched steel helm$|^steel spring$|^travel guide token$|^empty flask$| armband$| slippers$| shoes$| boots$| tunic$| gloves$| cap$| hat$| hood$| snood$| cookie$| shawl$| cape$| overcoat$| greatcloak$| leggings$| pants$| trousers$| chemise$| tabard$/
  2. fput "look in my pack"
  3. if junk = GameObj.loot.reverse.find { |obj| obj.name =~ junk_regex }
  4.     dothistimeout "get ##{junk.id}", 3, /^You/
  5.     dothistimeout "put ##{junk.id} in barrel", 3, /^As you place|^There appears .*? significant value|^Are you crazy\?!\?  Do you know what that's worth!\?!/
  6.     dothistimeout "put ##{junk.id} in barrel", 3, /^As you place|^There appears .*? significant value|^Are you crazy\?!\?  Do you know what that's worth!\?!|I could not find what you were referring to\./
  7. end
Add Comment
Please, Sign In to add comment