mIRC Home    About    Download    Register    News    Help

Print Thread
commands not working at of the sudden #266731 25/01/20 02:28 AM
Joined: Jan 2020
Posts: 9
D
dah Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Jan 2020
Posts: 9
Hello there guys, any of you have this problem where your commands stopped working all of the sudden?
I can connect to the tmi> twitch servers for the bot to run but now my commands are not working?
Restarting my pc work fix that right? Maybe it's buggy on my end?
Edit: Restarted PC didn't do anything though my application was buggy.

Let me know what I should do to fix this.

My command script is coded like this;
Quote
on *:text:!ultra:#tehrani: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan http://bit.ly/3aI4xkn KKomrade $+
}


I have like 5-7 commands like this but all I do is change the (!) and the "msg" and all of the sudden my commands don't trigger in the Twitch chat that I moderate for.
I have problems connecting to "DALnet" so had to uninstall the program and reinstall the program again.
Now I finished the server issue when I type in the mIRC chat that I'm connected to - messages get sent but all of the sudden the commands stopped working?!
I have a bad feeling my sub/resub/gifted sub and twitch prime notify messages won't work either?

There a fix for this so my commands work for the twitch chat I moderate for?
It's weird it's happening to me now. I've worked hard to get my script bot to run correctly.
Not sure what to do? smirk

Last edited by dah; 25/01/20 02:48 AM.
Re: commands not working at of the sudden [Re: dah] #266738 25/01/20 05:17 PM
Joined: Jan 2004
Posts: 1,276
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,276
The simplest cause is if this says off: /remote
In which case you can fix with: /remote on

When something doesn't work correctly, check if the status window has error messages, because sometimes these errors can halt the script execution at the wrong place.

Otherwise it could be other issues, where a text event above in the same script, or sometimes possibly in another script can interfere with these. Except when certain event prefixes are involved, only 1 match text can trigger that event in each script file. You can have ":!red:" and ":!blue:" in the same script, but if you have ":!*:" wildcard on a line above them, then it is triggered instead the ones below. But if you're not seeing anything triggered at all, then that wouldn't be the problem.

Another cause could be that a channel mode is blocking your bot from speaking into the channel, so it could be working but the messages just do not appear. You can debug your scripts by adding echo messages to your own status window, so you can see if the event is even seeing that script line.

echo -s $remove($script,$mircdir) $scriptline DEBUG event $event nick $nick (1-) $1-

If you insert that line inside your event handler, you can see whether it is being triggered, and if so, can see where the lines stop being executed prior to the message.

Re: commands not working at of the sudden [Re: maroon] #266740 25/01/20 08:06 PM
Joined: Jan 2020
Posts: 9
D
dah Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Jan 2020
Posts: 9
First off thanks for the information.
Some things I don't understand but I'll research to get a better understanding.
I could use the "quote" to post my script so then you can tell me why my script isn't showing even though I'm connected to the channel?
Where would I post the code "echo -s $remove($script,$mircdir) $scriptline DEBUG event $event nick $nick (1-) $1-" - If you could make an example that would be great.

Last edited by dah; 25/01/20 09:07 PM.
Re: commands not working at of the sudden [Re: dah] #266742 25/01/20 08:25 PM
Joined: Jan 2004
Posts: 1,276
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,276
you simply sprinkle the debug message to see if the code branches there. You can have it as the 1st line of the event, to see if the event even triggers, then again following the IF() statement to see if the code continues past there or not. for example, just inserting it into your existing code:

Code
on *:text:!ultra:#tehrani: {
echo -s $remove($script,$mircdir) $scriptline DEBUG event $event nick $nick (1-) $1-
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
echo -s $remove($script,$mircdir) $scriptline DEBUG event $event nick $nick (1-) $1-
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan http://bit.ly/3aI4xkn KKomrade $+
}

