Scy commented on a Page, new to mIRC. server/topic script not working :( /help  -  Apr 09, 2014

;;;;;;;Try this. I tested it on my bot and this seems to work fine.;;;;;;;;

on :TEXT:!server :#: {
if ($2 == help) {
if ($nick isop #) msg $chan !server set - sets a server ||| !server remove will remove server information ||| !server show -OR- !server - shows current server.
elseif ($nick == YOURNICKHERE) msg $chan !server set - sets a server ||| !server remove will remove server information ||| !server show -OR- !server - shows current server.
}
if ($2 == set) {
if ($nick isop #) msg $chan $nick - The server was set to $3- | set %server $3-
elseif ($nick == YOURNICKHERE) msg $chan $nick - The server was set to $3- | set %server $3-
}
if ($2 == remove) {
if ($nick isop #) msg $chan $nick - The server information was removed | unset %server currently not being shown
elseif ($nick == YOURNICKHERE) msg $chan $nick - The server information was removed | unset %server currently not being shown
}
}

PlayingOneHanded  -  Apr 09, 2014

thanks a lot.

yours didn't work, but it lead me to why it might have not been working. another part of my bot wasn't bracketed correctly.

so I redid my whole bot and tested each section individually and showed it was one/two scripts messing up other ones. C+P'ed the working ones back in (with yours) and it all works fine :D

so thanks for helping ^_^ even if not in your intented way xD

is there also like a "if ($nick < $level2)" thing with setting users to certain levels? if you know what I mean.

Nos  -  Apr 11, 2014
on *:TEXT:*:#:{
  if ($nick isop $chan && $1-2 == !server help) {
    msg $chan !server set - sets a server ||| !server remove will remove server information ||| !server show -OR- !server - shows current server.
  }
  elseif ($nick isop $chan && $1-2 == !server set) {
    set %server $3-
    msg $chan $nick - The server was set to $3-
  }
  elseif ($nick isop $chan && $1-2 == !server remove) {
    unset %server
    msg $chan $nick - The server information was removed
  }
  elseif ($nick isop $chan && $1-2 == !server show) {
    msg $chan $nick - The server is %server
  }
  elseif ($nick isop $chan && $1 == !server) {
    msg $chan $nick - The server is %server
  }
} 

sorry if there are any

Vegito  -  Apr 22, 2014

You dont need to type isop everytime also you dont have to check for !server all the time.

on *:TEXT:!server*:#:{
  if ($nick isop #) {
    if ($2 == help) {
      msg # $1 set - sets a server ||| $1 remove will remove server information ||| $1 show -OR- $1 - shows current server.
    }
    elseif ($2 == set) {
      set %server $3-
      msg # $nick - The server was set to $3-
    }
    elseif ($2 == remove) {
      unset %server
      msg # $nick - The server information was removed
    }
    elseif ($2 == show) msg # $nick - The server is %server
    elseif (!$2) msg # $nick - The server is %server  
  }
} 
Nos  -  Apr 22, 2014
on *:TEXT:*:#:{
  if ($strip($1) == !server && $nick isop $chan) {
    if ($strip($2) == help) {
      msg $chan !server set - sets a server $str($chr(124),3) $&
        !server remove will remove server information $str($chr(124),3) $&
        !server show -OR- !server - shows current server.
    }
    elseif ($strip($2) == set) {
      set %server $3-
      msg # $nick - The server was set to $3-
    }
    elseif ($strip($2) == remove) {
      unset %server
      msg # $nick - The server information was removed
    }
    elseif ($strip($2) == show) {
      msg # $nick - The server is %server
    }
    elseif (!$2) {
      msg # $nick - The server is %server
    }
  }
} 
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.