## Singing sword utility script
## var variable is weapon type or hard code in weapon type in line 6
## If weapon is hard coded, change weapon type in Missing subroutine line 26
## Ver 1.0 usable in WL Gaveyard against Pookas and Spectral miners
## Start Singing Sword
fPut Prep 1025
@variable[1] = 'value'
fPut SING variable[1]
#Main loop
Start
If GameObj.npcs.find { |npc| (npc.status !~ /dead/) && (npc.type =~ /aggressive/) }= Spectral Miner then fput TELL WEAPON TO ATTACK Spectral miner
If GameObj.npcs.find { |npc| (npc.status !~ /dead/) && (npc.type =~ /aggressive/) }= Ghostly pooka then fput TELL WEAPON TO ATTACK Ghostly Pooka
if GameObj.pcs == 1 Occupied
match Missing Animated variable[1]
match traveling Lich: go2 active.
if upstream_get =”exit” end
matchwait
goto start
# If Sword not present
Missing:
if checkspell "Singing Sword" fput TELL WEAPON TO RETURN else goto sing
goto start
# Song not being sung
sing:
fPut Prep 1025
fPut SING variable[1]
goto start
# if room is occupied
Occupied:
If GameObj.pcs == 0 fput TELL WEAPON TO CEASE else NEXTROOM
goto start
# Check mana level
Mana:
put mana
if checkmana <=50 fput Stop 1025
echo not enough Mana avalable.
wait_until { mana(90} goto start
goto start
# Go2 Traveling
traveling:
fput TELL WEAPON TO CEASE
wait_until Lich: go2 has exited.
Goto start