Re: commands not working at of the sudden [Re: dah] #266743 25/01/20 09:20 PM
Joined: Jan 2020
Posts: 9
D
dah Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Jan 2020
Posts: 9
This is the script I got now which I use for a Twitch stream that I moderator for, let me know if I need to change/delete anything.
Quote
on 1:connect:{ /TWITCHCLIENT 3 }
on *:CONNECT:#tehrani:{
raw CAP REQ :twitch.tv/membership
raw CAP REQ :twitch.tv/tags
raw CAP REQ :twitch.tv/commands
debug @raw
}
raw USERNOTICE:#tehrani:{
if (($msgtags(msg-id).key == sub) && ($msgtags(room-id).key == 191409899)) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
var %sub-plan $replace($msgtags(msg-param-sub-plan).key, 1000, $chr(36) $+ 4.99, 2000, $chr(36) $+ 9.99, 3000, $chr(36) $+ 24.99, Prime, Prime)
msg $1 /me HYPERS nickmercsSUB !!NEW SUB!! bingCute bingHeart Thank you %nick for subscribing with a %sub-plan Sub! tehranlOVE
}
if (($msgtags(msg-id).key == resub) && ($msgtags(room-id).key == 191409899)) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
VAR %sub-plan $replace($msgtags(msg-param-sub-plan).key, 1000, $chr(36) $+ 4.99, 2000, $chr(36) $+ 9.99, 3000, $chr(36) $+ 24.99, Prime, Prime)
msg $1 /me HYPERS bingAw !!SUB HYPE!! bingYay bingHype %nick has just resubscribed for $msgtags(msg-param-months).key months in a row with a %sub-plan Sub! tehranLove
}
if (($msgtags(msg-id).key == subgift) && ($msgtags(room-id).key == 191409899)) {
var %nick_from $iif($msgtags(display-name).key, $v1, $msgtags(login).key) , %nick_to $iif($msgtags(msg-param-recipient-display-name).key, $v1, $msgtags(msg-param-recipient-user-name).key)
VAR %sub-plan $replace($msgtags(msg-param-sub-plan).key, 1000, $chr(36) $+ 4.99, 2000, $chr(36) $+ 9.99, 3000, $chr(36) $+ 24.99)
msg $1 /me HYPERS nickmercsGIFT !!GIFT SUB!! bingHeart nickmercsGIFT Thank You %nick_from for gifting a %sub-plan sub to %nick_to $+ ! tehranLove
}
on *:TEXT:*subscribed*:#tehrani:{
if ($nick == twitchnotify) {
if ($5 == $null || $5- == Twitch Prime!) {
msg # tatPrime Thank you @ $+ $1 Twitch Prime Sub! tatPrime
}
}
}
on *:text:!twitter:#tehrani: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan Follow Tehrani on Twitter http://bit.ly/2uvIP24 bingMega $+
}
on *:text:!youtube:#tehrani: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan Subscribe to Tehrani's Official Youtube Channel; http://bit.ly/3aCo2uv nickmercsYT $+
}
on *:text:!discord:#tehrani: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan Join Tehrani's Official Discord Server so you can get updated when he goes live! http://bit.ly/30LyD1K tatSuh $+
}
on *:text:!donation:#tehrani: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan Feel free to donate here using this link; http://bit.ly/2RmUVUm tatTopD $+
}
on *:text:!mobile:#tehrani: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan bingMega 𝓜𝓞𝓑𝓘𝓛𝓔 𝓤𝓢𝓔𝓡𝓢 bingMega You can use this link http://bit.ly/30MzAXH to subscribe. bingOMG $+
}
on *:text:!sub:#tehrani: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan Subscribe to Tehrani on Twitch using this link; http://bit.ly/2TSAz7g 🔓 Unlocks emotes like these 【 tehranSalute tehranLove tehranRage tehranLike 】 $+
}
on *:text:!bsong:#tehrani: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan You can listen to Boris Official Song http://bit.ly/38Ga5dn nickmercsLIT $+
}
on *:text:!9nty:#tehrani: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan bingBad 9nty, make me Mod BabyRage 9nty make me a YouTube video BabyRage Stop deleting my messages BabyRage 9nty make that for me BabyRage 9nty how to make youtube thumbnails? BabyRage 9nty how do I do that? BabyRage 9nty how do I do this? BabyRage 9nty What's a boomer? - Plebs bingBad $+
}
on *:text:!backseat:#tehrani: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan Backseat gaming is when viewers tell Tehrani what to do in game, when it was not asked for. Please refrain from backseating in chat! If the Moderators see you backseat-game you'll be timed out and if you carry on with your actions you'll be banned! nickmercsANGRY $+
}
on *:text:!meta:#tehrani: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan Please do not tell Tehrani or chat info that he does not know in game, it ruins the experience for everyone bingFail $+
}
on *:text:!prime:#tehrani: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan $2 tatPrime Click this link to activate your twitch prime account! https://amzn.to/37AEWId After you link your account, click on the sub link and use the prime feature! Click here to sub! https://go.twitch.tv/subs/tehrani tatPrime $+
}
on *:text:!boris:#tehrani: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan http://bit.ly/2TTMdi1 KKomrade $+
}
on *:text:!tags:#tehrani: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan http://bit.ly/3aI4xkn bingCute $+
}

