Print Thread
A script for VOD's (Twitch) #25515627/09/15 03:37 PM | |
A Artiiz Ameglian cow | |
OP![]() Artiiz Ameglian cow A Joined: Apr 2015 Posts: 42 | Hello, So I'm thinking of making a command that saves down the exact time in the stream video that the "thing" happend. I've tried doing this so far: Code: on 3:text:!save *:#yznb:{ write HIGHLIGHT.txt $2 $uptime $time $date if ($nick == artiiz) { msg $chan @ $+ $nick VOD saved at $time $date }} But that doesn't quite seem to work. It looks like this in my HIGHLIGHT.txt when I type "!save test". Code: test 5605 17:36:36 27/09/2015 And I have no idea what the "5605" is for, if I need to change the $uptime to something else to make it trigger the Twitch channel. Would really appreciate some help, thanks! |
Re: A script for VOD's (Twitch) Artiiz#25515727/09/15 04:00 PM | |
O OrFeAsGr Fjord artisan | |
![]() OrFeAsGr Fjord artisan O Joined: Feb 2015 Posts: 243 | Hi, |
Re: A script for VOD's (Twitch) OrFeAsGr#25515827/09/15 04:02 PM | |
A Artiiz Ameglian cow | |
OP![]() Artiiz Ameglian cow A Joined: Apr 2015 Posts: 42 | Originally Posted By: OrFeAsGr Hi, Exactly, how long in the stream the command were written, so that you can just click to that part in the VOD of the session. |
Re: A script for VOD's (Twitch) Artiiz#25516027/09/15 04:28 PM | |
O OrFeAsGr Fjord artisan | |
![]() OrFeAsGr Fjord artisan O Joined: Feb 2015 Posts: 243 | Code: on 3:text:!save *:#yznb:{ uptime $time $date $2 if ($nick == artiiz) { msg $chan @ $+ $nick VOD saved at $read(HIGHLIGHT.TXT) }}alias uptime_chan return ENTER-HERE-THE-TWITCH-CHANNELalias uptime { sockclose uptime sockopen uptime nightdev.com 80set %time $1 set %date $2set %thing $3}ON *:SOCKOPEN:uptime: { if ($sockerr) { sockclose $sockname | halt } sockwrite -n $sockname GET /hosted/uptime.php?channel= $+ $uptime_chan HTTP/1.1 sockwrite -n $sockname Host: $sock($sockname).addr sockwrite -n $sockname $crlf}ON *:SOCKREAD:uptime: { if ($sockerr) { sockclose $sockname } var %data sockread %data if ($gettok(%data,1,32) isnum) && ($gettok(%data,2,32)) { var %c = $chr(35) $+ $uptime_chan if ($me !ison %c) { return }write -c HIGHLIGHT.TXT write HIGHLIGHT.txt %thing $qt(%data) %time %date }} So.. i lended westor's script http://hawkee.com/snippet/16314/ (Twitch Uptime Informer) and implemented it on your script to make it do what you want. |
Re: A script for VOD's (Twitch) OrFeAsGr#25516227/09/15 07:41 PM | |
A Artiiz Ameglian cow | |
OP![]() Artiiz Ameglian cow A Joined: Apr 2015 Posts: 42 | Thanks for the help! There seems to be a problem though. It doesn't save all the commands in the txt file, it just replaces the old with the new |
Re: A script for VOD's (Twitch) Artiiz#25516327/09/15 08:13 PM | |
O OrFeAsGr Fjord artisan | |
![]() OrFeAsGr Fjord artisan O Joined: Feb 2015 Posts: 243 | I thought you wanted to save only the last. |
Re: A script for VOD's (Twitch) OrFeAsGr#25516427/09/15 08:19 PM | |
Joined: Sep 2014 Posts: 52 paper0rplastic Babel fish | |
![]() paper0rplastic Babel fish Joined: Sep 2014 Posts: 52 | Using Froggie's JSON parser : Code: on *:text:!highlight:#: { highlight #}alias -l highlight { var %chan $1 var %caster $mid(%chan,2) var %v highlight $+ $ticks JSONOpen -ud %v https://api.twitch.tv/kraken/streams/ $+ %caster var %id $json(%v,stream,_id) if (!%id) { msg %chan %caster is currently OFFLINE. | return } var %created $json(%v,stream,created_at) var %start $ctime($remove($replace(%created,T,$chr(32)),Z)) var %uptime $duration($calc($gmt - %start)) describe %chan + Highlight marker added at %uptime writeini highlights.ini %caster $ctime %uptime $+($chr(91),$asctime(m/d/yy),$chr(93))}on *:text:!display highlights:#: { var %caster $mid(#,2), %i 1 | while $ini(highlights.ini,%caster,%i) { var %m $v1 | var %r %r $readini highlights.ini %caster %m $chr(187) | inc %i } msg # $iif(%r,Highlight Markers: $left($v1,-2),There are no highlight markers.)} Last edited by paper0rplastic; 27/09/15 08:28 PM. |
Re: A script for VOD's (Twitch) paper0rplastic#25517128/09/15 11:57 AM | |
A Artiiz Ameglian cow | |
OP![]() Artiiz Ameglian cow A Joined: Apr 2015 Posts: 42 | Hey, So it works perfectly fine. Code: on 1:text: The "1"? It all worked before because I never had anything in "Users" area, it was empty. |
Re: A script for VOD's (Twitch) Artiiz#25517228/09/15 01:24 PM | |
O OrFeAsGr Fjord artisan | |
![]() OrFeAsGr Fjord artisan O Joined: Feb 2015 Posts: 243 | If you want this script to work for anyone despite their user lvl , yes use * . If you want a script to work for a certain user lvl you should use that lvl, but I recommend checking it with an if statement. |
Re: A script for VOD's (Twitch) Artiiz#25517328/09/15 01:24 PM | |
westor Hoopy frood | |
![]() westor Hoopy frood Joined: Dec 2008 Posts: 1,515 | If you have multiple ON TEXT event into one file this may cause issues, try to paste this code into an other new file into the script editor. Also if you have USER LEVELS LIST you can change the * with the number that you want to work. /help on text Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <- |
Link Copied to Clipboard