View Single Post
  #1  
Old 02-24-2006, 03:29 AM
Prozac Prozac is offline
one of the good guys
Prozac's Avatar
Join Date: Jan 2006
Posts: 245
Prozac is on a distinguished road
Send a message via AIM to Prozac
music script dosent work suddenly

Script worked fine for weeks.
Then one day it didn't.
It dosent work today either after full pc reboot.
what happened to graal to make this not work?
mp3's load in urls/

PHP Code:
//#CLIENTSIDE
function onCreated()
{
this.url="http://my.url.here/folder/";  //actual url unimportant
this.playlist={"song1.mp3","song2.mp3"};
}

function 
onPlayerchats()
  {
   if (
player.chat=="/playlist")
    {
     
player.chat="Playlist has "this.playlist.size() @ " songs in it.";
    }
    
   if (
player.chat=="/playmusic")
    {
      for (
this.i=0this.i<this.playlist.size(); this.i++) 
      {
        
this.song=this.url@this.playlist[this.i];
        
play(this.song);
        
this.songlength=int(musiclen/1000);
        
player.chat="Now playing: "@this.playlist[this.i]@" : "@this.songlength;
        
sleep(this.songlength);
      }
    }
    
   if (
player.chat=="/playrandom")
    {
      for (
this.j=0this.j<this.playlist.size(); this.j++) //for as many songs in list
      
{
      
this.i=int(random(0,this.playlist.size()));  // choose a random song
      
this.song=this.url@this.playlist[this.i];
      
play(this.song);
      
this.songlength=int(musiclen/1000);
      
player.chat="Now playing: "@this.playlist[this.i]@" : "@this.songlength@" seconds";
      
sleep(this.songlength);
      }    
    }

   if (
player.chat=="/stopmusic")
    {
     
stopmidi;
     
player.chat="music stopped";
    }
    
 } 
no sound for random play
no sound for playlist play
display says 0 seconds in the song length.
what changed in gs2 or game client?!?!?!?!?!
Reply With Quote