ON *:LOAD: {
SET -i %streamer tehrani
SET -i %mychan $chr(35) $+ $lower(%streamer)
}
ON $*:TEXT:/clips\.twitch\.tv\/(\w+)/iS:%mychan: {
;VAR %tc_streamer_only $true
;VAR %tc_repost_link $true
;VAR %tc_view_count $true
INC %tc
VAR %tc %tc $+ $ticks
JSONOpen -uw get_twitch_clip $+ %tc https://api.twitch.tv/helix/clips?id= $+ $regml(1)
JSONHttpHeader get_twitch_clip $+ %tc Client-ID avm4vi7zv0xpjkpi3d4x0qzk8xbrdw8
JSONHttpHeader get_twitch_clip $+ %tc Accept application/vnd.twitchtv.v5+json
JSONHttpFetch get_twitch_clip $+ %tc
IF (!$JSONError) {
VAR %tc_streamer $json(get_twitch_clip $+ %tc, data, 0, broadcaster_name).value
IF ((%tc_streamer_only) && (%tc_streamer != %streamer)) NOOP
ELSE MSG $chan 📽 Twitch Clip Info linked by $nick ▌ Streamer: %tc_streamer ▌ Title: $json(get_twitch_clip $+ %tc, data, 0, title).value ▌ Game: $twitch_lookup_game($json(get_twitch_clip $+ %tc, data, 0, game_id).value) ▌ Clipped By: $json(get_twitch_clip $+ %tc, data, 0, creator_name).value ▌ $clip_created_at($TwitchTime($json(get_twitch_clip $+ %tc, data, 0, created_at).value)) $IIF(%tc_view_count, ▌ View Count: $json(get_twitch_clip $+ %tc, data, 0, view_count).value, $null) $IIF(%tc_repost_link, ▌ Link: $json(get_twitch_clip $+ %tc, data, 0, url).value, $null)
}
JSONClose get_twitch_clip $+ %tc
}

alias twitch_lookup_game {
INC %tc
VAR %tc %tc $+ $ticks , %result
JSONOpen -uw twitch_lookup_game $+ %tc https://api.twitch.tv/helix/games?id= $+ $1
JSONHttpHeader twitch_lookup_game $+ %tc Client-ID avm4vi7zv0xpjkpi3d4x0qzk8xbrdw8
JSONHttpHeader twitch_lookup_game $+ %tc Accept application/vnd.twitchtv.v5+json
JSONHttpFetch twitch_lookup_game $+ %tc
IF (!$JSONError) VAR %result $json(twitch_lookup_game $+ %tc, data, 0, name).value
JSONClose twitch_lookup_game $+ %tc
RETURN %result
}

alias clip_created_at {
; this alias will word the time/date that the clip was clipped on differently depending on how long ago it was clipped
VAR %result
IF ($calc($ctime - $1) < 3600) VAR %result Clipped $duration($calc($ctime - $1)) ago
ELSEIF ($calc($ctime - $1) isnum 3600 - 86399) VAR %result Clipped $duration($calc($ctime - $1), 2) ago
ELSEIF ($calc($ctime - $1) isnum 86400 - 2678400) VAR %result Clipped on $asctime($1, mmm dd - h:nn TT)
ELSE VAR %result Clipped on $asctime($1, mmm dd - yyyy)
RETURN %result
}
}
RAW *:#tehrani: {
IF (($nick == tmi.twitch.tv) && (HOSTTARGET isin $rawmsg) && (%mychan isin $rawmsg)) {
tokenize 32 $rawmsg
IF ($chr(45) !isin $4) {
SET %current.host $twitch_name($remove($4, :))
IF (%current.host != $null) && ($5 isnum 2-) MSG %mychan We are now hosting %current.host with $5 active viewers $+ !
ELSEIF (%current.host != $null) && ($5 isnum 0-1) MSG %mychan We are now hosting %current.host $viewers(%current.host) viewers. Go visit them at twitch.tv/ $+ %current.host and say Boris Raid tehranLove !
}
}
}

alias currentgame {
JSONOpen -uw currentgame https://api.twitch.tv/kraken/channels/ $+ $1
JSONHttpHeader currentgame Client-ID avm4vi7zv0xpjkpi3d4x0qzk8xbrdw8
JSONHttpFetch currentgame
VAR %x $IIF($json(currentgame, game).value,$v1,????)
JSONClose currentgame
RETURN %x
}

alias viewers {
JSONOpen -uw viewers https://api.twitch.tv/kraken/streams/ $+ $1
JSONHttpHeader viewers Client-ID avm4vi7zv0xpjkpi3d4x0qzk8xbrdw8
JSONHttpFetch viewers
VAR %x $IIF($json(viewers, stream, viewers).value,$v1,????)
JSONClose viewers
RETURN %x
}

alias streamuptime {
JSONOpen -uw uptime https://api.twitch.tv/kraken/streams/ $+ $1
JSONHttpHeader uptime Client-ID avm4vi7zv0xpjkpi3d4x0qzk8xbrdw8
JSONHttpFetch uptime
VAR %x $IIF($JSON(uptime, stream, created_at).value,$duration($calc($ctime - $TwitchTime($JSON(uptime, stream, created_at).value)),2),????)
JSONClose uptime
RETURN %x
}

