mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2015
Posts: 168
P
Vogon poet
OP Offline
Vogon poet
P
Joined: Jan 2015
Posts: 168
Hi, I have been trying to figure this out with this current point system. I have tried turning off points using this to no avail. No matter what I do it still counts the points. This system is so frustrating. Also if there is a way to stop the points when the streamer leaves the chat, is it possible to only stop it on that one streamers account and have the other still continue when another streamer joins? frown Any help would be much appreciated. Here is what I have so far.


on !*:join:#:{
$+(.timerpoints.,#,.,$nick) 0 300 add.pts $+(#,.,$nick)
add.pts $+(#,.,$nick)
}
on !*:part:#:$+(.timerpoints.,#,.,$nick) off
alias -l add.pts {
writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1)
}
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 ($readini(Points.ini,$+(#,.,$nick),Points) > 0) {
msg # $Nick you have $readini(Points.ini,$+(#,.,$nick),Points) points!
}
else { msg # Sorry you do not have any points }
}
on $*:text:/!points (add|remove)/Si:#:{
if ($nick isop #) {
if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove> <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. }
}

on $*:text:/!points /Si:#:{
if ($nick isop #) {
if ($2 == on) {
msg # points system is now on
.timerpoints on }
elseif ($2 == off) {
.timerpoints off }
msg # points system is now off
else {
msg # Something went wrong, points was not turned off!
}
}
}

Last edited by powerade661; 27/01/15 06:16 PM.
Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Code:
alias -l add.pts { 
if ($mid(#,2-) ison #) writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1)
}


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jan 2015
Posts: 168
P
Vogon poet
OP Offline
Vogon poet
P
Joined: Jan 2015
Posts: 168
Do I replace the other alias -l add.pts with what you have or add it in the code below this?
if ($1 !isnum) { echo 2 -st $1 is not a number. It needs to be a number. | halt }

Last edited by powerade661; 27/01/15 09:09 PM.
Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
That's not even the same alias. Replace your current "add.pts" alias with what I gave you.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jan 2015
Posts: 168
P
Vogon poet
OP Offline
Vogon poet
P
Joined: Jan 2015
Posts: 168
Ok thank you so much! I guess I should just remove my off and on switch for the timer points because I am guessing that literally did nothing. lol


Link Copied to Clipboard