egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Change Required in Nick Completer

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Brut
Voice


Joined: 20 Sep 2019
Posts: 7

PostPosted: Wed Jan 15, 2020 2:08 am    Post subject: Change Required in Nick Completer Reply with quote

Code:

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber