mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2015
Posts: 25
Q
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Jul 2015
Posts: 25
I want to send one message in channel, with list name of all +v.
The message will look like?

Eg:



The nick is online include: Anv-HD, LMN999-HD, quanbhvn-HD (my nick) and son386-HD.

I want to send a massage in channel with content:
Code:
hello Anv-HD LMN999-HD  son386-HD . How are you?

I do not want to tag each nick

Thank you

Last edited by quanbhvn; 10/09/15 01:17 PM.
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
Code:
var %list, %i = 1
while ($nick(#,%i,v)) {
  %list = $addtok(%list,$v1,32)
  inc %i
}


This will fail if the list gets too large.

Joined: Jul 2015
Posts: 25
Q
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Jul 2015
Posts: 25
Originally Posted By: Loki12583
Code:
var %list, %i = 1
while ($nick(#,%i,v)) {
  %list = $addtok(%list,$v1,32)
  inc %i
}


This will fail if the list gets too large.


Thank you. But I still do not understand the message content to how

Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
Code:
On *:text:*:#: {
if ($strip($1) = !vlist) {
;loki's script here
msg $chan %list
}
}

Replace ;loki's script here with loki's script. The trigger is channel message !vlist

Joined: Jul 2015
Posts: 25
Q
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Jul 2015
Posts: 25
I wish, when someone says hello, my nick is automatically message is:
Code:
hello everyone Anv-HD LMN999-HD son386-HD


Anv-HD, LMN999-HD, son386-HD are all the nick is online

Therefore, this script is presented as true or false?
Code:
on *:text:*:#TorViet: {
if (*helo!* iswm $1-) { 
      if ($strip($1) = !vlist) { 
        var %list, %i = 1
        while ($nick(#,%i,v))
        %list = $addtok(%list,$v1,32)
      inc %i }
      msg $chan Hello everyone %list
    }
 

Last edited by quanbhvn; 11/09/15 09:45 AM.
Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
This would trigger only if help was in the msg somewhere and if the 1st word was !vlist because that is what if ($strip($1) == !vlist checks for.
So we have to remove that and also add a bracket in the end to close the on text event.
Code:
on *:text:*:#TorViet: {
if (*helo* iswm $1-) {
  var %list, %i = 1
        while ($nick(#,%i,v)) {
        %list = $addtok(%list,$v1,32)
      inc %i 
}
      msg $chan Hello everyone %list
    }
}

This should do what you want.


Link Copied to Clipboard