עמוד ראשי מירק סקריפטינג פרסום קודים ומדריכים נגן מוזיקה במירק - Mp3-Player

נגן מוזיקה במירק - Mp3-Player

בפורום זה יפורסמו הקודים והמדריכים על ידי המשתמשים, לאחר בדיקת הקודים יועברו הקודים/המדריכים לפורום המתאים להם ע"י צוות האתר.

הצטרף: 13 אוגוסט 2010, 12:44
הודעות: 41
פורסם: 13 אוקטובר 2012, 13:07
שם הקוד: Mp3-Player
יוצר: לא ידוע
גרסה: 1.0
תיאור: נגן מוזיקה במירק
הפעלה: כנסו למירק ולחצו במקלדת ALT + R, לחצו למעלה בצד שמאל File ואז New, תעתיקו את הסקריפט ותאשרו.
dialog mp3player {
  title "Mp3-Player [/mp3]"
  size 33 -1 137 118
  option dbu
  list 1, 0 28 137 70, sort size hsbar
  button "Play", 2, 58 16 21 12
  button ">|", 3, 110 16 26 12
  button "|<", 4, 1 16 26 12
  button "Stop", 6, 82 16 26 12
  edit "Nothing is played", 7, 28 1 109 14, read autohs center
  edit "00:00", 8, 0 1 28 14, read center
  edit "", 9, 0 98 137 10, read
  check "Pause", 5, 29 16 26 12, push
  edit "", 16, 0 108 137 10, read
  menu "Menu", 10
  item "Set Directory", 11, 10
  menu "Options", 12
  item "Spam options", 13, 12
  item break, 14, 12
  item "Volume control", 15, 12
  item "ID3 viewer", 17, 12
}
 
on *:dialog:mp3player:menu:15 {
  if (!$dialog(vol)) { dialog -md vol vol }
  else { dialog -v vol vol }
}
dialog id3viewer {
  title "IDv3"
  size -1 -1 79 73
  option dbu
  edit "", 1, 26 2 50 10, read autohs
  text "Artist", 2, -2 3 25 9, center
  text "Title", 3, -2 14 25 9, center
  edit "", 4, 26 13 50 10, read autohs
  text "Album", 5, -2 26 25 9, center
  edit "", 6, 26 25 50 10, read autohs
  text "Genre", 7, -2 38 25 9, center
  edit "", 8, 26 37 50 10, read autohs
  text "Channel", 9, -2 50 25 9, center
  edit "", 10, 26 49 50 10, read autohs
  text "Bitrate", 11, -2 62 25 9, center
  edit "", 12, 26 61 50 10, read autohs
}
dialog spamopt {
  title "Spam options"
  size -1 -1 142 98
  option dbu
  box "Spam to", 1, 3 0 138 34
  radio "", 2, 8 20 9 10
  radio "", 3, 8 8 8 10
  edit "#channel1,#channel2", 4, 64 20 72 10, autohs
  box "Spam Message", 9, 3 34 138 51
  edit "", 10, 11 42 122 10, autohs
  text "Available identfiers : <title> , <artist> , <album> , <genre> , <mode> , <bitrate> , <year> , <length> ", 11, 6 64 133 18
  button "Clear", 5, 55 52 37 8
  button "Preview", 12, 95 52 37 8
  button "Restore default", 13, 11 52 41 8
  button "Save", 14, 107 87 33 9
  check "", 15, 3 86 8 10
  text "Enable spamming", 16, 12 87 48 8
  text "All channels", 17, 17 9 49 8
  text "Some channels", 18, 17 21 41 8
}
on *:dialog:spamopt:sclick:5 {
  if ($did(10)) {  .did -r spamopt 10 }
}
on *:dialog:spamopt:sclick:12 {
  if ($did(10)) { echo -a $did(10) }
}
dialog vol {
  title "Volume"
  size -1 -1 78 34
  option dbu
  button "+", 1, 1 1 37 12
  button "-", 2, 40 1 37 12
  edit "", 3, 0 14 76 10, read center
  text "Mute", 4, 9 25 25 8
  check "Check Box", 5, 0 24 8 10
}
on *:dialog:vol:sclick:5 {
  if ($did(5).state) {
    /vol -pu1
  }
  else { vol -pu2 }
}
on *:dialog:vol:sclick:1 {
  vol -p $calc($vol($insong.fname) + 3000)
  did -ra vol 3 $vol($insong.fname)
}
on *:dialog:vol:sclick:2 {
  vol -p $calc($vol($insong.fname) - 3000)
  did -ra vol 3 $vol($insong.fname)
}
on *:dialog:vol:init:*:/did -ra vol 3 $vol($insong.fname)
 
