How do i cast a spell at each mob in the room...
I realize this is probably insanely simple but i am still fairly new to coding and I have been trying to write a script that will cast a spell once at each mob in the room and i am getting nowhere and I was hoping somebody could help me out. It will cast at the first target, then exits and doesn't continue on casting at the others.
Code:
GameObj.npcs.each { |mob|
if mob.status !=~ /dead|gone/
1.times {
fput "prep 917"
fput "cast ##{mob.id}"
waitcastrt?
waitrt?
}
end
}
If somebody could help me out it would be most appreciated.