mIRC Home    About    Download    Register    News    Help

Print Thread
Need help in script pls #160046 22/09/06 02:27 AM
Joined: Mar 2005
Posts: 74
K
KidSol Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Mar 2005
Posts: 74
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.

Re: Need help in script pls #160047 22/09/06 04:01 AM
Joined: Sep 2003
Posts: 261
S
Scorpwanna Offline
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.

Re: Need help in script pls #160048 22/09/06 05:55 AM
Joined: Mar 2005
Posts: 74
K
KidSol Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Mar 2005
Posts: 74
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.

Re: Need help in script pls #160049 22/09/06 05:58 AM
Joined: Sep 2003
Posts: 261
S
Scorpwanna Offline
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.


We don't just write the scripts, we put them to the test! (ScriptBusters)
Re: Need help in script pls #160050 22/09/06 06:11 AM
Joined: Mar 2005
Posts: 74
K
KidSol Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Mar 2005
Posts: 74
hehe
thanks.

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

Re: Need help in script pls #160051 22/09/06 06:16 AM
Joined: Sep 2003
Posts: 261
S
Scorpwanna Offline
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:{


We don't just write the scripts, we put them to the test! (ScriptBusters)