mIRC Home    About    Download    Register    News    Help

Topic Options
#123837 - 27/06/05 11:41 PM Read from nicks in room.
BNX Offline
Ameglian cow

Registered: 27/06/05
Posts: 44
Is there a way... well I know there is... but how!
To read only the nicks in the room?

for example:
<Person> !random nick
<Bot> Georgebob
<Georgebob> o.o

I have seen this done with another mirc bot, who "hugged" all the people in the room.


Edited by BNX (27/06/05 11:43 PM)

Top
#123838 - 27/06/05 11:50 PM Re: Read from nicks in room.
mIRCManiac Offline
Hoopy frood

Registered: 05/02/05
Posts: 681
Loc: Your dreams ;)
on *:TEXT:!random nick:#:msg # $nick(#,$rand(1,$nick(#,0)))
_________________________
mIRCManiac

Top
#123839 - 29/06/05 04:10 AM Re: Read from nicks in room.
BNX Offline
Ameglian cow

Registered: 27/06/05
Posts: 44
awesome! Thanks a bunch, that was shorter than I expected...

If I wanted to use all the members, would I do..

msg # $nick(#)


Edited by BNX (29/06/05 04:12 AM)

Top
#123840 - 29/06/05 04:27 AM Re: Read from nicks in room.
MikeChat Offline
Hoopy frood

Registered: 12/12/02
Posts: 1245
Loc: California, doooood
pretty close, /help $snicks

Top
#123841 - 29/06/05 04:33 AM Re: Read from nicks in room.
xDaeMoN Offline
Fjord artisan

Registered: 22/03/05
Posts: 420
$snicks would return selected nicks, not ALL nicks. Not unless you selected all of them in the nicklist.
_________________________
If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!

Top
#123842 - 29/06/05 04:34 AM Re: Read from nicks in room.
xDaeMoN Offline
Fjord artisan

Registered: 22/03/05
Posts: 420
Your idea would flood the room if there are a lot of people in the room.
_________________________
If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!

Top
#123843 - 29/06/05 04:37 AM Re: Read from nicks in room.
BNX Offline
Ameglian cow

Registered: 27/06/05
Posts: 44
The server I use is very small, never anymore than 15 people in the channel. But thanks smile

Top
#123844 - 29/06/05 07:35 AM Re: Read from nicks in room.
MikeChat Offline
Hoopy frood

Registered: 12/12/02
Posts: 1245
Loc: California, doooood
Quote:

$snicks would return selected nicks, not ALL nicks. Not unless you selected all of them in the nicklist.


yes... Ithought /sline was with it... my bad
Quote:

/sline [-a|r] <#channel> <N|nick>
Selects or deselects lines in a channel nickname listbox. It can select either the Nth nickname in a listbox, or a specified nickname.

If you do not specify any switches, any existing selections in the listbox are cleared. If you specify the -a switch then the specified is selected without affecting the selection states of other lines. If you specify the -r switch then the specified item is deselected.

Top
#123845 - 29/06/05 12:39 PM Re: Read from nicks in room.
Kelder Offline
Hoopy frood

Registered: 12/04/03
Posts: 701
Loc: Leuven, Belgium
alias allnicks {
var %i = 1, %n, %chan = $iif($1 ischan,$1,$chan)
while ($nick(%chan,%i)) {
var %n = %n $v1
inc %i
}
if ($isid) return %n
msg %chan %n
}

To just get all nicknames, use $allnicks(#channel) or $allnicks if you're in the correct window/event, to send a message to the channel with only all nicks: /allnicks #channel

You can probably adapt it somewhat to your needs...

Top
#123846 - 29/06/05 08:21 PM Re: Read from nicks in room.
MikeChat Offline
Hoopy frood

Registered: 12/12/02
Posts: 1245
Loc: California, doooood
For the bot try
Code:
on *:TEXT:!allnicks*:#:{
  var %i = 1
  while ($nick(#,%i)) {
    if ($nick($chan,%i) != $me) { var %allchan = %allchan $nick(#,%i) }
    inc %i
  }
  msg $chan %allchan
}

It should post all the nicks but the bots

Top