alias -l TwitchTime {
if ($regex($1-, /^(\d\d(?:\d\d)?)-(\d\d)-(\d\d)T(\d\d)\:(\d\d)\:(\d\d)(?:(?:Z$)|(?:([+-])(\d\d)\:(\d+)))?$/i)) {
var %m = $Gettok(January February March April May June July August September October November December, $regml(2), 32), %d = $ord($base($regml(3),10,10)), %o = +0, %t
if ($regml(0) > 6) %o = $regml(7) $+ $calc($regml(8) * 3600 + $regml(9))
%t = $calc($ctime(%m %d $regml(1) $regml(4) $+ : $+ $regml(5) $+ : $+ $regml(6)) - %o)
if ($asctime(zz) !== 0 && $regex($v1, /^([+-])(\d\d)(\d+)$/)) {
%o = $regml(1) $+ $calc($regml(2) * 3600 + $regml(3))
%t = $calc(%t + %o )
}
return %t
}
}
ON *:TEXT:!hosts:%mychan: {
IF (($ModCheck) && (!%CD_hosts)) {
SET -eu10 %CD_hosts On
JSONOpen -uw gethosts http://tmi.twitch.tv/hosts?include_logins=1&target= $+ %TwitchID $+ &nocache= $+ $ticks
JSONHttpHeader gethosts Client-ID avm4vi7zv0xpjkpi3d4x0qzk8xbrdw8
JSONHttpFetch gethosts
VAR %x = 0, %hosts
WHILE ($json(gethosts, hosts, %x, host_login).value) {
VAR %hosts %hosts $cached_name($v1) $+ $chr(44)
INC %x
}
IF (%hosts) MSG $chan bleedPurple Thank you to all the $numtok(%hosts, 32) awesome people who are currently hosting this stream: $left($sorttok(%hosts , 32, a), -1) bleedPurple
ELSE MSG $chan $nick $+ , no one is hosting the channel at the moment. FeelsBadMan
JSONClose gethosts
HSAVE -o displaynames displaynames.htb
}
}
ON *:CONNECT: {
IF ($server == tmi.twitch.tv) {
IF (!$hget(new_follows)) HMAKE new_follows
VAR %x = 0
JSONOpen -u newfollows https://api.twitch.tv/kraken/channels/ $+ $lower(%streamer) $+ /follows?client_id=avm4vi7zv0xpjkpi3d4x0qzk8xbrdw8&limit=100&nocache= $+ $ticks
WHILE (%x <= 100) {
VAR %follower_newest $get_follower_name(%x)
IF ((%follower_newest == %follower_last) || ($istok(%last_100_follows,%follower_newest,32))) {
IF (%x == 0) BREAK
SET %follower_last $get_follower_name(0)
BREAK
}
IF ($numtok(%last_100_follows,32) == 100) SET %last_100_follows $deltok(%last_100_follows, 100, 32)
SET %last_100_follows %follower_newest %last_100_follows
IF (%x == 100) SET %follower_last $get_follower_name(0)
INC %x
}
JSONClose newfollows
.timer.followercheck 0 60 followercheck
}
}
ON *:DISCONNECT: .timer.followercheck off

alias get_follower_name {
IF ($regex($json(newfollows, follows, $1, user, display_name).value,^\w+$)) RETURN $json(newfollows, follows, $1, user, display_name).value
ELSE RETURN $json(newfollows, follows, $1, user, name).value
}

