Completar Nick (Pedido por [FracTaL])

Ayuda general en cuanto a programación de Scripts para mIRC.
Avatar de Usuario
Cadaver
Administrador
Administrador
Mensajes: 7
Registrado: Mar Dic 04, 2018 1:01 pm
Agradecido : 3 veces
Agradecimiento recibido: 1 vez

Completar Nick (Pedido por [FracTaL])

Mensaje por Cadaver » Mié Mar 13, 2019 5:27 pm

Script para completar nicks elaborado a petición de [FracTaL]

Código: Seleccionar todo

;#############################
; Completar Nick Por Cadaver
;#############################

menu channel,status,menubar, {
  -
  Completar Nick
  .$iif($group(#cn).status == off ,Habilitar):.enable #cn | echo $+($chr(2),$chr(3),12,C,$chr(3),14,ompletar) $+($chr(3),12,N,$chr(3),14ick) $+($chr(3),4,HABILITADO!)
  .$iif($group(#cn).status == on ,Deshabilitar):.disable #cn | echo $+($chr(2),$chr(3),12,C,$chr(3),14,ompletar) $+($chr(3),12,N,$chr(3),14ick) $+($chr(3),4,DESHABILITADO!)
  -
}

#cn on
on *:input:#: {
  if ($left($1,1) != $chr(47)) {
    var %a 1 | var %t $1-
    while (%a <= $numtok(%t,32)) {
      if ($gettok(%t,%a,32) ison $chan) { 
        var %n = $nick($chan,$nick($chan,$ifmatch)) | var %nl = $len(%n) | var %i = 1
        while (%i <= %nl) {
          if (%i = 1) && ($isupper($mid(%n,%i,%i))) { var %nf = $+($chr(2),$chr(31),$chr(3),$base(1,10,16,1),$mid(%n,%i,%i),$chr(31)) }
          if (%i = 1) && (!$isupper($mid(%n,%i,%i))) { var %nf = $+($chr(2),$chr(31),$chr(3),$base(1,10,16,1),$mid(%n,%i,%i),$chr(31)) }
          if (%i > 1) && (%i <= $round($calc($+(%nl)/2),0)) && ($isupper($mid(%n,%i,1))) { var %nf = $+(%nf,$chr(3),$base(1,16,10,2),$mid(%n,%i,1)) }
          if (%i > 1) && (%i <= $round($calc($+(%nl)/2),0)) && (!$isupper($mid(%n,%i,1))) { var %nf = $+(%nf,$chr(3),$base(1,16,10,2),$mid(%n,%i,1)) }
          if (%i > 1) && (%i <= $round($calc($+(%nl)/2),0)) && ($isnum($mid(%n,%i,1))) { var %nf = $+(%nf,$chr(3),$base(1,16,10,2),$mid(%n,%i,1)) }          
          if (%i > $round($calc($+(%nl)/2),0)) && (%i < %nl) && ($isupper($mid(%n,%i,1))) { var %nf = $+(%nf,$chr(3),$base(e,16,10,1),$mid(%n,%i,1)) }
          if (%i > $round($calc($+(%nl)/2),0)) && (%i < %nl) && (!$isupper($mid(%n,%i,1))) { var %nf = $+(%nf,$chr(3),$base(e,16,10,1),$mid(%n,%i,1)) }
          if (%i > $round($calc($+(%nl)/2),0)) && (%i < %nl) && ($isnum($mid(%n,%i,1))) { var %nf = $+(%nf,$chr(3),$base(e,16,10,1),$mid(%n,%i,1)) }          
          if (%i = %nl) && ($isupper($mid(%n,%i,1))) { var %nf = $+(%nf,$chr(31),$chr(3),$base(e,16,10,1),$mid(%n,%i,1),$chr(2),$chr(31),$chr(3)) }
          if (%i = %nl) && (!$isupper($mid(%n,%i,1))) { var %nf = $+(%nf,$chr(31),$chr(3),$base(e,16,10,1),$mid(%n,%i,1),$chr(2),$chr(31),$chr(3)) }
          if (%i = %nl) && ($isnum($mid(%n,%i,1))) { var %nf = $+(%nf,$chr(31),$chr(3),$base(e,16,10,1),$mid(%n,%i,1),$chr(2),$chr(31),$chr(3)) }          
          inc %i
        }
        var %t = $replace(%t,%n,%nf)
      }
      inc %a
    }
    say %t
    halt
  }
}
#cn end
Resultado Final:
Imagen
Responder