Random Song Requester in radio channels

By miniCruzer on May 31, 2009

Random song requester for radio channels. Just save a list of songs in a text document and call it songlist.txt << Save to mIRC Directory

You should add the request trigger before the song in the text file. Eg.:

!r Artist - Song

Type /randsong will activate the script.

Change !r to your format.

URL to forum thread where it was started: http://www.hawkee.com/phpBB2/viewtopic.php?t=19696

[size=20]THANKYOU RusselB!!!![/size]

[size=15]Changelog[/size]

Change 1
Uses variables to avoid repeating songs twice in a row. Thank you Ayon
Added function for other users to request a song from your list, using !randsong.

menu channel, nicklist {
  Request : randsong $?="Enter Artist and/or title of request"
}
alias randsong {
  if $chan {
    var %temp = $iif($1,$1-,$read(songlist.txt))
    if (%prev.song == $readn) { echo -atg Error ... | halt }
    set %prev.song $readn
    msg $chan %temp
  }
}
on *:TEXT:!randsong:#:.msg # $iif(!$2,$read(songlist.txt),$read(songlist.txt,w,$+(*,$2,*)))

Comments

Sign in to comment.
troll   -  Apr 29, 2011

does it still work

 Respond  
miniCruzer   -  Jun 03, 2009

Thanks, blitzz!

 Respond  
blitzz   -  Jun 03, 2009

nice miniCruzer.. look simple.

 Respond  
Ayon   -  Jun 02, 2009

you could just update the existing variable with the new value at the end

 Respond  
miniCruzer   -  Jun 02, 2009

@ Ayon - Would this create the need for storing multiple values to one variable? How do I do that?

 Respond  
Ayon   -  Jun 02, 2009

if you want to ignore all previous requests you could try to store all $readn results in the %prev.song variable and halt it if the new readn is found in %prev.song

 Respond  
miniCruzer   -  Jun 01, 2009

@ Ayon - I see! It works, but a few lines down it can still request the song two lines down. I test ran it, and it works better than before. Thanks for your help. I guess we could get extensive with a ton of variables. Setting variables for each new song. It'd be messy, and I'm sure there's a way around it, but... This method still works. Thnx!

 Respond  
Ayon   -  Jun 01, 2009

something like this might work maybe...?

alias randsong {
  if $chan {
    var %temp = $iif($1,$1-,$read(songlist.txt))
    if (%prev.song == $readn) { echo -atg Error ... | halt }
    set %prev.song $readn
    msg $chan %temp
  }
}
 Respond  
miniCruzer   -  May 31, 2009

Done ;)

I'd like to get it so it won't request the same song 2 times in a row. Just need to figure out where I can set a variable to be the last requested song, and if it comes out, it halts and echos error.

 Respond  
Jethro   -  May 31, 2009

Nice one, Minicruzer. By courtesy of RusselB, you should add credit to him who assisted you making this script feasible.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.