1. it's a log easier to read code that's pasted without the n1= stuff. Either paste from the REMOTE tab of alt-R window or if you name your script with filetype .mrc instead of .ini it won't add those n1= stuff.

2. Not sure what you're not seeing work. When a script doesn't do what you want it to do, or vice-versa, it helps to have debug messages to see why things are the way they are. Take this line and put into your script in 2 places. First insert it as a line above the code where you're returning if someone is spamming, and the other place below both of the set -u30's.

Code:
echo 4 -g # $time $scriptline values floodsocial= $+ %floodsocial remain= $+ $var(%floodsocial,1).secs  floodsocial. $+ $nick $+ = $+ %floodsocial. [ $+ [ $nick ] ] remain= $+ $var(%floodsocial. [ $+ [ $nick ] ] ,1).secs



This tells you if either variable is set prior to the event, and if so it tells how long until it clears. Any failed attempt to use the trigger does not reset the countdown.