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 09-19-2010, 03:40 AM
brasilboy109 brasilboy109 is offline
Exorian
Join Date: Aug 2010
Posts: 5
brasilboy109 is on a distinguished road
Radio/Music Script Help

Ok this time im working on a radio script but idk how to play the song serverside/ to everyone

When i type
Quote:
:start musicurl
it only plays the song file to myself
how would i go about making it serverside??

PHP Code:
 function onPlayerChats(){
 if (
player.chat.starts(":start")){
 
this.song player.chat.substring(7);
 
play(this.song);
 
player.chat "";
 }

Reply With Quote
  #2  
Old 09-19-2010, 04:10 AM
MattKan MattKan is offline
the KattMan
Join Date: Aug 2010
Location: United States
Posts: 1,325
MattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to behold
Send a message via AIM to MattKan
Don't put it as Clientside?
Reply With Quote
  #3  
Old 09-19-2010, 04:20 AM
Demisis_P2P Demisis_P2P is offline
Kanto League Champion
Demisis_P2P's Avatar
Join Date: Jan 2005
Posts: 2,357
Demisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud of
you can't really.
graal sucks at almost everything audio related.
__________________
Reply With Quote
  #4  
Old 09-19-2010, 05:27 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
you need to trigger clients to make the song play for them also.

in a weapon everyone has like -MusicSystem try something like

PHP Code:
function onActionServerside(cmdp1){
  if(
cmd == "playall"){
    for(
temp.pallplayers){
      
p.triggerclient(this.name"play"p1);
    }
  }
}

//#CLIENTSIDE
function onPlayerChats(){
  if(
player.chat.starts(":start")){
    
triggerserver("gui"this.name"playall"player.chat.substring(7));
  }
}

function 
onActionClientside(cmdp1){
  if(
cmd == "play"){
    
play(p1);
  }

Not tested
Reply With Quote
  #5  
Old 09-19-2010, 11:23 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Your triggerclient is wrong?
triggerclient("weapon", this.name... etc)
__________________
Reply With Quote
  #6  
Old 09-19-2010, 03:10 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by xAndrewx View Post
Your triggerclient is wrong?
triggerclient("weapon", this.name... etc)
"weapon" and "gui" are the same.
__________________
Skyld
Reply With Quote
  #7  
Old 09-19-2010, 05:55 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Skyld View Post
"weapon" and "gui" are the same.
Which is why he pointed out the triggerclient, not the triggerserver

PHP Code:
p.triggerclient(this.name"play"p1); 
was the part he was referring to
__________________
Reply With Quote
  #8  
Old 09-19-2010, 06:08 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by cbk1994 View Post
Which is why he pointed out the triggerclient, not the triggerserver

PHP Code:
p.triggerclient(this.name"play"p1); 
was the part he was referring to
I guess that's what I get for not reading the thread properly
__________________
Skyld
Reply With Quote
  #9  
Old 09-19-2010, 08:11 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
yeah in your face!!! right there in ya face!!!
__________________
Reply With Quote
  #10  
Old 09-19-2010, 08:34 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Use a ganiscript No need to trigger then
__________________
Reply With Quote
  #11  
Old 09-19-2010, 09:04 PM
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
Script help for 'triggerclient':
triggerclient(str)
TServerPlayer.triggerclient(str)
Script help for 'triggerserver':
Clientside:
triggerserver(str, str)
Reply With Quote
  #12  
Old 09-19-2010, 09:43 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by Chompy View Post
Use a ganiscript No need to trigger then
I wouldn't, I rather just send one triggeraction when the songs finished instead of sending every player an attr flag containing the same information inside the same level.

Quote:
Originally Posted by Mark Sir Link View Post
Script help for 'triggerclient':
triggerclient(str)
TServerPlayer.triggerclient(str)
Script help for 'triggerserver':
Clientside:
triggerserver(str, str)
?????
__________________
Reply With Quote
  #13  
Old 09-19-2010, 10:01 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by xAndrewx View Post
I wouldn't, I rather just send one triggeraction when the songs finished instead of sending every player an attr flag containing the same information inside the same level.
Instead of triggering all players on the server you could just make the client (player) listen (monitor) a variable (for example serverr.radiosong).

I also take back what I said about gani scripts, I misread the OP's post. I still stand by what I said above though.
__________________
Reply With Quote
  #14  
Old 09-19-2010, 10:28 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Mark Sir Link View Post
Script help for 'triggerclient':
triggerclient(str)
TServerPlayer.triggerclient(str)
Script help for 'triggerserver':
Clientside:
triggerserver(str, str)
Are you honestly surprised that Graal's documentation is inaccurate?
__________________
Reply With Quote
  #15  
Old 09-20-2010, 08:46 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 cbk1994 View Post
Are you honestly surprised that Graal's documentation is inaccurate?
what do you mean, I am using triggerclient(this.name, params) in several scripts with no issue

I actually didn't know triggerclient would work if "gui" or "weapon" was passed along as a param.
Reply With Quote
  #16  
Old 09-20-2010, 12:45 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Mark Sir Link View Post
what do you mean, I am using triggerclient(this.name, params) in several scripts with no issue

I actually didn't know triggerclient would work if "gui" or "weapon" was passed along as a param.
Annoyingly, both seem to work now that I've actually checked .

Gscript is such an awful language.
__________________
Reply With Quote
  #17  
Old 09-20-2010, 07:27 PM
Dnegel Dnegel is offline
Rjax Shizibz
Join Date: Jul 2009
Posts: 1,334
Dnegel will become famous soon enough
Quote:
Originally Posted by cbk1994 View Post
Gscript is such an awful language.
Careful now..
Reply With Quote
  #18  
Old 09-21-2010, 12:24 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Dnegel View Post
Careful now..
I fully agree with Chris though x)
__________________
Reply With Quote
  #19  
Old 09-21-2010, 10:18 AM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by Chompy View Post
I fully agree with Chris though x)
we all do x)
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #20  
Old 09-23-2010, 03:29 AM
Seeya Seeya is offline
ω
Seeya's Avatar
Join Date: Jul 2007
Location: Seminole, FL
Posts: 1,903
Seeya is a splendid one to beholdSeeya is a splendid one to beholdSeeya is a splendid one to beholdSeeya is a splendid one to beholdSeeya is a splendid one to behold
Send a message via AIM to Seeya
Quote:
Originally Posted by cbk1994 View Post
Are you honestly surprised that Graal's documentation is inaccurate?
no you're wrong graal can't be wrong

kale when did u learn 2 script get out of npc scripting sub-forums
__________________
Kale Vimes

Reply With Quote
  #21  
Old 09-23-2010, 09:51 PM
Supaman771 Supaman771 is offline
Posting The Truth
Supaman771's Avatar
Join Date: Feb 2008
Posts: 1,694
Supaman771 is a glorious beacon of lightSupaman771 is a glorious beacon of lightSupaman771 is a glorious beacon of light
Quote:
Originally Posted by Seeya View Post
no you're wrong graal can't be wrong

kale when did u learn 2 script get out of npc scripting sub-forums
You guys are ***s.
__________________
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 06:39 PM.


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