|
Joined: Aug 2013
Posts: 22
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2013
Posts: 22 |
Pretty Simple of a setup. I just would like to know how to turn it off and on when I don't want it to run for people just don't afk in my IRC chat racking up points ;---------------------------------
;Punktesystem test
;---------------------------------
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:!Pebbles:#:{
if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
set -u10 %floodpoints On
set -u30 %floodpoints. $+ $nick On
msg # $nick You have total of $readini(Points.ini,$+(#,.,$nick),Points) Pebbles.
}
on $*:text:/!Pebbles (add|remove)/Si:#:{
if ($nick == Firestonetv #) {
if ($0 < 3) { msg # Insufficient parameters: Use !Pebbles <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 Only FirestoneTV can use this command. }
}
on !*:join:#:{
$+(.timerpoints.,#,.,$nick) 0 300 add.pts $+(#,.,$nick)
add.pts $+(#,.,$nick)
set %nachrichten. $+ $nick = 0
}
on !*:part:#:$+(.timerpoints.,#,.,$nick) off
alias -l add.pts {
writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1)
}
on *:TEXT:*:*: {
if (%nachrichten. [ $+ [ $nick ] ] == 4) {
set %nachrichten. $+ $nick 0
add.pts $+(#,.,$nick)}
}
else { inc %nachrichten. $+ $nick }
.timer $+ $nick 1 300 unset %nachrichten. [ $+ [ $nick ] ]
}
|
|
|
|
Joined: Mar 2014
Posts: 20
Ameglian cow
|
Ameglian cow
Joined: Mar 2014
Posts: 20 |
im currently using this and it seems to work just fine. http://pastebin.com/qGMg0kax
|
|
|
|
Joined: Jan 2004
Posts: 1,358
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 1,358 |
You don't need a regex here, and please use proper line breaks with your blocks. on *:text:!point *:#az_mick:{
if ($nick !isop #) return
if ($2 == on) {
msg # points system is now on
.timerpoints on
}
elseif ($2 == off) {
msg # points system is now off
.timerpoints off
}
else {
msg # you done goofed
}
}
|
|
|
|
Joined: Mar 2014
Posts: 20
Ameglian cow
|
Ameglian cow
Joined: Mar 2014
Posts: 20 |
oh i thought i did. im still somewhat new to it and dont know everything but thank you for pointing that out. also you dont have to have that channel name after the # in the first line. i forgot to take that part off
|
|
|
|
Joined: Jul 2014
Posts: 8
Nutrimatic drinks dispenser
|
Nutrimatic drinks dispenser
Joined: Jul 2014
Posts: 8 |
I am getting error on this line when using your script. I have same point system as listed on top. Message in chat is writing system is on or off.. but im not sure if that error is ok .timerpoints on After i tested some scripts from here, i found my bot is not adding me points anymore in 300 sec intervals. I really dont find the problem. If i run command /timers . It writes there is no active timer. I tried restart mirc with bot and also tried another account to test !points command. But finally, bot wont give any points anymore Have some idea how can i repair it? Code of my point system is here. alias -1 addPoints {
if ($1 !isnum) { echo 2 -st $1 is not 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 -1 lookUpPoints {
var %topic $+($chan,.,$nick)
var %points $readini(Points.ini,$topic,Points)
return %points
}
alias doaddpoints {
if ($3 !isnum { echo 2 =st $3 není číslo. Hodnota musí být číslo. | 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:#: {
msg # $nick má právě $readini(Points.ini,$+(#,.,$nick),Points) bodů.
}
on $*:text:/!points (add|remove)/Si:#:{
if ($nick isop #) {
if ($0 < 3) { msg # Špatný paremetr: příkaz je !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 má právě $readini(Points.ini,$+(#,.,$3),Points) bodů. )
}
else {msg $chan Tento příkaz je povolen pouze moderátorům. }
}
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)
} Thanks any help.. it seems just time stopped for bot but dont know how to fix it Edit: i reinstalled mirc and bot still dont wanna give me any point. LOL
Last edited by AcerCZ; 04/07/14 04:30 AM.
|
|
|
|
|