mIRC Home    About    Download    Register    News    Help

Topic Options
#247568 - 10/08/14 09:09 PM Alter points script to affect all in chat.
ebontide Offline
Mostly harmless

Registered: 10/08/14
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.
}


Edited by ebontide (10/08/14 09:10 PM)

Top
#247663 - 20/08/14 02:19 AM Re: Alter points script to affect all in chat. [Re: ebontide]
Syxe413 Offline
Bowl of petunias

Registered: 20/08/14
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)
}

Top