Kurobu's TLI Script (Multi-character auto-login/switcher)

Useful items for all visitors - virus warnings, firewalls, IRC scripts etc

Moderators: Ehlanna, Twerlinger

Kurobu's TLI Script (Multi-character auto-login/switcher)

Postby Kurobu on Tue Feb 05, 2019 5:45 am

Kurobu's TLI Quality of life script for mIRC

- /tli <chan> - Join a channel, see the tlichans hash map for the short names, example /tli inn
- /char <shortname> - Change character (use the shortname for simplicity), example: /char kuro
- /char afk - Change your nickname to nickname-AFK, use /char <shortname> to un-afk
- /tlilogin - if the login doesn't happen automatically for whatever reason, or needing to re-login to Des while already in the channel.
- /tlireload - reloads the hash maps when you change them to reflect the changes you made.

To modify any of your names, just change the corresponding "tlinicks" and "tliauth" hash map entries. Just copy and paste the similar lines for more characters.
Remember, when you modify the hash maps, run /tlireload to update them in memory (or restart mIRC)

ASSUMPTIONS:

  • You use 1 ident password for your IRC nicks (grouped or otherwise), if you don't want it do do nickserv for you, then delete this line (there are two of them) from the on *:connect: { ... } block AND the alias char { ... } block:

    Code: Select all
    ns id %tli.SorceryIdentPW

  • You want to have the same character nick as the last one you were logged into, if not, then delete this line from the the *:connect: { ... } block:

    Code: Select all
    nick %tli.LastNick


  • You want to join the OOC channel upon opening mIRC, if not, then delete this line from the *:connect: { ... } block:

    Code: Select all
    timer 1 5 join #Lonely_inn_ooc
THIS GOES INTO VARIABLES TAB

Code: Select all
%tli.AFK -AFK
%tli.LastNick LastNicknameUsed
%tli.pause 0
%tli.SorceryIdentPW SorceryNetIdentPasswordHere


THIS GOES INTO REMOTES TAB

Code: Select all
on *:START: {
  server -e aesir.sorcery.net 6697
  genhashes
}

on *:connect: {
  if ($network == SorceryNet) {
    nick %tli.LastNick
    ns id %tli.SorceryIdentPW
    timer 1 5 join #Lonely_inn_ooc
  }
}

alias genhashes {
  hmake tlichans
  hadd tlichans ooc #lonely_inn_ooc
  hadd tlichans inn #the_lonely_inn
  hadd tlichans forest #tli-forest
  hadd tlichans baths #tli-baths
  hadd tlichans border #tli-borderlands
  hadd tlichans arena #tli-arena
  hadd tlichans magic #tli-magic
  hadd tlichans temple #tli-temple
  hadd tlichans town #tli-town

  hmake tlinicks
  hadd tlinicks shortname ActualIRCNickName
  hadd tlinicks kuro Kurobu{KC}
  hadd tlinicks cir Cirrus

  hmake tliauth
  hadd tliauth $hget(tlinicks, shortname) passwordhere ActualBelariathLoginName
  hadd tliauth $hget(tlinicks, kuro) anotherpassword Kurobu
  hadd tliauth $hget(tlinicks, cir) yetanotherpass Cirrus
}

alias freehashes {
  hfree tlichans
  hfree tlinicks
  hfree tliauth
}

alias tlireload {
  freehashes
  genhashes
}

alias tli {
  if ($network != SorceryNet) halt
  else {
    if ($1 == $null) halt
    else {
      var %c = $hget(tlichans, $1)
      if (%c != null) {
        join %c
      }
      else {
        echo -a Must specify a channel.
      }
    }
  }
}

alias tlilogin {
  if ($network != SorceryNet) halt
  else {
    var %n = $remove($me, %tli.AFK)
    var %a = $hget(tliauth, %n)
    if (%n != $null) {
      msg Desdaemona !login %a
    }
    else {
      echo -a Could not find authentication for: %n.
    }
  }
}

alias char {
  if ($network != SorceryNet) halt
  else {
    if ($1 != $null) {
      if ($1 == afk) {
        nick $me $+ %tli.AFK
        set %tli.LastNick $me $+ %tli.AFK
        set %tli.pause 3
      }
      else {
        var %n = $hget(tlinicks, $1)
        if (%n != $null) {
          nick %n
          set %tli.LastNick %n
          ns id %tli.SorceryIdentPW
          set %tli.pause 3
        }
        else {
          echo -a Character not found: $1.
        }
      }
      if (%tli.pause > 0) {
        timer 1 %tli.pause tlilogin
        set %tli.pause 0
      }
    }

    else {
      echo -a Must specify a character.
    }
  }
  else {
    echo -a Not on SorceryNet!
  }
}

on *:join:#Lonely_Inn_OOC {
  if ($network == SorceryNet) {
    if ($nick == $me) {
      tlilogin
    }
  }
}


If you need any help

My PM box is always open on IRC, usually under the nick Kurobu{KC}, hope this helps you!
Image
Kurobu
Novice
Novice
 
Posts: 7
Joined: Sun Jan 04, 2009 12:12 pm

Re: Kurobu's TLI Script (Multi-character auto-login/switcher

Postby Dante_Ambrogio on Tue May 12, 2020 10:10 pm

do you happen to know how to do a similar script for IceChat 7? cuz.... I like this but it doesn't work the way this one does in that program.
Loves bite is eternal, welcome or otherwise. Once bitten it twines with your very soul and can never be forgotten

Player of: Dante Ambrogio, Victus Ambrogio|Naut|, Kat`ryn Quel`dalre, Elizabeth Graesyn, Vex Windstrider, Valithren Caradoc, Daelmaron Fyresong, Morgran Fireforge, Feindhara Ingolfr, Gashan Nakajima,
Dante_Ambrogio
Expert
Expert
 
Posts: 147
Joined: Sat May 09, 2020 7:11 am


Return to Public Service

Who is online

Users browsing this forum: No registered users and 1 guest