mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2015
Posts: 1
Z
Mostly harmless
OP Offline
Mostly harmless
Z
Joined: Aug 2015
Posts: 1
hi only my bot recives points accordingly. problem is that i/myviewers does not recieve any points, please help
thanks for helping me!

here is my script.


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 *:join:#:{
var %points $addPoints(1)
timer $+ $nick 0 5 doaddpoints $chan $nick 1
}

on *:part:#:{
timer $+ $nick off
}

on *:text:!points:#:{
var %points $lookUpPoints
msg $chan $nick has %points total points.
if ($2 == add) { doaddpoints $chan $3 1 }
if ($2 == remove) { dorempoints $chan $3 }
}

on *:text:!points *:#:{
if ($2 == add) { doaddpoints $chan $3 1 }
if ($2 == remove) { dorempoints $chan $3 }
}

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
The code is probably fine, is this for Twitch?
Twitch has a broken implementation of the IRC protocol which may be the problem here, I'm not familiar with Twitch but I heard that it will inconsistently send join/part messages, certainly that would be your problem.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard