mIRC Home    About    Download    Register    News    Help

Print Thread
#160046 22/09/06 02:27 AM
K
KidSol
KidSol
K
I'm totally noob in script

Code:
 

on *:text:!invite*:*:{
  if !$2 || !$3 { halt }
  else {
    .msg Mrbot invite $nick !$3
        }
}

 


How do i make it !invite password ?
so it'll message bot to send invite.

#160047 22/09/06 04:01 AM
Joined: Sep 2003
Posts: 261
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
Using what you provided I just modified it.

Code:
on *:text:!invite*:*:{
  if (!$1-3) { halt }
  else {
    .msg Mrbot invite $nick $3
  }
}


That worked for me when I changed it to:
Code:
on *:text:!invite*:#:{
  if (!$1-3) { halt }
  else {
    msg #channel invite $nick $3
  }
}


So it should work for you now.

#160048 22/09/06 05:55 AM
K
KidSol
KidSol
K
Code:
 


on *:text:!invite*:*:{
   if (!$1-3) { halt }
   else {
    .msg Mrbot invite $nick $3
    }
}
 



How do i make it into only certain pass can go in
the pass is like password1, password 2 password 3
I only give certain pass to certain person
like !invite nick password

Thanks.

#160049 22/09/06 05:58 AM
Joined: Sep 2003
Posts: 261
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
Try:
Code:
on *:text:!invite*:*:{
  if (!$1-3) { halt }
  else {
    var %passwords = password1 password2 password3
    if ($3 isin %passwords) {
      .msg Mrbot invite $nick $3
    }
  }
}


Course that is kinda choppy as if one of your passwords was "moo" and someone typed in moon it would allow it. Hrm, ill further explore. Hopefully someone will solve it before I will. Lots of smart merker's on here. I'm thinking regex would be good here.

#160050 22/09/06 06:11 AM
K
KidSol
KidSol
K
hehe
thanks.

If i want it to work on 1 room only i need to add the room #room right?

#160051 22/09/06 06:16 AM
Joined: Sep 2003
Posts: 261
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
Try this:
Code:
on *:text:!invite*:*:{
  if (!$1-3) { halt }
  else {
    var %passwords = password1,password2,password3
    var %matchpass = $wildtok(%passwords,$3,0,44)
    if (%matchpass == 1) {
      .msg Mrbot invite $nick $3
    }
  }
}


And yes
on *:text:!invite*:#channel:{


Link Copied to Clipboard