Been meaning to do this one for a while and a friend today decided to ask me for help with messing with the emoticon bs. so i decided i was messing with it anyways may as well give it a go:D
this snippet changes mirc's default way of showing when someone uses emoticons.
this is how mirc shows emoticons that java users use
with this script it will replace the ugly mirc default ^^^ with
the theme will not be there all it will do is show the nick and the smiley no date/time/day or coloration
to use this do alt + r then load this into a new remotes file. then save it. you must either A. load it when not connected to servers then connect or B. disconnect from servers after loading it then reconnect to them
on *:connect: {
ignore -tw *
debug -i aux emoticon
}
alias emoticon {
tokenize 32 $1-
if (PRIVMSG isin $1-) && (IMAGE isin $1-) && (smile isin $1-) {
if ($4 == $me) {
echo -t $remove($gettok($2,1,33),$chr(58)) $remove($gettok($2,1,33),$chr(58)) :)
}
else { $remove($gettok($2,1,33),$chr(58)) :)
}
}
elseif (PRIVMSG isin $1-) && (IMAGE isin $1-) && (sad isin $1-) {
if ($4 == $me) {
echo -t $remove($gettok($2,1,33),$chr(58)) $remove($gettok($2,1,33),$chr(58)) :(
}
else { $remove($gettok($2,1,33),$chr(58)) :(
}
}
elseif (PRIVMSG isin $1-) && (IMAGE isin $1-) && (wink isin $1-) {
if ($4 == $me) {
echo -t $remove($gettok($2,1,33),$chr(58)) $remove($gettok($2,1,33),$chr(58)) ;)
}
else { $remove($gettok($2,1,33),$chr(58)) ;)
}
}
elseif (PRIVMSG isin $1-) && (IMAGE isin $1-) && (cry isin $1-) {
if ($4 == $me) {
echo -t $remove($gettok($2,1,33),$chr(58)) $remove($gettok($2,1,33),$chr(58)) :'(
}
else { $remove($gettok($2,1,33),$chr(58)) :'(
}
}
elseif (PRIVMSG isin $1-) && (IMAGE isin $1-) && (mad isin $1-) {
if ($4 == $me) {
echo -t $remove($gettok($2,1,33),$chr(58)) $remove($gettok($2,1,33),$chr(58)) D:<
}
else { $remove($gettok($2,1,33),$chr(58)) D:<
}
}
elseif (PRIVMSG isin $1-) && (IMAGE isin $1-) && (tongue isin $1-) {
if ($4 == $me) {
echo -t $remove($gettok($2,1,33),$chr(58)) $remove($gettok($2,1,33),$chr(58)) :P
}
else { $remove($gettok($2,1,33),$chr(58)) :P
}
}
elseif (PRIVMSG isin $1-) && (IMAGE isin $1-) && (kiss isin $1-) {
if ($4 == $me) {
echo -t $remove($gettok($2,1,33),$chr(58)) $remove($gettok($2,1,33),$chr(58)) :*
}
else { $remove($gettok($2,1,33),$chr(58)) :*
}
}
elseif (PRIVMSG isin $1-) && (IMAGE isin $1-) && (smirk isin $1-) {
if ($4 == $me) {
echo -t $remove($gettok($2,1,33),$chr(58)) $remove($gettok($2,1,33),$chr(58)) :>
}
else { $remove($gettok($2,1,33),$chr(58)) :>
}
}
elseif (PRIVMSG isin $1-) && (IMAGE isin $1-) && (surprise isin $1-) {
if ($4 == $me) {
echo -t $remove($gettok($2,1,33),$chr(58)) $remove($gettok($2,1,33),$chr(58)) :O
}
else { $remove($gettok($2,1,33),$chr(58)) :O
}
}
elseif (PRIVMSG isin $1-) && (IMAGE isin $1-) && (undecided isin $1-) {
if ($4 == $me) {
echo -t $remove($gettok($2,1,33),$chr(58)) $remove($gettok($2,1,33),$chr(58)) :\
}
else { $remove($gettok($2,1,33),$chr(58)) :\
}
}
elseif (PRIVMSG isin $1-) && (IMAGE isin $1-) && (indifferent isin $1-) {
if ($4 == $me) {
echo -t $remove($gettok($2,1,33),$chr(58)) $remove($gettok($2,1,33),$chr(58)) :/
}
else { $remove($gettok($2,1,33),$chr(58)) :/
}
}
elseif (PRIVMSG isin $1-) && (IMAGE isin $1-) && (evil isin $1-) {
if ($4 == $me) {
echo -t $remove($gettok($2,1,33),$chr(58)) $remove($gettok($2,1,33),$chr(58)) >:D
}
else { $remove($gettok($2,1,33),$chr(58)) >:D
}
}
}
Ryan, you could've done the if-then-else comparison saving yourself an if statement and the repetition of another:
alias emoticon {
tokenize 32 $strip($1-)
if ($count($1-,PRIVMSG,IMAGE)) {
if ($4 == $me) {
echo -t $remove($gettok($2,1,33),$chr(58)) $remove($gettok($2,1,33),$chr(58)) $replace($1-,smile,:),sad,:(,cry,:'(,$&
mad,D:<,tongue,:P,kiss,:*,smirk,:>,surprise,:o,undecided,:\,indifferent,:/,evil,>:D)
}
else {
echo -t $4 $remove($gettok($2,1,33),$chr(58)) $replace($1-,smile,:),sad,:(,cry,:'(,$&
mad,D:<,tongue,:P,kiss,:*,smirk,:>,surprise,:o,undecided,:\,indifferent,:/,evil,>:D)
}
}
}
It's either the nick equals $me or not. A simple true or false.
yelow79, lots of people have such a misconception that on load event will trigger when a script is loaded in a remote. That's not often the case. On occasions mIRC will prompt for initialization of a script, but most of the time it'll require you to load it manually for the onload event to execute. If you copy a simple snippet directly into the remote without a manual load, the load event is useless.
extio, why will you bother with a loop? :/ Do you care to demonstrate to us your idea behind a loop?
also going off of jethros example
alias emoticon {
tokenize 32 $strip($1-)
if ($count($1-,PRIVMSG,IMAGE)) && ($4 == $me) {
echo -t $remove($gettok($2,1,33),$chr(58)) $remove($gettok($2,1,33),$chr(58)) $replace($1-,smile,:),sad,:(,cry,:'(,$&
mad,D:<,tongue,:P,kiss,:*,smirk,:>,surprise,:o,undecided,:\,indifferent,:/,evil,>:D)
}
elseif ($count($1-,PRIVMSG,IMAGE)) && ($4 != $me) {
echo -t $4 $remove($gettok($2,1,33),$chr(58)) $replace($1-,smile,:),sad,:(,cry,:'(,$&
mad,D:<,tongue,:P,kiss,:*,smirk,:>,surprise,:o,undecided,:\,indifferent,:/,evil,>:D)
}
}
that is the corrected version that will work for both channel and pm emoticon messages
yes i probably could use a loop. i could also use a txt or ini to just read from and replace easily. but i tend to like going the simplistic route. when i code i always think about the noobs and i try to code in a way that while may not be the BEST way it might now always look the best but i try to make it so the noobs can easily learn from it and therefore pull it apart easier and go ok this makes this run this is how this can be done and give them a basis to work off of for their own scripts.
Let's shrink it down a bit, Ryan:
alias emoticon {
tokenize 32 $strip($1-)
if ($count($1-,PRIVMSG,IMAGE)) {
echo -t $4 $remove($gettok($2,1,33),$chr(58)) $replace($1-,smile,:),sad,:(,cry,:'(,$&
mad,D:<,tongue,:P,kiss,:*,smirk,:>,surprise,:o,undecided,:\,indifferent,:/,evil,>:D)
}
}
Did you mean $strip($1-) ?