mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2014
Posts: 1
E
Mostly harmless
OP Offline
Mostly harmless
E
Joined: Aug 2014
Posts: 1
I've seen plenty of threads referencing this code so sorry if I missed another relating to this in particular.

I'm hoping to adjust this bit of code to move it away from granting points based on each person's unique timer, to just giving points to everyone active in the chat every 30 minutes, while still disabling points for those that leave.

I assume this can be done by altering

Code:
$+(.timerpoints.,#,.,$nick) 0 300 add.pts $+(#,.,$nick)


But I'm unsure how to reference only people that are currently in chat.

Is this possible, am I way off base?


full code block for reference.
Code:
on !*:join:#:{
  $+(.timerpoints.,#,.,$nick) 0 300 add.pts $+(#,.,$nick)
  add.pts $+(#,.,$nick)
  msg $chan $nick has joined and is now earning points.
}

on !*:part:#:$+(.timerpoints.,#,.,$nick) off
alias -l add.pts {
writeini -n muttons.ini $1 muttons $calc($readini(muttons.ini,$1,muttons) + 1)
msg $chan $nick has left the channel and is no longer earning points.
}

Last edited by ebontide; 10/08/14 08:10 PM.
Joined: Aug 2014
Posts: 2
S
Bowl of petunias
Offline
Bowl of petunias
S
Joined: Aug 2014
Posts: 2
To get a list of the people in a channel, use a while loop.

$nick(#channel_name, 0) - this is the total number of people in the channel.

$nick(#channel_name, N) - this is the Nth person in the list.

var %i = 0
while (%i < $nick(#channel_name, 0)) {
;increment i
;add points to $nick(#channel_name, %i)
}


Link Copied to Clipboard