mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2015
Posts: 3
M
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Jul 2015
Posts: 3
Hello i search someone can help me for a script . I want a raffle script but not with point thx

Last edited by MarcFryd; 03/07/15 11:30 PM.
Joined: Jul 2015
Posts: 3
M
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Jul 2015
Posts: 3
Heuuuuu why there is no one respond frown

Joined: Sep 2014
Posts: 259
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
I made this a long time ago, but it prolly still works. It only selects someone as winner if that person follows the stream, and it requires this script http://hawkee.com/snippet/10194/

Use: !raffle start
(only the streamer can use this command)


Code:
on *:text:!raffle*:#: {
  if ($2 == start) && ($nick == $remove(#,$chr(35))) {
    if (%raffle. [ $+ [ $chan ] ]) { msg # A raffle is already underway! | return }
    set -u120 %raffle. [ $+ [ $chan ] ] On
    msg # Raffle started! Type !raffle to participate, and make sure you are following the stream, or you won't be able to win! The winner will be chosen in 2 minutes
    .timer 1 60 msg # 60 seconds left until raffle ends! Type !raffle to join.
    
    .timer 1 90 msg # 30 seconds until raffle ends! Type !raffle to join
    .timer 1 120 endofraffle #
  }
  if (!$2) && ($1 == !raffle) {
    if (!%raffle. [ $+ [ $chan ] ]) return
    if (!%raffle.string. [ $+ [ $chan ] ]) set %raffle.string. [ $+ [ $chan ] ] $nick
    set %raffle.string. [ $+ [ $chan ] ] $addtok(%raffle.string. [ $+ [ $chan ] ] $+ ,$nick,32)
    ;echo -a %raffle.string. [ $+ [ $chan ] ]
  }
}

alias endofraffle {
  ;echo -a %raffle.string. [ $+ [ $1 ] ]
  var %i 1 | var %temp = $numtok(%raffle.string. [ $+ [ $1 ] ] $+ ,32)
  msg $1 Raffle has ended! %temp people participated in the raffle. Selecting a winner at random..
  :selection
  var %winnernumber = $rand(1,%temp) | var %user = $gettok(%raffle.string. [ $+ [ $1 ] ] $+ ,%winnernumber,32) | var %streamer = $remove($1,$chr(35))
  jsonopen -du raffle https://api.twitch.tv/kraken/users/ $+ %user $+ /follows/channels/ $+ %streamer
  if (%i > 50) { msg $1 No winner could be selected. | unset %raffle.string. [ $+ [ $1 ] ] | return }
  if ($json(raffle,channel,views) == $null) { inc %i | goto selection }
  msg $1 %user follows the stream and is the winner of the raffle, congrats!! | unset %raffle.string. [ $+ [ $1 ] ]     
}

Last edited by Sakana; 19/07/15 08:36 PM.
Joined: Jul 2015
Posts: 3
M
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Jul 2015
Posts: 3
Thanks man you're a genius blush


Link Copied to Clipboard