PDA

View Full Version : help with rogue guild script



ROTOR
11-17-2013, 11:46 AM
Hi all,

I'm trying to work on adding some lock mastery tasks to a rogue script. I've got the script to start bigshot to go out and hunt to collect boxes if needed for the task. I'm trying to get it to kill bigshot once a box is found, return to town and resume the rest of the task. However, I can't get it to recognize all the various boxes without being too generic. So, the problem at the moment is the script will stop if it sees 'trunk' in a room description for example. Or if it sees a box on the ground. How do I get it to recognize the various types of boxes only when looted from a critter?

Any help would be great. Thanks!

DaCapn
11-17-2013, 12:21 PM
Use the type method (see gameobj-data.xml).

For example:
;e GameObj.loot.find_all { |obj| obj.type =~ /box/ }.each { |obj| echo obj.name }