mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
Hey i am trying to find a simple but yet nice looking script that will keep track of the record high count of users in a channel. I find a few but they all want you to do a !command. I just want it to announce to the room that the Room has a new high record count and what the number is.
Would also be nice to have a !command to get the script to display the record to the room whenever a @ does it...

Any help on this would be apprecated
thanks for reading smile

Last edited by ToRmEnTeD; 20/10/08 12:03 AM.

Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Code:

on *:JOIN:*:.timer 1 1 maxjoin $chan
alias maxjoin {
  echo -a JOIN $1 $nick($1,0,a) $($+(%,chanmax.,$1),2)
  if ($nick($1,0) < $($+(%,chanmax.,$1),2)) { return }
  set $+(%,chanmax.,$1) $v1
  ;;;; Your actions below this line ;;;;
  msg $1 New high count: $v1
}

on *:TEXT:!maxusers:*:{
  if ($($+(%,chanmax.,$chan),2) !isnum 1-) return
  ;;;; Your actions below this line ;;;;
  msg $chan Current high count: $v1
}



Currently, the code keeps track of any channel that the bot/script is run on.

-genius_at_work

Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
Hey thanks for that! It worked perfect. I just changed the message a little bit and it looked exactly like i want! Really apprecate it! smile


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
I been trying to play with the script to make it use the /me command to send the msgs to the channel and it dont seem to work. I also tried ACTION and it also didnt work. It shows correctly in the script thats being used to send the msg but the room users dont see it...kinda weird.
Any ideas?


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
Joined: Sep 2007
Posts: 28
M
Ameglian cow
Offline
Ameglian cow
M
Joined: Sep 2007
Posts: 28
try: describe <roomname> <text>

Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
perfect ! smile Thank you so very much !


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
thought i would post it as its working in case anyone else needs it.

on *:JOIN:*:.timer 1 1 maxjoin $chan
alias maxjoin {
echo -a JOIN $1 $nick($1,0,a) $($+(%,chanmax.,$1),2)
if ($nick($1,0) < $($+(%,chanmax.,$1),2)) { return }
set $+(%,chanmax.,$1) $v1
;;;; Your actions below this line ;;;;
describe #chat18+ The New record High user count for #chat18+ is: $v1
}

on *:TEXT:!count:*:{
if ($($+(%,chanmax.,$chan),2) !isnum 1-) return
;;;; Your actions below this line ;;;;
describe #chat18+ Current Record high user count for #Chat18+ is: $v1
}


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
In future, please use the Code Tags button (looks like a # character) around code.

I would recommend you change the second * in the ON TEXT event to a # character.
The reason for this, is that with the * a person could pm/query the client with the !count command, but the client wouldn't know what information to relay, as $chan (as required for the %chanmax<channel> variable) will return $null, therefore making the accessed variable read as %chanmax. rather than %chanmax.help (as an example).
By using the # character, mIRC will not recognize the !count command unless it comes from within the channel.

Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
im not even going to lie. I am new to this and i understand about placing the code with the (brackets)but i am kinda lost on the command thing . Could you give me an example or snipit or something that i can look at?


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
on *:JOIN:*:.timer 1 1 maxjoin $chan
alias maxjoin {
  echo -a JOIN $1 $nick($1,0,a) $($+(%,chanmax.,$1),2)
  if ($nick($1,0) < $($+(%,chanmax.,$1),2)) { return }
  set $+(%,chanmax.,$1) $v1
  ;;;; Your actions below this line ;;;;
  describe #chat18+ The New record High user count for #chat18+ is: $v1
}

on *:TEXT:!count:#:{
  if ($($+(%,chanmax.,$chan),2) !isnum 1-) return
  ;;;; Your actions below this line ;;;;
  describe $chan Current Record high user count for $chan is: $v1
} 


Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
Ok thank you i see what you did. Thanks for that smile


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>

Link Copied to Clipboard