Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-06-2009, 03:42 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Music on level with weapon

I have this script, that should be playing the music.
When it was in the level scripts, the mp3 file just needed to be in the base part of the main graal folder, e.g. C:/Graal. I put the mp3 in the music folder and the main folder, and nothing plays. It does say in F3 options that it has the right name to play, and changes as I go to the levels needed, but no sound comes out. One of the mp3's is the same that used to work fine on a level npc.

PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
setTimer(0.05);
}
// Music
function onTimeout(){
  if (
player.level.name == "crosscastle_1c10.nw"){
    
playlooped("armageddon-saljiut.mp3");
  }
  if (
player.level.name == "crosscastle_1d10.nw"){
    
playlooped("armageddon-saljiut.mp3");
  }
  if (
player.level.name == "crosscastle_1b05.nw"){
    
playlooped("armageddon-lystra.mp3");
  }
  if (
player.level.name == "crosscastle_1b04.nw"){
    
playlooped("armageddon-lystra.mp3");
  }
  if (
player.level.name == "crosscastle_1c05.nw"){
    
playlooped("armageddon-lystra.mp3");
  }
  if (
player.level.name == "crosscastle_1c04.nw"){
    
playlooped("armageddon-lystra.mp3");
  }

  
setTimer(0.05);

__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #2  
Old 11-06-2009, 04:10 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I know this doesn't help your problem but you should consider using arrays and get rid of the timeout loop, onPlayerEnters will work fine.

PHP Code:
//#CLIENTSIDE 
// Music 
function onPlayerEnters(){ 
  
temp.saljiut = {
    
"crosscastle_1c10.nw""crosscastle_1d10.nw"
  
}
  
temp.lystra = {
    
"crosscastle_1b05.nw""crosscastle_1b04.nw",
    
"crosscastle_1c05.nw""crosscastle_1c04.nw"
  
}
  if (
player.level.name in temp.saljiut) { 
    
playlooped("armageddon-saljiut.mp3"); 
  } 
  else if (
player.level.name in temp.lystra) { 
    
playlooped("armageddon-lystra.mp3"); 
  } 

Try placing the files in the music folder, then delete your filenamecache file, and reload Graal so it has to go through your Graal folder and files again.
__________________
Quote:
Reply With Quote
  #3  
Old 11-06-2009, 04:17 AM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
Are you getting any failed downloads in the F2 console?

Make sure you have .mp3 listed in the folder config where the files are saved, i think
Reply With Quote
  #4  
Old 11-06-2009, 05:15 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
yeah, its saying its not found in f2, but its in the main root graal folder for sure, and its the same name in the script as the name of the mp3. Its not on rc, shouldnt have to be, on the level npc script it worked fine when the file was in my C:/Graal folder without being on rc.

Quote:
Originally Posted by fowlplay4 View Post
Try placing the files in the music folder, then delete your filenamecache file, and reload Graal so it has to go through your Graal folder and files again.
Tried doing that and placing in levels/music, then in just C:/Graal, no go.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #5  
Old 11-07-2009, 02:34 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Any other ideas why it wouldnt find it? it makes no sense to me.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #6  
Old 11-07-2009, 06:17 AM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
You should really try uploading it on RC...if it's saying file not found, that's more than likely the problem.
Reply With Quote
  #7  
Old 11-07-2009, 09:24 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
thats why :/
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #8  
Old 11-08-2009, 01:03 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
We were gonna use mp3, but this is graal, so screw it midis it is.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #9  
Old 11-08-2009, 01:12 AM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
I would imagine your problem is that it starts playing every 0.05 seconds. Stop using a timeout.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #10  
Old 11-08-2009, 01:29 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
I did, i changed that. My problem isnt that it starts playing every 0.05 seconds, because....

Quote:
Originally Posted by sssssssssss View Post
yeah, its saying its not found in f2, but its in the main root graal folder for sure, and its the same name in the script as the name of the mp3. Its not on rc, shouldnt have to be, on the level npc script it worked fine when the file was in my C:/Graal folder without being on rc.


Tried doing that and placing in levels/music, then in just C:/Graal, no go.
...like i stated before, the file isnt being found.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #11  
Old 11-08-2009, 01:42 AM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by sssssssssss View Post
I did, i changed that.
It would help if you updated your script in the OP.

Anyways, have you tried putting your files in the /sounds/ directory?

Why are you doing it this way, anyways? Nobody but you is going to be able to hear the music...
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #12  
Old 11-08-2009, 01:49 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I'd recommend finding a web-host that people could stream the music files from, than just use a url like so:

playlooped("http://www.somewhere.com/else/audio.mp3");

OR

Request an increase in download-able file sizes, so you can upload them to your server and just use the play command like normal.
__________________
Quote:
Reply With Quote
  #13  
Old 11-08-2009, 02:13 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
It's really not a big deal, b/c most people play w/o sound anyways. I thought about streaming it after these problems started, but decided that its just easier to use midis, at least for now. ty though peoples.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #14  
Old 11-08-2009, 02:19 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Something else strange has happened now. I have this weapon playing the midis.

PHP Code:
//#CLIENTSIDE
// Music  
function onPlayerEnters(){  
  
temp.saljiut = { 
    
"crosscastle_1c10.nw""crosscastle_1d10.nw" 
  
};
  
temp.lystra = { 
    
"crosscastle_1b05.nw""crosscastle_1b04.nw"
    
"Crosscastle_1c05.nw""crosscastle_1c04.nw" 
  
};
  
temp.onlinestart "armageddon-onlinestart.nw";
  if (
player.level.name in temp.saljiut) {  
    
playlooped("armageddon-saljiut.mid");  
  }  
  else if (
player.level.name in temp.lystra) {  
    
playlooped("armageddon-lystra.mid");  
  }  
  else if (
player.level.name == temp.onlinestart){
    
playlooped("armageddon-onlinestart.mid");
  }

and took out all the level npcs that were playing music before. but I keep having the music stop in 1 level, and get this error in F2.

Quote:
Data directory: C:/Program Files/Graal/
Scanning folder structure of C:/Program Files/Graal/...
Done.File download: shopglobal_gelat.png not found
File download: 0.wav not found
File download: sde-armageddon-town1.mp3 not found
File download: 0.wav not found
File download: sde-armageddon-town1.mp3 not found
File download: 0.wav not found
File download: sde-armageddon-town1.mp3 not found
File download: armageddon-lystra.mid (size: 7173) done
File download: 0.wav not found
File download: sde-armageddon-town1.mp3 not found
File download: 0.wav not found
File download: sde-armageddon-town1.mp3 not found
File download: rc_graalonline.jpg not found
No clue what 0.wav is, never had anything like that, and sde-armageddon-town1.mp3 was taken out of the level a long long time ago.

I double checked the level, and did a scan on all levels, weapons, and classes in rc, and it said it didnt fine "sde-armageddon-town1" in any of them. So any other ideas anyone may have would be helpful, because its really annoying.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #15  
Old 11-08-2009, 02:35 AM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
Quote:
Originally Posted by sssssssssss View Post
...like i stated before, the file isnt being found.
upload it on RC and make sure you have in the folder options

file folder/folder/*.mp3

probably levels/music?
Reply With Quote
  #16  
Old 11-08-2009, 03:20 AM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by sssssssssss View Post
I double checked the level, and did a scan on all levels, weapons, and classes in rc, and it said it didnt fine "sde-armageddon-town1" in any of them. So any other ideas anyone may have would be helpful, because its really annoying.
Not sure how scanning works. Have you opened the level as text and checked?
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #17  
Old 11-08-2009, 03:29 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
I checked in notepad, nothings there.

Quote:
Originally Posted by Mark Sir Link View Post
upload it on RC and make sure you have in the folder options

file folder/folder/*.mp3

probably levels/music?
Im not wanting it to work, and it thinks its there for some reason. Its out of everything.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #18  
Old 11-10-2009, 09:49 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Is there any other thing i can check? any other possibility it would be doing this?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #19  
Old 11-13-2009, 04:18 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
would a gserver reset be logical with this problem, the lv4 sword problem, and the bomb and arrow problem on the server?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
Reply


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 04:27 PM.


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