mIRC Homepage
Posted By: Panic amsg script - 03/09/07 05:45 PM
Hello all. I am just asking scripters here can you make a a script that if Panic or trollman118 says !request <message> it will amsg all the servers it is on normally more than one and say the message that was put in the <massage> tag

Thanks
Panic
ctcwcu head
Posted By: OrionsBelt Re: amsg script - 03/09/07 06:37 PM
You should start with trying to create something yourself.
You've seen many examples by now.
Posted By: Panic Re: amsg script - 03/09/07 06:47 PM
I have tryed with this one but is i have to go around all the servers and type it i wanted it so i type it once and it does amsg for all servers

Thanks
Panic
Posted By: noMen Re: amsg script - 03/09/07 07:25 PM
Code:
on *:TEXT:*:*: {
  if (($nick == panic) || ($nick == trollman118)) && ($strip($1) == !request) && ($2) {
    var %tempscid = $scid
    var %i = $scon(0) 
    while (%i) { 
      scid $scon(%i) 
      var %j = $chan(0)
      while (%j) {
        msg $chan(%j) $2-
        dec %j
      } 
      dec %i 
    }
    scid %tempscid
  }
}
Posted By: RusselB Re: amsg script - 03/09/07 09:16 PM
Code:
on *:text:*:*:{
  if ($nick == panic) || ($nick == trollman118)) && ($strip($1) == !request) && ($2) {
    .scon -at1 amsg $2-
  }
}


Warning: This code can be dangerous if variables and/or identifiers are used in the message. Use at your own risk.
Posted By: noMen Re: amsg script - 03/09/07 09:40 PM
RusselB's code is shorter than the code I gave, but some servers do not allow amsg ....
Posted By: SladeKraven Re: amsg script - 03/09/07 09:46 PM
Quote:

Warning: This code can be dangerous if variables and/or identifiers are used in the message. Use at your own risk.


Then just don't evaluate it.

Code:
on *:text:*:*:{
  if ($istok(Panic trollman118,$nick,32)) && ($strip($1) == !request) {
    .scon -at1 amsg $($$2-,0)
  }
}


Shouldn't that do the trick? I haven't tested it, looks like it should though.
Posted By: Horstl Re: amsg script - 03/09/07 10:07 PM
For me, these aren't working:
Code:
alias atest2 { scon -at1 echo -s amsg $($1-,0) }
alias atest1 { scon -at1 echo -s amsg $!1- }

This one does:
Code:
alias atest3 { var %txt = $1- | scon -at1 echo -s amsg $(%txt,0) }


Thus the OP could try:
Code:
on *:text:*:*:{
  if (($istok(Panic trollman118,$nick,32)) && ($strip($1) == !request) && ($2)) {
    var %text = $2-
    .scon -at1 amsg $(%text,0)
  }
}
© mIRC Discussion Forums