;timer $+ #Channel_Name 0 60 /GivePoints #Channel_Name
Code:
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 will send a msg to the channel saying "nick NICK with X points"
    ;If you want you can use NOTICE instead or ECHO (to test, and only you will see this)
    msg %Channel nick $nick( %Channel, %x) with $var($+( %, Points_, %Channel, _, $nick( %Channel, %x)),1).value points
    ;this is for the while to plus one until reach the total users in channel
    inc %x
  }
}

Last edited by Miguel_A; 06/06/13 09:06 PM.