SCRIPT ID: LYRICS
Hi people.. :) I was thinking of making something that i haven't seen before in mIRC Scripting and in the same time something that would be a nice and usefull feature for a bot. So I came up with this :))
;;Lyrics Finder Scripted By OrFeAsGr;;
;;http://humanity.ucoz.com;;
;;Script Triggers with a channel msg;;;
;;;Type !lyrics <search term>;;;;
;;;v0.6 15/01/2017;;;
;;;Change the source site to www.azlyrics.com because genius.com now responds only to browsers..;;;
;;; http://hawkee.com/snippet/16273/ ;;;
on *:TEXT:*:#: {
if ($strip($1) == !lyrics) {
if (!%LYRICSversion) || (%LYRICSversion != v0.6) { set %LYRICSversion v0.6 }
if (!%lyricstdelay) {
set -u30 %lyricstdelay 1
if (!$2) { .timer 1 2 msg $chan You Didn't Type KeyWord(s) To Search For (e.g !lyrics la la la) }
elseif ($2) { set %lyricsnick $nick | set %lyricschan $chan | set %lyricssearch $replace($2-,$chr(32),+) | sockopen Lyrics search.azlyrics.com 80 }
}
}
}
on *:SOCKOPEN:*: {
if ($sockname == Lyrics) {
sockwrite -nt $sockname GET $iif(%lyricssearch, $+(/search.php?q=,$v1), $chr(47)) HTTP/1.1
sockwrite -nt $sockname Host: search.azlyrics.com
sockwrite -nt $sockname User-Agent: Mozilla/4.0
sockwrite $sockname $crlf
}
}
on *:SOCKREAD:*: {
if ($sockname == Lyrics) {
var %Lyricsreader
sockread %Lyricsreader
if (*azlyrics.com/lyrics* iswm %Lyricsreader) {
tokenize 34 %Lyricsreader | set %lyrlink $2 | tokenize 62 %Lyricsreader | set %lyrtitle $gettok($3,1,60) | set %lyrartist $gettok($6,1,60)
msg %lyricschan Top Result: $+($chr(03),03,%lyrtitle,$chr(15)) by $+($chr(03),07,%lyrartist,$chr(15)) Link: $+($chr(03),10,%lyrlink,$chr(15)) More Songs: $+($chr(03),05,http://search.azlyrics.com,$+(/search.php?q=,%lyricssearch),&p=0&w=songs)
if (!%lyradv) { set -u3600 %lyradv 1 | .timer 1 3 msg %lyricschan Lyrics Finder Scripted by OrFeAsGr :.:.. http://humanity.ucoz.com ..:.: Visit for mIRC Scripts and Help! }
sockclose $sockname
}
if (*Sorry, your search returned* iswm %Lyricsreader) { msg %lyricschan Your search returned 0 results! :/ Sorry... | sockclose $sockname }
}
}
Keep the origin of the script when you share it please :)
Enjoy :)
Or do you want to donate some bucks because you like my scripts??? Visit https://www.paypal.me/OrFeAsGr
Thx! ^_^
v0.5 04/09/2016
-Time for some changes!
-Updated/Cleaned code. The previous version made mIRC get unresponsive for at least 19 seconds, probably because of too much lines being recieved. The script now works in 1-3 seconds!
-Only a single message containing: Number of results, 1st result and the link to all of them.
--Enjoy!!!
------------------------------Older Updates below----------------------------
v0.3 14/06/2016
-Added Version and Script ID for Update Checker Script (Nothing changes in the way the script works you only need this if you use Update Checker. More info on my profile threads.)
v0.2 27/05/2016
Update after a long time!
Thanks Diesel for finding the error in ON TEXT event!
Script now works fine!
Hey @Clark2016 ! I updated this script today! It works everytime and a lot faster! Give it a try and tell me if it works right <3