Smiley Exchange

By log2 on Aug 22, 2006

I know this has probably been done before, but I will post my version of it here, plus I haven't seen one... I just wrote this today, and it seems to work for mem tell me if it doesn't for you and we'll see what we can do about it. What it is... It's a script that replaces smilies with coloured ones, there are only a few right now, but if you want more, and don't know how to add them just comment and say which you want added, and I'll add them asap, and re post the snippet here

; ---------------------------------------
; Smiley replacer by Log2 Stew
; This will replace all the smilies
; such as :D or :) with their coloured
; counterpart
; ---------------------------------------
; List of Smilies:
; :D :d - Grinningly Happy
; :( - Sad Guy
; :) - Happy
; :p :P - Tongue out (works for both)
; :@ - Mad guy
; :o :O :0 - Shocked guy (Note: one is a 0 (zero) and the other is O (Capital o)
; ---------------------------------------
on *:INPUT:#: {
  if ($left($1,1) != $chr(47)) {
    var %txt = $1-
    var %txt = $smiley(:D,1 $+ $chr(44) $+ 8 $+ : $+ 4 $+ D $+ 1 $+ $chr(44) $+ 0, %txt)
    var %txt = $smiley(: $+ $chr(41),1 $+ $chr(44) $+ 8 $+ : $+ 4 $+ $chr(41) $+ 1 $+ $chr(44) $+ 0, %txt)
    var %txt = $smiley(:p,1 $+ $chr(44) $+ 8 $+ : $+ 4 $+ P $+ 1 $+ $chr(44) $+ 0, %txt)
    var %txt = $smiley(:@,5 $+ $chr(44) $+ 4 $+ : $+ 1 $+ @ $+ 1 $+ $chr(44) $+ 0, %txt)
    var %txt = $smiley(:o,1 $+ $chr(44) $+ 8 $+ : $+ 4 $+ O $+ 1 $+ $chr(44) $+ 0, %txt)
    var %txt = $smiley(:0,1 $+ $chr(44) $+ 8 $+ : $+ 4 $+ O $+ 1 $+ $chr(44) $+ 0, %txt)
    var %txt = $smiley(: $+ $chr(40),12 $+ $chr(44) $+ 8 $+ : $+ 4 $+ $chr(40) $+ 1 $+ $chr(44) $+ 0, %txt)
    msg $chan %txt
    haltdef
  }
}
alias smiley {
  if ($findtok($3-,$1,1,32)) {
    var %txt = $3-
    while ($findtok(%txt ,$1,1,32)) {
      if (c isin $chan(#).mode) {
        var %txt = $strip($reptok(%txt , $1, $2, 32))
      }
      else {
        var %txt = $reptok(%txt, $1, $2, 32)
      }
    }
    return %txt 
  }
  return $3-
}

Comments

Sign in to comment.
Alien_wkshop   -  Aug 26, 2006

another way i couldnt get yours to work so made my own
im not that good so have to right for each smily

on :TEXT:=):#:{
/set %randhard. [ $rand(1,7) ]
if (%randhard. == 1) {
/msg $chan 9=)
/unset %randhard. [
]
}
elseif (%randhard. == 2) {
/msg $chan 12=)
/unset %randhard. [ ]
}
elseif (%randhard. == 3) {
/msg $chan 5=)
/unset %randhard. [
]
}
elseif (%randhard. == 4) {
/msg $chan 4=)
/unset %randhard. [ ]
}
elseif (%randhard. == 5) {
/msg $chan 10=)
/unset %randhard. [
]
}
elseif (%randhard. == 6) {
/msg $chan 13=)
/unset %randhard. [ ]
}
elseif (%randhard. == 7) {
/msg $chan 14=)
/unset %randhard. [
]
}
}

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.