mIRC Home    About    Download    Register    News    Help

Print Thread
#125685 20/07/05 07:06 PM
Joined: Aug 2004
Posts: 43
J
javatis Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Aug 2004
Posts: 43
hi i have some problems with this script i whant to define a button in the menu that should chek all users but the while doesent work can someone tell me why



Code:
menu status,menubar {
  RoomCheck
  .Do Check : {
    set %x=1
    while ( %x <= 101 ) {
/msg MyNick hello
       if ( %x == 88 ) {
/msg MyNick hello
}
;/whois $nick($chan(1), $+ %x )
      inc %x
    }
  }

#125686 20/07/05 07:28 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I really have no idea if I approached this the way you meant but try this:

Code:
menu channel {
  Nicks in $chan
  .$submenu($ncks($1))
}

alias ncks {
  var %x = $nick($chan,0)
  if ($1 == begin) return -
  while (%x) {
    if ($1 == %x) return $nick($chan,%x) : msg $nick($chan,%x) ...
    if ($1 == end) return -
    dec %x
  }
}


Right click in a channel.

Edit:

Things I saw that could be a problem with your code:

1. set %x=1
Solution: set %x 1 or var %x = 1
2. You're missing a closing brace at the bottom of your code.

Some minor tips:

Codes in Remotes and Aliases are evaluated, so you don't really need the slashes.

When calling the menu from the Status $chan will have no value.

-Andy

Last edited by SladeKraven; 20/07/05 07:42 PM.
#125687 20/07/05 07:30 PM
Joined: Nov 2004
Posts: 148
D
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2004
Posts: 148
The error was in: set %x=1

It should be: set %x 1

#125688 20/07/05 07:42 PM
Joined: Aug 2004
Posts: 43
J
javatis Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Aug 2004
Posts: 43
Quote:
The error was in: set %x=1

It should be: set %x 1



ahhhh fine that was it...

but i have annother proble if i do that i need a timer i think cause the mass of /whois boots me out of the channel

#125689 21/07/05 12:50 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
menu status,menubar {
  RoomCheck
  .Do Check $chan(1) : {
    var %i = $nick($chan(1),0)
    while (%i) {
      .timer 1 [color:blue]$calc(%i * 2)[/color] whois $nick($chan(1),%i)
      dec %i
    }
  }


This creates timer events 2 seconds apart that well whois everyone in the channel.
I used a $calc(%i * 2) to get 2 seconds becusae i have found that using only a 1 second gap normally is still flooding

#125690 21/07/05 10:57 PM
Joined: Dec 2002
Posts: 10
A
Pikka bird
Offline
Pikka bird
A
Joined: Dec 2002
Posts: 10
make that for checking regular users, non op'd, non voiced etc.

#125691 22/07/05 10:16 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
why? thats not what the original code speced to do so why should i?

/help $nick nick and address identifiers


Link Copied to Clipboard