mIRC Homepage
Posted By: Athenlayjoshr Points every 30 minuets - 29/12/14 09:08 PM
I have a points system that i got from here and i want to know how to add so every 30 minuets people will gain 5 points

Here is the code:
on *:TEXT:!pointexplain:#: { msg $chan You gain 5 points every 30 minuets, Do !pointrewards to see what points can do!
}
on *:TEXT:!pointrewards:#: { msg $chan For people that hit 2.5k points i will be sending them either Steam, Amazon or ITunes giftcards!
}

alias -l addPoints {
if ($1 !isnum) { echo 2 -st $1 is not a number. It needs to be a number. | halt }
var %topic $+($chan,.,$nick)
var %points $calc($readini(Points.ini,%topic,Points) + $1)
writeini -n Points.ini %topic Points %points
return %points
}
alias -l lookUpPoints {
var %topic $+($chan,.,$nick)
var %points $readini(Points.ini,%topic,Points)
return %points
}
alias doaddpoints {
if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt }
var %topic $+($1,.,$2)
var %points $calc($readini(Points.ini,%topic,Points) + $3)
writeini -n Points.ini %topic Points %points
echo -a Added points for %topic
}
alias dorempoints {
var %topic $+($1,.,$2)
remini -n Points.ini %topic Points
echo -a Removed points for %topic
}
on *:text:!points:#:{
if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
set -u10 %floodpoints On
set -u30 %floodpoints. $+ $nick On
msg # $nick has $iif($readini(Points.ini,$+(#,.,$nick),Points),$v1,0) points.
}
on $*:text:/!points (add|remove|del)/Si:#:{
if ($nick isop #) {
if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove|del> <user> [number] | return }
writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
msg $chan $3 now has $readini(Points.ini,$+(#,.,$3),Points) total points.
}
else { msg $chan This command is only available to moderators. }
}

alias add.pts { if ($1) { writeini -n Points.ini $1 Points $calc($readini(Points.ini,$2,Points) + 2) } }
Posted By: judge2020 Re: Points every 30 minuets - 30/12/14 12:41 PM
this is the automation part of your script
Code:
alias add.pts { if ($1) { writeini -n Points.ini $1 Points $calc($readini(Points.ini,$2,Points) + 2) } }
change the 2 to 5 for 5 points instead of 2 points
Code:
alias add.pts { if ($1) { writeini -n Points.ini $1 Points $calc($readini(Points.ini,$2,Points) + 5) } }


I started looking into the code and it looks like you did not include your join and part scripts. Assuming this is it...
Code:
on !*:join:#:{
  $+(.timerpoints.,#,.,$nick) 0 300 add.pts $+(#,.,$nick)
  add.pts $+(#,.,$nick)
}
change the 300 here to hoe many seconds is 30 minutes (1800)
Code:
on !*:join:#:{
  $+(.timerpoints.,#,.,$nick) 0 1800 add.pts $+(#,.,$nick)
  add.pts $+(#,.,$nick)
}
Posted By: Belhifet Re: Points every 30 minuets - 30/12/14 02:59 PM
Originally Posted By: judge2020
Code:
on !*:join:#:{
  $+(.timerpoints.,#,.,$nick) 0 1800 add.pts $+(#,.,$nick)
  add.pts $+(#,.,$nick)
}

I wonder if he really intends to be offering a cash incentive for exiting and entering his channel 2500 times.
© mIRC Discussion Forums