PDA

View Full Version : Targeting Ithzir, leaving Griffins and Constructs alone.



Intel
07-02-2014, 06:22 PM
I was wondering if there was a way to target only Ithzir to put them to sleep, and not cast at griffins or constructs. Also it would not cast at Ithzir that were laying down, would wait till they stood back up.


Ithzir adept
Ithzir initiate
Ithzir scout
Ithzir janissary
Ithzir seer
Ithzir herald


Thanks for the help!

DaCapn
07-02-2014, 07:34 PM
With lich it's pretty straight forward. Here are some things you should look at:

;e target = GameObj.npcs.find { |npc| npc.name =~ /herp derp/ }; echo target.status; echo target.id

For a target list, you can use find_all instead.

m444w
07-02-2014, 08:58 PM
You need to add a status check to that find statement. prone, sleeping, lying*

*lying happens when you don't have room brief descriptions flagged

GameObj.npcs.find{ |creature| creature.name =~ /kobold|troll|velnalin/ && creature.status !~ /prone|sleeping|lying/}