This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Change Required in Nick Completer

Help for those learning Tcl or writing their own scripts.
Post Reply
B
Brut
Voice
Posts: 7
Joined: Fri Sep 20, 2019 1:10 am

Change Required in Nick Completer

Post by Brut »

Code: Select all

alias firstchar {
  if (!$isid) { return }
  var %a = 1, %b, %c, %d, %t = $1-
  while ($gettok(%t,%a,32)) {
    %b = $v1
    %c = $upper($left(%b,1))
    %d = $lower($mid(%b,2))
    %t = $replace(%t,%b,$+(%c,%d))
    inc %a
  }
  return %t
}


on *:input:#: {
  if ($left($1,1) != /) {
    var %x = 1, %z = $1-
    while ($ [ $+ [ %x ] ]) {
      var %y = $nick(#,0)
      while (%y) {
        if ($nick(#,%y) == $eval($ [ $+ [ %x ] ])) {
          var %z = $replace(%z,$nick(#,%y),$+($nickcom($nick(#,%y).pnick),))
        }
        dec %y
      }
      inc %x
    }
    ;---------- Text replacements
    var %z = $text_replace(%z)
    ;-----------
    msg # $firstchar(%z)
    halt
  }
}

on *:input:?: {
  if ($left($1,1) != /) {
    var %x = 1, %z = $1-
    while ($ [ $+ [ %x ] ]) {
      if ($target == $eval($ [ $+ [ %x ] ])) {
        var %z = $replace(%z,$target,$+($nickcom($target),))      
      }
      inc %x
    }
    ;---------- Text replacements
    var %z = $text_replace(%z)
    ;-----------
    msg $target $firstchar(%z)
    halt
  }
}
;---------- Text replacements
alias text_replace {
  var %z = $1-
  var %z = $reptok(%z,lol,laυgн oυт loυd,0,32)
  var %z = $reptok(%z,brb,ße ßight ßack,0,32)
  var %z = $reptok(%z,tyt,Takê you® Timê,0,32)
  var %z = $reptok(%z,LOLZ,7P14ait 7P14akar 7P14akar 7K14ar 7H14ansinG,0,32)
  var %z = $reptok(%z,ala,Alhamdolilah! I'm fine.,0,32)
  var %z = $reptok(%z,ah,Allah NiGheBaN.,0,32)
  var %z = $reptok(%z,wb,WêL©õme ßã©k,0,32)
  var %z = $reptok(%z,salam,اسلام علیکم ورحمتہ اللہ و برکاتہ αѕѕαℓαм σ αℓαιкυм ωαяαнмαтυℓℓαн ωαвαяαкαтнυ ,0,32)
  var %z = $reptok(%z,ws,وعليكم السلام ورحمة الله وبركاتة - walaιĸυм aѕѕalaм waraнмaтυllaн waвaraĸaтaнυ,0,32)
  var %z = $reptok(%z,wb,wêLçömê ßåck,0,32)
  var %z = $reptok(%z,:o,(°.°),0,32)


  return %z
}

alias nickcom {
  if (($left($1,1) = @) || ($left($1,1) = +)) {
    var %x = $+($left($1,1),$chr(2),$chr(3),$rand(1,15),$mid($1,2,1),$chr(3),$chr(2),$mid($1,3-))
    return %x
  }

  else  {
    var %x = $+($chr(2),$chr(3),$rand(1,15),$left($1,1),$chr(3),$chr(2),$mid($1,2-))
    return %x
  }


}
This is a kind of Mixture of 3 Codes. First Letter each word Capital, Nick Completor and Acronym.
The change required in NICK COMPLETOR, It posts nickname's first letter with Random Color and in Small Caps.
I actually want to remove COLOR Option and Nick its actual position.
Post Reply