Hello!

Recently, I received help on creating a raffle system I can turn on and off with my Twitch chat bot. Now, I'd like to add a check to my raffle system that checks whether or not the user is a follower of the channel or not. I use this bot on some other channels as well.

This guy has a pretty good follower check script:
https://albinstuff.net/?id=coding
I found it here:
http://discuss.dev.twitch.tv/t/script-check-if-an-user-follows-a-user/767/3
This is what I find useful for what I'm trying to do:
https://albinstuff.net/twitch2.php?id=[USERNAME]&follows=[FOLLOWS]

Objective(s):
- Make a script that replaces [USERNAME] with the channel owner since I use the bot on multiple channels.
- Make a script that replaces [FOLLOWS] with $nick (the user issuing the command) to check if they follow the channel.
- Be able to use the link with [USERNAME] and [FOLLOWS] replaced to return "true" or "false" ; I've checked that guy's script and it works.
- Let the command go through if "true" or halt the command and let the $nick know they need to be a follower if "false" .

Here's my raffle script so far:
Code:
;Raffle System (Beavis)
on *:text:!raffle off:#:{
  if ($nick isop #) {
    set %ticketoff 1
    msg $chan $nick, the raffle/giveaway system is now set to OFF.
  }
  else { msg $chan This command is only available to moderators. }
}
on *:text:!raffle on:#:{
  if ($nick isop #) {
    unset %ticketoff
    msg $chan $nick has started a raffle/giveaway. To enter the raffle/giveaway, you need a ticket. You can purchase a ticket for 200pts by typing the command "!ticket"; only 1 ticket allowed per user. 
  }
  else { msg $chan This command is only available to moderators. }
}
on *:text:!ticket:#:{
  if (%ticketoff) { msg $chan There is currently no raffle/giveaway. | HALT }
  if ((%floodraffle) || ($($+(%,floodraffle.,$nick),2))) { return }
  set -u3 %floodraffle On
  set -u60 %floodraffle. $+ $nick On
  /* Add follower check script here. 
  https://albinstuff.net/twitch2.php?id=[USERNAME]&follows=[FOLLOWS] might have what I need.
  */
  if ($hget($+(tickets.,#),$nick)) { msg # $nick , you already have a ticket! | return }
  var %topic = $+(#,.,$nick)
  ; Check if enough points
  if ($readini(Points.ini,%topic,Points) >= 200) {
    ; Deduct the points
    var %a = $v1 - 200
    writeini Points.ini %topic Points %a
    ; Add the user to tickets.#channel hash table, creating the table if it doesn't exist
    hadd -m $+(tickets.,#) $nick 1
    msg # $nick spent 200 points on a raffle ticket.
  }

else msg #  Sorry $nick , you don't have enough points to join this raffle. You need 200 points to join. }

on *:text:!roll:#:{
  if ($nick isop #) {
    if ($hget($+(tickets.,#))) {
      var %i = $r(1,$hget($+(tickets.,#),0).item)
      msg # The winner is $hget($+(tickets.,#),%i).item
      ; The next line frees the table (all data in it is gone)
      hfree $+(tickets.,#)
    }
    else msg # There are no ticket entries at this time. 
  }
  else msg # $nick, only moderators can use that command.
}


Please help!

Thank you!

~Arden