on *:dialog:spamopt:sclick:13 {
  did -ra spamopt 10 14Pla15Y14ing 15×4[14<artist> 4- 14<title>4]15×4[7A14lbum: 14<album>4]15×4[7B14it7R14ate:<bitrate> kbps4]15×4[7L14ength: <length>4]15 ×-2G£4X2 Mp04315-×
}
on *:dialog:spamopt:sclick:14 {
  if ($did(10)) { hadd -m mp3.player spam.message $did(10) }
  if ($did(2).state) { hadd -m mp3.player spam.channels $did(4) | hadd -m mp3.player spam.mode some }
  if ($did(3).state) { hdel mp3.player spam.mode }
  if ($did(15).state) { hadd -m mp3.player spam.option 1 }
  else { hdel mp3.player spam.option }
  dialog -x spamopt spamopt
}
on  *:dialog:mp3player:menu:13 {
  if (!$dialog(spamopt)) { dialog -md spamopt spamopt }
}
 
 
on *:dialog:spamopt:init:* {
  if ($hget(mp3.player,spam.mode) == some) { did -c spamopt 2 }
  else { did -c spamopt 3 }
  if ($hget(mp3.player,spam.option)) { did -c spamopt 15 }
  if ($hget(mp3.player,spam.message)) { did -a spamopt 10 $hget(mp3.player,spam.message) }
  else { did -a spamopt 10 14Pla15Y14ing 15×4[14<artist> 4- 14<title>4]15×4[7A14lbum: 14<album>4]15×4[7B14it7R14ate:<bitrate> kbps4]15×4[7L14ength: <length>4]15 ×-2G£4X2 Mp04315-× }
  if ($hget(mp3.player,spam.channels)) { did -ra spamopt 4 $hget(mp3.player,spam.channels) }
}
alias mp3player { dialog -md mp3player mp3player }
on *:dialog:mp3player:init:* {
 
  var %rt  $findfile($hget(mp3.player,directory),*.mp3,0,did -a mp3player 1 $nopath($1-))
  unset %rt
 
}
on *:dialog:mp3player:menu:17 {
  dialog -md id3viewer id3viewer
}
on *:dialog:id3viewer:init:* {
 
 
  if ($sound($insong.fname).artist) { did -a id3viewer 1 $sound($insong.fname).artist }
  else { did -a id3viewer 1 NA }
  if ($sound($insong.fname).title) { did -a id3viewer 4 $sound($insong.fname).title }
  else { did -a id3viewer 4 NA }
  if ($sound($insong.fname).album) { did -a id3viewer 6 $sound($insong.fname).album }
  else { did -a id3viewer 6 NA }
  if ($sound($insong.fname).genre) { did -a id3viewer 8 $sound($insong.fname).genre }
  else { did -a id3viewer 8 NA }
  if ($sound($insong.fname).mode) {  did -a id3viewer 10 $sound($insong.fname).mode }
  else { did -a id3viewer 10 NA }
  if ($sound($insong.fname).bitrate) {   did -a id3viewer 12 $sound($insong.fname).bitrate KBPS }
  else { did -a id3viewer 12 NA }
}
 