alias followercheck {
VAR %x = 1
WHILE ($hget(new_follows,%x).item) {
VAR %name $v1
IF (%name ison %mychan) {
HDEL new_follows %name
SET %live_follows %live_follows %name $+ $chr(44)
}
INC %x
}
VAR %x = 0 , %new_follows
JSONOpen -u newfollows https://api.twitch.tv/kraken/channels/ $+ $lower(%streamer) $+ /follows?client_id=avm4vi7zv0xpjkpi3d4x0qzk8xbrdw8&limit=25&nocache= $+ $ticks
WHILE (%x <= 25) {
VAR %follower_newest $get_follower_name(%x)
IF (%follower_newest == $null) BREAK
IF ((%follower_newest == %follower_last) || ($istok(%last_100_follows,%follower_newest,32))) {
IF (%x == 0) BREAK
SET %follower_last $get_follower_name(0)
BREAK
}
IF ($numtok(%last_100_follows,32) == 100) SET %last_100_follows $deltok(%last_100_follows, 100, 32)
SET %last_100_follows %follower_newest %last_100_follows
VAR %new_follows %new_follows %follower_newest $+ $chr(44)
IF (%x == 25) SET %follower_last $get_follower_name(0)
INC %x
}
JSONClose newfollows
VAR %x = 1
WHILE ($gettok(%new_follows,%x,44)) {
VAR %name $v1
IF (%name ison %mychan) SET %live_follows %live_follows %name $+ $chr(44)
ELSE HADD -z new_follows %name 600
INC %x
}
IF (%live_follows) {
IF ($numtok(%live_follows,32) == 1) {
MSG %mychan KonCha Thank you for the follow $left(%live_follows,-1) $+ !
;WRITE -l1 new_follows.txt %live_follows thanks for the follow!
}
ELSEIF ($numtok(%live_follows,32) >= 2) {
MSG %mychan KonCha Thank you for the follows $left(%live_follows,-1) $+ !
;WRITE -l1 new_follows.txt %live_follows thanks for the follows!
}
;.timer.new_follows_clear 1 6 WRITE -dl1 new_follows.txt
;IF (%stream_is_live) SPLAY -pq follower_sound.mp3
UNSET %live_follows
}
}
on *:text:*:#tehrani:{
if ($nick isop #) { halt }
if ( $len($1-) >= 10 ) {
if ( $calc($regex($1-,/[A-Z]/g) / $regex($1-,/[A-Z]/gi) * 100) >= 70 ) {
var %capsblock = $rand(1,3)
if (%capsblock == 1) { msg $chan $nick -> stop typing in caps! [caps] [warning] bingWOW }
if (%capsblock == 2) { msg $chan $nick -> Ey! stop yelling! [caps] [warning] bingSpy }
if (%capsblock == 3) { msg $chan $nick -> stop typing in BIG LETTERS! [caps] [warning] bingMad }
write capsban.txt $nick
msg $chan /timeout $nick
}
}
}
on $*:text:/(^|\s)cheer\d+(\s|$)/i:#tehrani: {
if (($msgtags(room-id).key == ROOMID) && ($msgtags(bits).key)) {
msg # $msgtags(display-name).key has donated $msgtags(bits).key bits peepoHappy
}
}
ON *:TEXT:!uptime:#tehrani: {
IF (!%CD_twitch_uptime) {
SET -eu30 %CD_twitch_uptime $true
IF ($get_twitch_uptime) MSG $chan Channel has been live for $v1 $+ .
ELSE MSG $chan Channel is not live at the moment! (at least that's what the Twitch API is telling me)
}
}

alias get_twitch_uptime {
VAR %result
JSONOpen -uw uptime https://api.twitch.tv/kraken/streams?channel= $+ $remove($chan,$chr(35)) $+ &nocache= $+ $ticks
JSONHttpHeader uptime Client-ID avm4vi7zv0xpjkpi3d4x0qzk8xbrdw8
JSONHttpFetch uptime
VAR %result $json(uptime, streams, 0, created_at).value
JSONClose uptime
IF (%result) RETURN $duration($calc($ctime - $TwitchTime(%result)))
RETURN $false
}

; TwitchTime alias written by SReject and friends
alias TwitchTime {
if ($regex($1-, /^(\d\d(?:\d\d)?)-(\d\d)-(\d\d)T(\d\d)\:(\d\d)\:(\d\d)(?:(?:Z$)|(?:([+-])(\d\d)\:(\d+)))?$/i)) {
var %m = $Gettok(January February March April May June July August September October November December, $regml(2), 32), %d = $ord($base($regml(3),10,10)), %o = +0, %t
if ($regml(0) > 6) %o = $regml(7) $+ $calc($regml(8) * 3600 + $regml(9))
%t = $calc($ctime(%m %d $regml(1) $regml(4) $+ : $+ $regml(5) $+ : $+ $regml(6)) - %o)
if ($asctime(zz) !== 0 && $regex($v1, /^([+-])(\d\d)(\d+)$/)) {
%o = $regml(1) $+ $calc($regml(2) * 3600 + $regml(3))
%t = $calc(%t + %o )
}
return %t
}
}

Re: commands not working at of the sudden [Re: dah] #266744 25/01/20 11:44 PM
Joined: Jan 2004
Posts: 1,276
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,276
You never said whether "/remote" showed off or no. If it shows off, that's the cause, and you can fix it with: /remote on

Re: commands not working at of the sudden [Re: maroon] #266751 27/01/20 12:40 AM
Joined: Jan 2020
Posts: 9
D
dah Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Jan 2020
Posts: 9
I fixed the issue anyways if the remote is on or off. I tried using the remote word filter to change the remote off to on.
Do you know the code for Twitch Prime users when they sub as it's not triggering when a Twitch Prime shows in chat?

