Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:53 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.