LoLNexus Scouter Script - For the lazy ones.

By Menteroth on Sep 29, 2013

Just a simple script to search for a summoner's name in a specific region and gives you the URL for it.
A script for the lazy one.

Thanks for the help.

on *:TEXT:!scout*:#: { 
  if ($2 == $null) { msg $chan syntax: !scout region nickname. }
  elseif ($2 == euw || $2 == eune || $2 == na) {
    if ($3 == $null) { msg $chan enter nickname. }
    else {
      if ($2 == euw) { msg $chan http://www.lolnexus.com/scouter/search?name= $+ $replace($3-, $chr(32), +) $+ &server=EUW }
      elseif ($2 == eune) { msg $chan http://www.lolnexus.com/EUNE/search?name= $+ $replace($3-, $chr(32), +) $+ &server=EUNE }
      elseif ($2 == na) { msg $chan http://www.lolnexus.com/NA/search?name= $+ $replace($3-, $chr(32), +) $+ &server=NA }
    }
  }
  else { msg $chan only euw/eune/na are available. }
}

Comments

Sign in to comment.
Kaj   -  Sep 29, 2013

Not sure if this will work, didn't tested it..

on *:TEXT:!scout*:#:{ 
    if ($2 == $null) { msg $chan syntax: !scout region nickname. }
    if ($2 == euw || $2 == eune || $2 == na) {
        if ($3 == $null) { msg $chan enter nickname. }
        else {
            if ($2 == euw) { msg $chan http://www.lolnexus.com/scouter/search?name= $+ $3 $+ &server=EUW }
            elseif ($2 == eune) { msg $chan http://www.lolnexus.com/EUNE/search?name= $+ $3 $+ &server=EUNE }
            elseif ($2 == na) { msg $chan http://www.lolnexus.com/NA/search?name= $+ $3 $+ &server=NA }
        }
    }
    else { msg $chan only EUW/EUNE/NA are available. }
}
Menteroth  -  Sep 29, 2013

thanks. that works fine.

Menteroth  -  Sep 30, 2013

forgot about the 2 second flood protection in the channel.

it actually sent both answers when only typing the command.

(12:04:41) (menteroth) !scout
(12:04:42) (mentbot) syntax: !scout region nickname.
(12:04:43) (mentbot) only EUW/EUNE/NA are available.

any clue how to fix it?

Kaj  -  Sep 30, 2013

Yea, make elseif of the second if should fix this problem :)

on *:TEXT:!scout*:#:{ 
    if ($2 == $null) { msg $chan syntax: !scout region nickname. }
    elseif ($2 == euw || $2 == eune || $2 == na) {
        if ($3 == $null) { msg $chan enter nickname. }
        else {
            if ($2 == euw) { msg $chan http://www.lolnexus.com/scouter/search?name= $+ $3 $+ &server=EUW }
            elseif ($2 == eune) { msg $chan http://www.lolnexus.com/EUNE/search?name= $+ $3 $+ &server=EUNE }
            elseif ($2 == na) { msg $chan http://www.lolnexus.com/NA/search?name= $+ $3 $+ &server=NA }
        }
    }
    else { msg $chan only EUW/EUNE/NA are available. }
}
Menteroth  -  Sep 30, 2013

that works better. thanks for your help.

all these if/elseif and deeper ifs gets messy in my head hehe.

Sign in to comment

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.