mIRC Homepage

Need help in script pls

Posted By: KidSol

Need help in script pls - 22/09/06 02:27 AM

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.
Posted By: Scorpwanna

Re: Need help in script pls - 22/09/06 04:01 AM

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.
Posted By: KidSol

Re: Need help in script pls - 22/09/06 05:55 AM

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.
Posted By: Scorpwanna

Re: Need help in script pls - 22/09/06 05:58 AM

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.
Posted By: KidSol

Re: Need help in script pls - 22/09/06 06:11 AM

hehe
thanks.

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

Re: Need help in script pls - 22/09/06 06:16 AM

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:{
© 2021 mIRC Discussion Forums