Code:
if !Spell[511].known?
echo "You don't know 511. What you trying to pull here?"
else
GameObj.pcs.each{ |person|
if !checkmana(50) && Spell[515].known? && !Spell[515].active?
echo "Waiting for mana."
wait_until{ checkmana(50) }
end
Spell[515].cast if !Spell[515].active? && Spell[515].known?
if !checkmana(16)
echo "Waiting for mana."
wait_until{ checkmana(16) }
end
Spell[511].cast("##{person.id}") if checkmana(16) && !GameObj.loot.find{ |item| item.noun =~ /disk|coffin/ && item.name =~ /#{person}/ }
}
Spell[511].cast(checkname) if checkmana(16) && !GameObj.loot.find{ |item| item.noun =~ /disk|coffin/ && item.name =~ /#{checkname}/ }
end