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 08-22-2009, 04: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
Help :(

PHP Code:
function onCreated() setshape(1,32,32);

function 
onActionServerside(p0,p1) {
  if (
p0!="midi")return;
  
serverr.midi=p1;
  for(
i:players)i.triggerClient("gui",name,"midi");
}

//#CLIENTSIDE
function onCreated() setshape(1,32,32);

function 
onPlayerchats() {
  if (!(
player.account in {"sssssssssss""Decus_Arillias"})) return;
  if (!(
player.chat.starts("playmidi"))) return;
  
t=player.chat.tokenize();
  
triggerserver("gui",midi,t[1]);

  function 
onPlayerenters()
    
playmidi(serverr.midi);

  function 
onActionClientside(p0)
    if (
p0=="midi")onPlayerenters(); 
wont send server flag whatsoever. Im misisng something really easy probably.
__________________
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 08-22-2009, 04:41 AM
Frankie Frankie is offline
xChugxLifex
Frankie's Avatar
Join Date: Feb 2008
Location: New York
Posts: 1,610
Frankie is a jewel in the roughFrankie is a jewel in the rough
Send a message via AIM to Frankie Send a message via MSN to Frankie
first off, you should style your scripts. they look really sloppy. you don't even have a closing bracket for onPlayerChats()

the reason why the server flag isn't being set is because if this is a level NPC, which I'm assuming it is, triggerserver won't work. you'll need to use triggeraction. as far as triggerclient, I'm not sure if that works in a level NPC.
__________________
*Sum41Freeeeek
*Frankie
Reply With Quote
  #3  
Old 08-22-2009, 04:59 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
PHP Code:
function onCreated() setshape(1,32,32);

function 
onActionServerside(p0,p1){
  if (
p0!="midi")return;
  
serverr.midi=p1;
  for(
i:players)i.triggerClient("gui",name,"midi");
}

//#CLIENTSIDE
function onCreated() setshape(1,32,32);

function 
onPlayerchats(){
  if (
player.account!="sssssssssss""Decus_Arillias")return;
  if (!(
player.chat.starts("playmidi"))return;
  
t=player.chat.tokenize();
  
triggeraction(this.x+1,this.y+1,"midi",t[1]);
}

function 
onPlayerenters()
  
playmidi(serverr.midi);

function 
onActionClientside(p0)
  if (
p0=="midi")onPlayerenters(); 
this doesnt work either.
__________________
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
  #4  
Old 08-22-2009, 05:24 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Change
PHP Code:
if (player.account!="sssssssssss""Decus_Arillias")return; 
to
PHP Code:
if (!(player.account in "sssssssssss""Decus_Arillias" })) return; 
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #5  
Old 08-22-2009, 05:35 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Could be missing an "s".
Reply With Quote
  #6  
Old 08-22-2009, 05:54 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
Still nothing, i forgot i already made that change as well.
__________________
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
  #7  
Old 08-22-2009, 06:22 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
If it's a level npc and you're using triggeraction, then you catch the event on the serverside via onActionActionname(), not onActionServerSide().

In your case:

PHP Code:
triggerAction(this.x+1this.y+1"Midi"t[1]); 
Would call the following on the serverside:

PHP Code:
function onActionMidi() {
  
//Do stuff

EDIT: Also, you can't use triggerClient() in level NPCs, you would have to do another triggerAction() on the serverside (making sure you're keeping the setshape on both clientside and serverside) to trigger back to the client.

Last edited by Gambet; 08-22-2009 at 06:41 AM..
Reply With Quote
  #8  
Old 08-22-2009, 06:39 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
This is what it is now.

PHP Code:
function onCreated() setshape(1,32,32);

function 
onActionMidi(p0,p1){
  if (
p0!="midi")return;
  
serverr.sdemidi=p1;
  for(
i:players)i.triggerClient("gui",name,"midi");
}

//#CLIENTSIDE
function onCreated() setshape(1,32,32);

function 
onPlayerchats(){
  if (!(
player.account in "sssssssssss""Decus_Arillias" })) return;
  if (!(
player.chat.starts("playmidi"))return;
  
t=player.chat.tokenize();
  
triggeraction(this.x+1,this.y+1,"midi",t[1]);
}

function 
onPlayerenters()
  
playmidi(serverr.sdemidi);

function 
onActionClientside(p0)
  if (
p0=="midi")onPlayerenters(); 
still no server flag.
saying "playmidi midiname.mid"
__________________
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 08-22-2009, 06:42 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by sssssssssss View Post
This is what it is now.
still no server flag.
saying "playmidi midiname.mid"
Yes, read the edit I made to my previous post about triggerClient().
Reply With Quote
  #10  
Old 08-22-2009, 06:51 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
PHP Code:
function onCreated() setshape(1,32,32);

function 
onActionMidi(p0,p1){
  if (
p0!="midi")return;
  
serverr.sdemidi=p1;
  for(
i:players)i.triggeraction(this.x+1,this.y+1,"enter",midi);

}

//#CLIENTSIDE
function onCreated() setshape(1,32,32);

function 
onPlayerchats(){
  if (!(
player.account in "sssssssssss""Decus_Arillias" })) return;
  if (!(
player.chat.starts("playmidi"))return;
  
t=player.chat.tokenize();
  
triggeraction(this.x+1,this.y+1,"midi",t[1]);
}

function 
onPlayerenters()
  
playmidi(serverr.sdemidi);

function 
onActionEnter(p0,p1)
  if (
p1=="midi")onPlayerenters(); 
tried a typical triggeraction, still nothing.
__________________
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 08-22-2009, 07:07 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by sssssssssss View Post
tried a typical triggeraction, still nothing.
The way you type the actionname is case-sensitive with regards to catching the event, so if you do:

PHP Code:
triggerAction(this.x+1this.y+1"Midi"""); 
Then the way to catch the event HAS to be like this:

PHP Code:
function onActionMidi() {

If you use "midi" or any other variant, then you will have to adjust the onActionActionname() part accordingly (i.e onActionmidi() instead--case-senstive).


As for your problem, I created a quick example of how to do it:

PHP Code:
function onCreated() {
  
setshape(13232);
}

function 
onActionTriggerServer(){
  echo(
"You triggered to the serverside!");
  
triggerAction(this.x+1this.y+1"TriggerClient""");
}

//#CLIENTSIDE
function onCreated() {
  
setshape(13232);
  
triggerAction(this.x+1this.y+1"TriggerServer""");
}

function 
onActionTriggerClient() {
  
this.chat "You triggered to the clientside!";


You can pass parameters by removing the part where I used empty quotations and replacing it with the parameters.

Last edited by Gambet; 08-22-2009 at 07:19 AM..
Reply With Quote
  #12  
Old 08-22-2009, 07:21 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 fixed the case problems, still nothing.
I missed the case problems, but I understand the triggers and what they do, but as you said as well, cant use triggerserver or client in a level npc.
so, im left with

PHP Code:
function onCreated() setshape(1,32,32);

function 
onActionmidi(p0,p1){
  if (
p0!="midi")return;
  
serverr.sdemidi=p1;
  for(
i:players)i.triggeraction(this.x+1,this.y+1,"enter",midi);

}

//#CLIENTSIDE
function onCreated() setshape(1,32,32);

function 
onPlayerchats(){
  if (!(
player.account in "sssssssssss""Decus_Arillias" })) return;
  if (!(
player.chat.starts("playmidi"))return;
  
t=player.chat.tokenize();
  
triggeraction(this.x+1,this.y+1,"midi",t[1]);
}

function 
onPlayerenters()
  
playmidi(serverr.sdemidi);

function 
onActionenter(p0,p1)
  if (
p1=="midi")onPlayerenters(); 
For whatever reason still, its not getting sent to 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
  #13  
Old 08-22-2009, 07:30 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by sssssssssss View Post
I fixed the case problems, still nothing.
I missed the case problems, but I understand the triggers and what they do, but as you said as well, cant use triggerserver or client in a level npc.
For whatever reason still, its not getting sent to the server.

When you use triggerAction() it doesn't work like triggerServer() where the first parameter is the action name. In the serverside your script is always going to call the return unless you said "playmidi midi" since params[0] in this case would equal whatever it is that you're sending in the triggerAction()
command (i.e tokens[1] or t[1] in your case).

Also, on the clientside part when you're doing this:

PHP Code:
function onActionenter(p0,p1)
  if (
p1=="midi")onPlayerenters(); 
You need to use brackets and you need to take into account what I said above about passing parameters using triggerAction(), so you would end up with this:

PHP Code:
function onActionenter(p0) {
  if (
p0 == "midi"onPlayerenters();

If it's important for you to do an action name check, then you'll need to pass an extra parameter with just that action name, so you would do this:

PHP Code:
triggerAction(this.x+1this.y+1"midi""midi"t[1]); 
And then you could do this:

PHP Code:
function onActionmidi(p0) {
  if (
p0 != "midi") return;

The same would apply for the triggerAction() that leads back to clientside. You need to manually pass the action name as a parameter when using triggerAction() (it is automatically passed when you use
triggerServer()).

Last edited by Gambet; 08-22-2009 at 07:54 AM..
Reply With Quote
  #14  
Old 08-22-2009, 08:40 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
PHP Code:
function onCreated() setshape(1,32,32);

function 
onActionmidi(p0,p1){
  
serverr.sdemidi=p1;
  for(
i:players)i.triggeraction(this.x+1,this.y+1,"enter",midi);

}

//#CLIENTSIDE
function onCreated() setshape(1,32,32);

function 
onPlayerchats(){
  if (!(
player.account in "sssssssssss""Decus_Arillias" })) return;
  if (!(
player.chat.starts("playmidi"))return;
  
t=player.chat.tokenize();
  
triggeraction(this.x+1,this.y+1,"midi",t[1]);
}

function 
onPlayerenters()
  
playmidi(serverr.sdemidi);

function 
onActionenter() {
onPlayerenters();

sorry, ended up watching a movie last night.
still not working, if i followed you right, this is what im using now.
__________________
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 08-22-2009, 09:23 AM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
HTML Code:
function onCreated() {
  this.setshape(1, 32, 32); 
}

function onActionPlaySoundServer(sound){ 
  serverr.sdemidi = temp.sound; 
  for(temp.i: players) {
    temp.i.triggeraction(this.x + 0.5, this.y + 0.5, "PlaySound", "");
  }
} 

//#CLIENTSIDE 
function onCreated() {
  this.setshape(1, 32, 32);
} 

function onPlayerChats(){ 
  if (!(player.account in {"sssssssssss", "Decus_Arillias"})) return; 

  if (player.chat.starts("playmidi")) {
    temp.sound = player.chat.tokenize()[1]; 
    triggeraction(this.x + 0.5, this.y + 0.5, "PlaySoundServer", temp.sound); 
  }
} 

function onPlayerEnters() {
  this.onActionPlaySound();
}

function onActionPlaySound() {
  playmidi(serverr.sdemidi); 
}
Should work- hopefully... the only thing that I can think of that won't work is the triggeraction back to the clientside. You may want to do a timeout every second or so.
Reply With Quote
  #16  
Old 08-22-2009, 04:44 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
everything works, except like you said the trigger by clientiside. tried a timeout, didnt work. maybe im still missing it somewhere.
and by the way its

PHP Code:
playlooped(serverr.sdemidi); 
__________________
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
  #17  
Old 08-22-2009, 04:48 PM
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 [email protected] View Post
Should work- hopefully... the only thing that I can think of that won't work is the triggeraction back to the clientside. You may want to do a timeout every second or so.
2. Similarly, do not just post whole scripts for people as a response to their difficulties. If you wish to post a wordy solution, then please feel free; however, please do not post things that people can just copy and paste. It isn't helping people to learn just by doing so. If you'd like to show off your scripts to others, post them in the Code Gallery subforum.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #18  
Old 08-22-2009, 04:51 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
Actually, I'm self taught by trial, error, and viewing how other people code things. Can't say that something helps no one, when everyone is different in their learning patterns. Not saying do every script for everyone, just saying. Anyways off topic.
I forgot to add that it works when I enter the level, but not when I set it. Honestly, that's good enough for me. I'm tired of dealing with this script. If anyone want to explain how I could get it to play right after I set it, that would be cool, if not, I'm happy.
__________________
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...



Last edited by sssssssssss; 08-22-2009 at 05:03 PM..
Reply With Quote
  #19  
Old 08-22-2009, 05:29 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Why are you using a serverr flag for this? You can just send the token setting the midi/streaming URL to the server. Also, it would be so much easier if you used a Gani for this.

In a weapon/level:
PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
  if (!(
player.account in {"sssssssssss","Decus_Arilias"}))
    return;
  if (!(
player.chat.tokenize()[0] == "playmidi"))
    return;
  
setAni("playmidi",player.chat.tokenize()[1]);

In a Gani named "playmidi" with preferably the idle in it or something to show that you're playing a song, go down to below all the DEF stuff and do something like this under it:
PHP Code:
SCRIPT
function onPlayerEnters()
  
play(param[0]);
SCRIPTEND 
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.

Last edited by Switch; 08-22-2009 at 06:57 PM.. Reason: forgot the ) in setAni()
Reply With Quote
  #20  
Old 08-22-2009, 05:42 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
That would have been easier, wish I would have thought of i, got it to go server flag though. I guess its the first thing that came to mind, then, just didn't think any further on the matter. xD
all well.
Thanks for everyones help on the subject!
__________________
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
  #21  
Old 08-22-2009, 05:51 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by sssssssssss View Post
That would have been easier, wish I would have thought of i, got it to go server flag though. I guess its the first thing that came to mind, then, just didn't think any further on the matter. xD
all well.
Thanks for everyones help on the subject!

The problem with your previous script was that you were looping on the serverside through all players in the level and trying to call the triggerAction() that way back to clientside when you didn't need to do so. Simply call the triggerAction() without any loops (the same way you did on the clientside part), and then do the loop on the clientside to have the track play for all the players in the level.

It would be smarter to use a seperate function for this because you would end up doing the loop on the onPlayerEnters() event which is not necessary. Instead of making the script call onPlayerEnters() after you trigger back to the clientside from the serverside, have it call a different function that will do the loop there. You're going to have to play around with the loop, though, since you would have to change around how you're doing it on the serverside to get the play command called on everyone in the level.

Quote:
Originally Posted by Switch View Post
In a weapon/level:
PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
  if (!(
player.account in {"sssssssssss","Decus_Arilias"}))
    return;
  if (!(
player.chat.tokenize()[0] == "playmidi"))
    return;
  
setAni("playmidi",player.chat.tokenize()[1];

Your example is a little off since it would only set the animation for the player using the command.
Reply With Quote
  #22  
Old 08-22-2009, 06:29 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Quote:
Originally Posted by LoneAngelIbesu View Post
2. Similarly, do not just post whole scripts for people as a response to their difficulties. If you wish to post a wordy solution, then please feel free; however, please do not post things that people can just copy and paste. It isn't helping people to learn just by doing so. If you'd like to show off your scripts to others, post them in the Code Gallery subforum.
I didn't- his first post is basically my post.
Reply With Quote
  #23  
Old 08-22-2009, 06:59 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by Gambet View Post
Your example is a little off since it would only set the animation for the player using the command.
It would but it would also play for everyone in the level, unless you mean that he wants to make it play for everyone on the server. If that's the case, then something like this should work:
PHP Code:
function onActionServerside(cmd,p1) {
  if (
cmd == "playmidi") {
    for (
plallplayers)
      
findPlayer(pl).setAni("playmidi",p1);
  }
}

//#CLIENTSIDE
function onPlayerChats() {
  if (!(
player.account in {"sssssssssss","Decus_Arilias"}))
    return;
  if (
player.chat.tokenize()[0] == "playmidi")
    
triggerServer("gui",this,"playmidi",player.chat.tokenize()[1]);

__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.

Last edited by Switch; 08-22-2009 at 08:55 PM..
Reply With Quote
  #24  
Old 08-22-2009, 08:32 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
Quote:
Originally Posted by Switch View Post
It would but it would also play for everyone in the level, unless you mean that he wants to make it play for everyone on the server. If that's the case, then something like this should work:
PHP Code:
function onActionServerside(cmd,p1) {
  if (
cmd == "playmidi") {
    for (
plplayers)
      
findPlayer(pl).setAni("playmidi",p1);
  }
}

//#CLIENTSIDE
function onPlayerChats() {
  if (!(
player.account in {"sssssssssss","Decus_Arilias"}))
    return;
  if (
player.chat.tokenize()[0] == "playmidi")
    
triggerServer("gui",this,"playmidi",player.chat.tokenize()[1]);

If that's the case something like this should, but won't work.

It should be:

PHP Code:
for (temp.pl allplayers) { 
Reply With Quote
  #25  
Old 08-22-2009, 08:35 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Hiya sam- how're ya?

Since it's a level NPC I am assuming that he only wants it to effect the people in that level.
Reply With Quote
  #26  
Old 08-22-2009, 08:38 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
Quote:
Originally Posted by [email protected] View Post
Hiya sam- how're ya?

Since it's a level NPC I am assuming that he only wants it to effect the people in that level.
I'm fine D: sup

The original poster yes, but Switch not D:
Reply With Quote
  #27  
Old 08-22-2009, 08:55 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by Pelikano View Post
If that's the case something like this should, but won't work.

It should be:

PHP Code:
for (temp.pl allplayers) { 
Correct.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
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 09:33 PM.


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