Very nice! Three comments
I wrote a similar snippet (no Claw sensing) and discovered 3 things:
#1 - to prevent spamming while dead, I put in a loop to check for #charghost and it just does a "wait 1" if you're dead so you don't get the stupid messages flying up your screen about not being able to do it while dead
#2 - if you're on a regular character (read #3 and you'll understand), only do the gosub attack if you're over a certain HP so that you aren't luring in more things while you're low on health
#3 - if you're on a sampire/whammy, disregard #2 and make sure you're always attacking so that you can leech back life! I made the mistake of keeping #2 in for a while on my sampire and it sucked because when I got low, it would stop targeting! LOL
I also like you're check for targeting cursor and something being currently lifted!! I might just have to add that to mine!