As a Bard we get an animated sword, one of the issues is stopping in the middle of a hunt to execute a command. The commands are pretty basic but I wanted to make using the Singing Sword a bit more controllable. for instance if you walk into a room and other players are there It should CEASE it's attack, If it gets stuck somewhere to have it RETURN. Also a Bard may be singing a bunch of songs so a check to see if mana was low. I tried using strormfront scripts but saw Lich had some handles that would do this easily. So I tried to convert my script to Lich and here is my result:
## 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
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
goto start
# If Sword not present
if checkspell "Singing Sword" fput TELL WEAPON TO RETURN else goto sing
goto start
# Song not being sung
fPut Prep 1025
fPut SING variable[1]
goto start
# if room is occupied
If GameObj.pcs == 0 fput TELL WEAPON TO CEASE else NEXTROOM
goto start
# Check mana level
put mana
if checkmana <=50 fput Stop 1025
echo not enough Mana avalable.
wait_until { mana(90} goto start
goto start
# Go2 Traveling
wait_until Lich: go2 has exited.
Goto start
Well as you can see it doesn't even get to singing the song before it errors out. Would one of you all take a look and help me correct my errors?