a small update for your script :)

never use classIds, but the names (since they are always up2date
added targetLib for using closest to mouse target
blocks the hotkey for the game if pressed and casting
some other minor improvements