alias GivePoints {
;this will set a temporaly variable saying the total users in the channel
var %UsersInChannel = $nick( $1, 0)
;this will set a temp var with the channel name
var %Channel = $1
var %x = 1
;create a loop that will run a number of times (depending the total users)
while ( %x <= %UsersInChannel ) {
;if the varaible does no exits it means the player has arrive recently
if ( $var($+( %, Points_, $Channel_, $nick( %Channel, %x))) == 0) {
;it will set a local variable with number 1... 1 points because it's the firts time
set $+( %, Points_, %Channel_, $nick( %Channel, %x)) 1
}
; else... or if the variable exits them it means the user was here last time this command run for this channel
else {
;it will get the value(the points) of that variable user
var %temp $var( $+( %, Points_, %Channel_, $nick( %Channel, %x)), 1).value
;it will sum +1 to the variable of the player
set $+( %, Points_, %Channel_, $nick( %Channel, %x)) %temp + 1
}
;this is for the while to plus one until reach the total users in channel
inc %x
}
}