The current code I'm using is this;
Quote
on *:TEXT:*subscribed*:#tehrani:{
if ($nick == twitchnotify) {
if ($5 == $null || $5- == Twitch Prime!) {
msg # tatPrime
}
}
}


This is the entire subscript I use I think for the re-sub it says "subscribed for 0 months" If you can help me with a fix that would be great.
The gift sub-message works fine. Not sure for the tier 2 and tier 3 payments work properly ($9.99 & $24.99) displays the correct price. Unless it's coded correctly it will. Only had $4.99 notify in the chat correctly.
The twitch prime I need to work on for a fix as it doesn't display in the chat when someone subscribes with Twitch Prime.
I believe the subscript works for the new sub and the gift sub...not too sure? If you could have a look at him whole subscription script to see on why the prime twitch doesn't show and why it says "0 months" instead of saying the real month count. That would be great. Also when 5/10 or higher gift subs gets gifted in the chat instead of having separate messages for each sub gift there a way of making the auto-response saying "Thanks for the 5 gifted subs", or "thanks for the 10 gifted subs" ??
I also want to ask if someone changes their tier from tier 1 to tier 2 does the script below say that my message will say "Changed tier subscriptions, changed to tier 2" or something or is my script message to say "thanks for the sub!" ??
I want my script to say all of that. smile
Quote
raw USERNOTICE:#tehrani:{
if (($msgtags(msg-id).key == sub) && ($msgtags(room-id).key == 191409899)) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
var %sub-plan $replace($msgtags(msg-param-sub-plan).key, 1000, $chr(36) $+ 4.99, 2000, $chr(36) $+ 9.99, 3000, $chr(36) $+ 24.99, Prime, Prime)
msg $1 /me HYPERS nickmercsSUB !!NEW SUB!! bingCute bingHeart Thank you %nick for subscribing with a %sub-plan Sub! tehranlOVE
}
if (($msgtags(msg-id).key == resub) && ($msgtags(room-id).key == 191409899)) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
VAR %sub-plan $replace($msgtags(msg-param-sub-plan).key, 1000, $chr(36) $+ 4.99, 2000, $chr(36) $+ 9.99, 3000, $chr(36) $+ 24.99, Prime, Prime)
msg $1 /me HYPERS bingAw !!SUB HYPE!! bingYay bingHype %nick has just resubscribed for $msgtags(msg-param-months).key months in a row with a %sub-plan Sub! tehranLove
}
if (($msgtags(msg-id).key == subgift) && ($msgtags(room-id).key == 191409899)) {
var %nick_from $iif($msgtags(display-name).key, $v1, $msgtags(login).key) , %nick_to $iif($msgtags(msg-param-recipient-display-name).key, $v1, $msgtags(msg-param-recipient-user-name).key)
VAR %sub-plan $replace($msgtags(msg-param-sub-plan).key, 1000, $chr(36) $+ 4.99, 2000, $chr(36) $+ 9.99, 3000, $chr(36) $+ 24.99)
msg $1 /me HYPERS nickmercsGIFT !!GIFT SUB!! bingHeart nickmercsGIFT Thank you %nick_from for gifting a %sub-plan sub to %nick_to $+ ! tehranLove
}
IF (%msg-id == submysterygift) {
VAR %msg-param-mass-gift-count $msgtags(msg-param-mass-gift-count).key
INC %submysterygift. $+ %name %msg-param-mass-gift-count
MSG $1 %name just gifted %msg-param-mass-gift-count tier %msg-param-sub-plan subscriptions to the community! nickmercsSUB nickmercsGIFT
}
on *:TEXT:*subscribed*:#tehrani:{
if ($nick == twitchnotify) {
if ($5 == $null || $5- == Twitch Prime!) {
msg # tatPrime
}
}
}

Last edited by dah; 27/01/20 02:55 AM.