Instead of setting a variable use /var, that way its local to the script and not a global variable. maybe something like:
on 1:TEXT: !briefcase:#:{
var %x $rand(1,3), %m
if (%x == 1) %m = pulls a pistol out of a briefcase and shoots $nick in the head
elseif (%x == 2) %m = pulls a pellet gun out of a briefcase and shoots $nick in the chest
else %m = pulls out a huge wad of money and tosses it to $nick
describe $chan %m
}
Take a look at mine: http://www.hawkee.com/snippet/5017/
You should setup an alias so you don't have to /write Ugly HTML ASDKLASDJLJ ASJD ASD SD JLKASD:L ect in it. my 2 cents.
You should use $timestamp for the time, I personally like my own timestamp format better than just hh:nn, my 2 cents. Oh, About the long name thing, you could also have a variable with the longest length, then if the new name is longer, you can loop through the buffer and realign everything again, that would be cool. Oh and use [img] tags on the description.
#sent.comp on
on *:INPUT:*:{ if (/* !iswm $1-) && ($active != Status Window) { msg $active $regsubex($regsubex($1-,/^((?:\x03\d{0,2}(?:,\d{0,2})?|\x02|\x1f|\x22)*(?:[a-z]))/, $upper(\t)), /([^.?!])$/, \t $+ $chr(46)) | halt } }
#sent.comp end
menu channel,status,query {
Sentance Completer
.$iif($group(#sent.comp).status == on, Disable, Enable) : $iif($group(#sent.comp).status == on, .disable #sent.comp, .enable #sent.comp)
}
My version of it, handles colors, punctuation at the end, updated menu
Extremely inefficient code and pretty much useless, could have used 1 on text and instead of:
elseif ($2 == $nick) { /describe $chan prepairs a glass pipe and passes it to $nick . }
elseif ($2 == $null) { /describe $chan prepairs a glass pipe and passes it to $nick . }
could have been
elseif (($2 == $nick) || (!$2)) { /describe $chan prepairs a glass pipe and passes it to $nick . }
Pretty funny though 3/10.