on *:dialog:mp3player:sclick:4 {
  did -c mp3player 1 $didwm(mp3player,1,$gettok($nopath($insong.fname),1,46))
  if ($did(1).sel > 1) {
    did -c mp3player 1 $calc($did(1).sel - 1)
    playsong
  }
  else {
    did -c mp3player 1 $did(1).lines
    playsong
  }
}
on *:dialog:mp3player:menu:11 {
  hadd -m mp3.player directory $sdir($iif($hget(mp3.player,directory),$v1,$scriptdir),Choose your mp3 directory)
  did -r mp3player 1
  var %xa  $findfile($hget(mp3.player,directory),*.mp3,0,did -a mp3player 1 $nopath($1-))
  unset %xa
}
alias playsong {
  splay -p " $+ $findfile($hget(mp3.player,directory),$did(mp3player,1).seltext,1)  $+ "
  hadd -m mp3.player being.played.number $didwm(mp3player,1,$gettok($nopath($insong.fname),1,46))
  did -ra mp3player 7 $sound($insong.fname).artist - $sound($insong.fname).title
  did -ra mp3player 9 FileSize : $mid($calc($file($insong.fname).size / 1000000),1,4) MB / Duration : $asctime($round($calc(($insong.length) / 1000),0),nn:ss),none)
  did -ra mp3player 16 Status : you are playing the $did(mp3player,1).sel $+ th File Out of $did(mp3player,1).lines Files
  if ($uptime(server)) {
    if ($hget(mp3.player,spam.option)) {
      if ($hget(mp3.player,spam.mode) != some) { amsg $replace($hget(mp3.player,spam.message),<title>,$sound($insong.fname).title,<artist>,$sound($insong.fname).artist,<album>,$sound($insong.fname).album,<genre>,$sound($insong.fname).genre,<mode>,$sound($insong.fname).mode,<bitrate>,$sound($insong.fname).bitrate,<year>,$sound($insong.fname).year,<length>,$asctime($calc($insong.length / 1000),nn:ss)) }
      else {
        var %x 1
        while (%x <= $numtok($hget(mp3.player,spam.channels),44)) {
          if ($chan($gettok($hget(mp3.player,spam.channels),%x,44))) {
            msg $gettok($hget(mp3.player,spam.channels),%x,44) $replace($hget(mp3.player,spam.message),<title>,$sound($insong.fname).title,<artist>,$sound($insong.fname).artist,<album>,$sound($insong.fname).album,<genre>,$sound($insong.fname).genre,<mode>,$sound($insong.fname).mode,<bitrate>,$sound($insong.fname).bitrate,<year>,$sound($insong.fname).year,<length>,$asctime($calc($insong.length / 1000),nn:ss))
 
          }
          inc %x
        }
      }
    }
  }
  .hsave -o mp3.player " $+ $scriptdir $+ mp5.hsh $+ "
  .timermp3 0 0 filler
}
alias filler {
  did -ra mp3player 8 $asctime($round($calc(($insong.length - $insong.pos) / 1000),0),nn:ss),none)
}
on *:dialog:mp3player:dclick:1 {
  playsong
}
on *:dialog:mp3player:sclick:2 {
  if ($did(1).seltext) {
    playsong
  }
  else { echo -a 2G£4X2 Mp043 7»« 2Make a selection }
 
}
alias playnextsong {
  if ($did(mp3player,1).sel < $did(mp3player,1).lines) {
    var %x $calc($did(mp3player,1).sel + 1)
    did -c mp3player  1 %x
    playsong
  }
  else { restartplay }
}
on *:dialog:mp3player:sclick:3 {
 
  did -c mp3player 1 $didwm(mp3player,1,$gettok($nopath($insong.fname),1,46))
  playnextsong
 
}
alias restartplay {
  did -c mp3player 1 1
  playsong
}
on *:mp3end {
  did -c mp3player 1 $hget(mp3.player,being.played.number)
  playnextsong
}
on *:dialog:mp3player:sclick:5 {
  if (!$did(5).state) {
    splay resume
  }
  else {
    splay pause
  }
}
on *:dialog:mp3player:sclick:6 {
  splay stop
}
on *:dialog:mp3player:close:* {
  .timermp3 off
  splay stop
}
on *:load {
  hadd -m mp3.player directory $sdir($iif($hget(mp3.player,directory),$v1,$scriptdir),Choose your mp3 directory)
}
on *:start {
  if $exists($scriptdir $+ mp5.hsh) {
    .hmake mp3.player 5
    hload mp3.player " $+ $scriptdir $+ mp5.hsh $+ "
  }
}
alias mp3 { mp3player }
 

יש למצוא גם: pastebin.php?mode=view&s=37
Main Editor
Server: irc.quakanet.org - Channel: #mIRCs
Automatically connect: irc://irc.quakenet.org/mIRCs

חזור אל פרסום קודים ומדריכים

cron