current_room = Room.current.id
target_id = nil
### Singing sword utility Ver 1.0
### Many thanks to Tgo01 who was instrumental in writing this script as I know nothing about Ruby
### Instructions comand format Ssword Var1 var2 var3
### Var1 is then name of the item you wish to create.
### Var2 is the name of a primary critter that you may be hunting
### Var3 is the name of a secondary critter you may encounter in your hunt
### Caution this script when activated will emulate the commands you may use manually while you hunt.
### Remember the rules no AFK while using this script.
before_dying{
waitrt?
fput "say goodbye sword"
fput "stop 1025
}
loop{
if checkmana <= 50
fput "stop 1025"
echo "Running low on mana."
wait_until { checkmana(90) }
end
if !Spell[1025].active? && checkmana>(90)
fput "spell active"
sleep 1
Spell[1025].cast(script.vars[1]) if !Spell[1025].active?
end
fput "tell weapon to return" if Spell[1025].active? && !GameObj.npcs.find{ |i| i.name =~ /#{script.vars[1]}/}
target = GameObj.targets.find{|i| i.name =~ /script.vars[2]|script.vars[3]/i }
if target
if target_id != target.id
fput "tell weapon to attack #{target}"
target_id = target.id
end
end
def this_script_stand_me
until standing?
waitrt?
fput "stand"
end
if Room.current.id != current_room
current_room = Room.current.id
fput "tell weapon to cease" if checkpcs
end
if running? "go2"
fput "tell weapon to cease"
wait_while{ running?('go2') }
end
sleep 0.5
}