I posted a different way to handle that same event with a bit different results. This might be easier for you to figure out how to apply for your own setup:
http://www.eqemulator.net/forums/showthread.php?t=24869
At least you might be able to get some ideas from that. I am sure it could have been done better, but actually works pretty well as it is.