So here's my tweak of the phasing script and it seems to work pretty well...
Code:
starting_container = script.vars[1]
orb_container = script.vars[2]
non_orb_container = script.vars[3]
GameObj.inv.each{ |i|
if i.name =~ /#{starting_container}/i
fput "look in ##{i.id}"
i.contents.each { |item|
if item.type =~ /gem/
fput "get ##{item.id}"
result = Spell[704].cast(item, /becomes somewhat insubstantial and appears lighter|resists the effects of your magic/)
if result =~ /becomes somewhat insubstantial and appears lighter/
fput "drop right"
fput "put ##{item.id} in my #{orb_container}"
break
elsif result =~ /resists the effects of your magic/
fput "put ##{item.id} in my #{non_orb_container}"
break
else
# armor hindrance, no mana, no target, etc
end
end
}
end
}
The only problem is that I'd like to see it repeat until I'm out of mana or the starting_container is done. What should I add for this?