@thegingon: Use PHPBB code tags ;) [ and ] instead of < and >
I shudder at the sight of global variables so,
Set %SB $rand(1,18)
At the very least practice using /var -- much cleaner and the value doesn't stick in your variables until the end of time.
Next,
on *:TEXT:*:#: {
set %trigger !
if ($+(%trigger,SantasBag) == $strip($1)) {
This not only includes the variable which, for some reason, you decided to store "!" and use it to compare the line to the trigger.
$+(%trigger,SantasBag)
it would be one thousand times easier to simply write
$+(!,SantasBag)
That being said, that was a re-write of your current code. Like TheGingOn has stated. You could eliminate 2 out of those 3 lines with an expanded TEXT event statement.
On *:TEXT:!SantasBag:#:{
In summary, using goto statements as compared to your method would prove to be a cleaner alternative. However, yours works as it should, which is more than some people can say. Looks good though don't get me wrong.