|
Joined: Dec 2014
Posts: 23
Ameglian cow
|
OP
Ameglian cow
Joined: Dec 2014
Posts: 23 |
Hey guys, I'm slowly learning how to use mIRC and I have a few questions. So here is my points script. (Points are called Kills) on $*:text:/!kills (add|remove)/Si:#:{ if ($nick == sbdonslaught) { if ($0 < 3) { msg $chan Insufficient parameters: Use !kills [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) kills. BloodTrail } } else { msg $chan Nice Try $nick. Kappa } } on *:text:!kills:#:{ if ((%floodkills) || ($($+(%,floodkills.,$nick),2))) { return } set -u15 %floodkills. $+ $nick On if ( $readini(Points.ini,$+(#,.,$nick),Points) >= 500 && $readini(Points.ini,$+(#,.,$nick),Points) < 1000 ){ msg $chan $nick has $readini(Points.ini,$+(#,.,$nick),Points) total kills. OpieOP elseif ( $readini(Points.ini,$+(#,.,$nick),Points) >= 100 && $readini(Points.ini,$+(#,.,$nick),Points) < 500 ){ msg $chan $nick has $readini(Points.ini,$+(#,.,$nick),Points) total kills. PogChamp elseif ( $readini(Points.ini,$+(#,.,$nick),Points) >= 1000 ){ msg $chan $nick has $readini(Points.ini,$+(#,.,$nick),Points) total kills. RollIt! elseif ( $readini(Points.ini,$+(#,.,$nick),Points) <= 0 ){ msg $chan $nick has $readini(Points.ini,$+(#,.,$nick),Points) total kills. WutFace else { msg $chan $nick has $readini(Points.ini,$+(#,.,$nick),Points) kills. } } 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:#:{ $+(.timerpoints.,#,.,$nick) 0 900 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) } on *:text:!kills check *:#:{ msg $chan $3 has $readini(Points.ini,$+(#,.,$3-),Points) kills. }
(If you want a better look http://pastebin.com/gh2BJfvE ) I was wondering how would i make a !top command with this script? I got pieces of script from YT. I want to be able to do !top <1-10> and it would list out the people with the top points.  Also i have this issue, on !*:join:#:{ $+(.timerpoints.,#,.,$nick) 0 900 add.pts $+(#,.,$nick) add.pts $+(#,.,$nick) }
When people join my stream, just join they get 1 point, but i dont want them to, i want them to only get a point if they stay 900 seconds, but if i remove the 0, they don't earn any points at all. So yea, that's pretty much it! Thank you in advance! You guys are the best  <3
|
|
|
|
Joined: Jun 2014
Posts: 248
Fjord artisan
|
Fjord artisan
Joined: Jun 2014
Posts: 248 |
on !*:join:#:{
$+(.timerpoints.,#,.,$nick) 0 900 add.pts $+(#,.,$nick)
add.pts $+(#,.,$nick)
}
This is an event triggered when someone enters your chat room. It contains 2 lines. Line 1: The first thing this on join event does is create a timer named points.#channel.$nick. This timer trigger infinite times (designated by the 0) every 900 seconds. It triggers the add.pts alias. It passes one word to this alias #channel.$nick. Line 2: The second thing this on join event does is trigger the add.pts alias. It passes one word to this alias #channel.$nick. If you do not want users to gain 1 point when they join the channel, instead, only when the timer elapses: Which line from the 'on join' event do you need to remove?
|
|
|
|
Joined: Dec 2014
Posts: 23
Ameglian cow
|
OP
Ameglian cow
Joined: Dec 2014
Posts: 23 |
The Second line!  Right? Thank you for explaining it like tha, helps me learn 
|
|
|
|
|