Top

Random Song Requester in radio channels


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  7.0 (of 1 scores)
Date Added  May 31, 2009
Last Updated  Jun 03, 2009
Tags  channel  radio  random  request  song 

Description

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.:
Quote:

!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

THANKYOU RusselB!!!!

Changelog

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.

Grab the Code

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

  (9)  RSS
Jethro_
Comments: 940
 
mIRC Snippet:  Random Song Requester in radio channels
Posted on May 31, 2009 10:06 pm
Nice one, Minicruzer. By courtesy of RusselB, you should add credit to him who assisted you making this script feasible.
miniCruzer
Comments: 52
 
mIRC Snippet:  Random Song Requester in radio channels
Posted on May 31, 2009 10:59 pm
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.
Ayon
Comments: 21
 
mIRC Snippet:  Random Song Requester in radio channels
Posted on Jun 1, 2009 2:27 am
something like this might work maybe...?
Code:
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
  }
}
miniCruzer
Comments: 52
 
mIRC Snippet:  Random Song Requester in radio channels
Posted on Jun 1, 2009 9:13 pm
@ 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!
Ayon
Comments: 21
 
mIRC Snippet:  Random Song Requester in radio channels
Posted on Jun 2, 2009 12:56 am
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
miniCruzer
Comments: 52
 
mIRC Snippet:  Random Song Requester in radio channels
Posted on Jun 2, 2009 3:15 pm
@ Ayon - Would this create the need for storing multiple values to one variable? How do I do that?
Ayon
Comments: 21
 
mIRC Snippet:  Random Song Requester in radio channels
Posted on Jun 2, 2009 6:18 pm
you could just update the existing variable with the new value at the end
blitzz
Comments: 136
 
mIRC Snippet:  Random Song Requester in radio channels
Posted on Jun 3, 2009 1:08 am
nice miniCruzer.. look simple.
miniCruzer
Comments: 52
 
mIRC Snippet:  Random Song Requester in radio channels
Posted on Jun 3, 2009 11:10 am
Thanks, blitzz!

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  

Bottom