mIRC Home    About    Download    Register    News    Help

Print Thread
#250016 29/12/14 09:08 PM
Joined: Dec 2014
Posts: 26
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Dec 2014
Posts: 26
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) } }

Joined: Mar 2014
Posts: 215
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
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)
}


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
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.


Link Copied to Clipboard