Need Help Creating An Mirc Code for a Twitch Gambling/Points/Ranking System

By MarioBrosFTW on Jan 04, 2015

Hey just in advance I want to thank you you guys for helping me out making this code/script if you guys want heres my script for my twitch bot also I am using MIRC

on *:TEXT:!RPG:#: [ msg $chan $nick RPGed chat ]
on *:TEXT:!LAGG:#: [ msg $chan $nick is LAGGGGING!!! ]
on *:TEXT:!DU:#: [ msg $chan dududu SPAMM ]
on *:TEXT:!addquote *:#: {
  if ($nick !isOp #) { return }
  write quotes.txt $2- $+
  msg $chan Added: $2-
}

on *:TEXT:!quote:#: {
  msg $chan $read(quotes.txt)
}
on *:TEXT:hello:#: {
  if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
  set -u10 %floodhello On
  set -u30 %floodhello. $+ $nick On
  msg $chan Welcome $nick to Free's Stream! $+ 
}
on *:TEXT:hey:#: {
  if ((%floodhey) || ($($+(%,floodhey.,$nick),2))) { return }
  set -u10 %floodhey On
  set -u30 %floodhey. $+ $nick On
  msg $chan Welcome $nick to Free's Stream! $+ 
}
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:!NOSPoints:#:{
  if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
  set -u10 %floodpoints On
  set -u30 %floodpoints. $+ $nick On
  msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) total NOS.
}

on $*:text:/!NOS (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 NOS. }
  }
  else { msg $chan This command is only available to moderators. }
}
on !*:join:#:{
  $+(.timerpoints.,#,.,$nick) 0 200 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:*:#:{
  if ($nick isop #) {
    if ($1 == !raffle) {
      if ($2 == open) {
        msg $chan /me [RAFFLE STARTED]
        set %open 1
        write -c Raffle.txt
        echo -a Raffle Started
      }
      if ($2 == close) {
        msg $chan /me [RAFFLE CLOSED]
        set %open 0
        write -c Raffle.txt
        echo -a Raffle Closed
      }
    }
    if ($1 == !draw) {
      if (%open == 1) {
        var %user = $read(Raffle.txt,n)
        write -c Raffle.txt
        set %open 0
        msg $chan /me And the winner is... %user $+ !!! Well Done!
        echo -a Raffle Closed
      }
    }
  }
  if ($1 == !tickets) {
    if (%open == 1) {
      msg $chan There are currently $lines(Raffle.txt) tickets entered into the raffle!
    }
  }
}
}
}
}

Comments

Sign in to comment.
Kongsted-IT   -  Mar 14, 2015

How do people join the raffle?

 Respond  
madmaxx13   -  Jan 06, 2015

Does this work bud?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.