TheCanadian
|
I need some help setting this up so it's fully working. I need it to add points to my current points system (Posted below). I want the trivia script to randomly pick a question. (How I would like it to be done: Question1.txt Answer1.txt and so on. I would also like it to add 5 points per correct question. Or if it can be done have harder questions so people can get more points, kinda like jeopardy(EX: 5 points easy question, 10 points mid question, 15 points hard question, 20 points extreme question) and maybe have a command for if no one can get the question right to reset it. If anyone can help me that would be awesome since I am just starting mIRC. And yes I have tried getting it to work and I can't seem to figure it out. Both these scripts are not mine. Trivia Script on $*:TEXT:/^!question?$/Si:#: { if ((%floodscramble) || ($($+(%,floodage.,$nick),2))) { return } set -u10 %floodscramble On set -u10 %floodscramble $+ $nick On if $($+(%,scram.scramword.,$chan),2) { .msg $chan /me MrDestructoid There's already a trivia game going! The current question is $qt(%scram.scramword. [ $+ [ $chan ] ]) } else { set $lower($+(%,scram.origword.,$chan) $read(FILE.TXT,n)) set $lower($+(%,scram.scramword.,$chan) $scramble(%scram.origword. [ $+ [ $chan ] ])) .msg $chan /me MrDestructoid $qt(%scram.scramword. [ $+ [ $chan ] ]) $+ . Type !guess (Your guess here). Make sure to include the appropriate space(s)! } }
on $*:TEXT:/^!guess/Si:#: { if $lower($($+(%,scram.scramword.,$chan),2)) { if ($2- != %scram.origword. [ $+ [ $chan ] ]) { return } else { writeini TriviaPoints.ini points $nick $iif($readini(TriviaPoints.ini,points,$nick),$calc($readini(TriviaPoints.ini,points,$nick) + 5),5) .msg $chan /me MrDestructoid That's correct! Great job $nick $+ ! You now have $readini(TriviaPoints.ini,points,$nick) Points. unset $+(%,scram.*.,$chan) } } }
on $*:TEXT:/^!points?/Si:#: { if ((%floodpts) || ($($+(%,floodpts.,$nick),2))) { return } set -u5 %floodpts On set -u15 %floodpts $+ $nick On if (!$2) { .msg $chan /me MrDestructoid You have $iif($readini(TriviaPoints.ini,points,$nick),$readini(TriviaPoints.ini,points,$nick),0) points $nick $+ . } else { .msg $chan /me MrDestructoid $2 has $iif($readini(TriviaPoints.ini,points,$2),$readini(TriviaPoints.ini,points,$2),0) points. } }
on $*:TEXT:/^!resetpoints?/Si:#: { if (!$2) { writeini TriviaPoints.ini points $nick 0 .msg $chan /me MrDestructoid You have $iif($readini(TriviaPoints.ini,points,$nick),$readini(TriviaPoints.ini,points,$nick),0) points $nick $+ . } }
Points 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 *:text:!points:#:{ msg # $nick has $iif($readini(Points.ini,$+(#,.,$nick),Points),$v1,0) total 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. } }
ON !*:JOIN:#: { $+(.timerpoints.,#,.,$nick) 0 120 add.pts $+(#,.,$nick) add.pts $+(#,.,$nick) if ((%floodjoin) || ($($+(%,floodjoin.,$nick),2))) { return } set -eu10 %floodjoin On set -eu30 %floodjoin. $+ $nick On msg $chan $nick has joined the channel and is now earning points. }
ON *:KICK:#: { if ($knick !== $me) { $+(.timerpoints.,#,.,$knick) off if ((%floodkick) || ($($+(%,floodkick.,$knick),2))) { return } set -eu10 %floodkick On set -eu30 %floodkick. $+ $nick On msg $chan $knick has left the channel and is no longer earning points. } }
ON !*:QUIT: { $+(.timerpoints.,#,.,$nick) off if ((%floodquit) || ($($+(%,floodquit.,$nick),2))) { return } set -eu10 %floodquit On set -eu30 %floodquit. $+ $nick On msg $chan $nick has left the channel and is no longer earning points. }
ON !*:PART:#: { $+(.timerpoints.,#,.,$nick) off if ((%floodpart) || ($($+(%,floodpart.,$nick),2))) { return } set -eu10 %floodpart On set -eu30 %floodpart. $+ $nick On msg $chan $nick has left the channel and is no longer earning points. }
alias add.pts { if ($1) { writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1) } }
|