-
Notifications
You must be signed in to change notification settings - Fork 15
/
shoutout.mrc
33 lines (31 loc) · 1.83 KB
/
shoutout.mrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;; SHOUT OUT SCRIPT ;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; If you want to customize this script, you can easily figure out how to by
; editing the bot responses after the three "DESCRIBE $chan" parts of the script.
ON $*:TEXT:/^!(follow|caster|so|shoutout|streamer|ally)\s/iS:%mychan: {
IF (($nick isop $chan) && ($2) && (!%follow.cd)) {
IF (!$3) {
VAR %follow.name $twitch_name($remove($2, @))
IF (%follow.name != $null) {
SET -eu3 %follow.cd On
DESCRIBE $chan is telling everyone to do THEMSELVES a huge favor by taking just a few seconds and following %follow.name by visiting twitch.tv/ $+ %follow.name and pressing the FOLLOW button!
}
ELSE MSG $chan $nick $+ , $2 is not a valid user on Twitch. FailFish
}
ELSE {
SET -eu3 %follow.cd On
VAR %follow.total $calc($0 - 1)
VAR %x = 1
WHILE (%x <= %follow.total) {
VAR %follow.name [ $+ [ %x ] ] $twitch_name($remove($ [ $+ [ $calc(%x + 1) ] ], @))
IF (%follow.name [ $+ [ %x ] ] != $null) VAR %follow.names %follow.names twitch.tv/ $+ %follow.name [ $+ [ %x ] ] ▌
INC %x
}
VAR %follow.names $left(%follow.names, -1)
IF ($numtok(%follow.names,32) >= 2) DESCRIBE $chan is telling everyone to do THEMSELVES a huge favor by taking just a few seconds and following all of these amazing streamers: %follow.names
ELSEIF ($numtok(%follow.names,32) == 1) DESCRIBE $chan is telling everyone to do THEMSELVES a huge favor by taking just a few seconds and following %follow.name by visiting twitch.tv/ $+ %follow.names and pressing the FOLLOW button!
ELSE MSG $chan $nick $+ , none of those names are valid Twitch users. FailFish
}
}
}