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 10-10-2007, 01:54 AM
TalonShriner TalonShriner is offline
Levelsmith
TalonShriner's Avatar
Join Date: Feb 2006
Posts: 138
TalonShriner is on a distinguished road
Send a message via AIM to TalonShriner
Clientr.PROBLEM

I'm trying to figure out how to script it so that when a player logs on for the first time on my server (or thier account is reset) their clientr script flag will be: clientr.mud_nation= Neutral

I am a newb scripter and have no idea how to do this, so please be as specific as possible. ^_^ Thanks
__________________
Shall our paths cross on the road to where ever us humans are racing to, and lets walk instead.
Reply With Quote
  #2  
Old 10-10-2007, 03:18 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
PHP Code:
function onActionPlayerOnline() {
  if (!
clientr.mud_nation) {
    
clientr.mud_nation "neutral";
  }

__________________
Reply With Quote
  #3  
Old 10-10-2007, 03:24 AM
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
PHP Code:
function onActionServerSide() {
  
with (findplayer(params[0])) {
    
clientr.mud_nation "Neutral";
  }
}
//#CLIENTSIDE
function onPlayerEnters() {
  if (
clientr.mud_nation == NULL) {
    
triggerserver("gui",this.name,player.account);
  }

Add this into your main-system. This, when you log on, check if you "clientr.mud_nation" is null (has nothing in it). If it comes out true, then it triggers the server-side which will turn your "clientr.mud_nation" to "Neutral". If it comes false, you go about normally.
If that doesn't work then I think it's because of "function onPlayerEnters()" but I believe it should work.
__________________
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
  #4  
Old 10-10-2007, 03:26 AM
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 Googi View Post
PHP Code:
function onActionPlayerOnline() {
  if (!
clientr.mud_nation) {
    
clientr.mud_nation "neutral";
  }

1) he wants it as "Neutral".

2) Talon, if you want to use that, you'd need to add it into your NPC-Control.
__________________
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
  #5  
Old 10-10-2007, 03:38 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Uhm...if your NPC server doesn't have an onActionPlayerOnline() function already, all you need to do is
PHP Code:
function onActionPlayerOnline() {
  if (
clientr.mud_nation == NULL)
    
clientr.mud_nation "Nuetral";

Generally most servers have a lot of actions that go into that function in the NPC server.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #6  
Old 10-10-2007, 04:19 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
We can't use !clientr.var as a condition?
__________________
Reply With Quote
  #7  
Old 10-10-2007, 04:27 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
Quote:
Originally Posted by Googi View Post
We can't use !clientr.var as a condition?
Yes, we can.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #8  
Old 10-10-2007, 05:14 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Need me to log on and help ya?
__________________
Deep into the Darkness peering...
Reply With Quote
  #9  
Old 10-10-2007, 05:45 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by Googi View Post
We can't use !clientr.var as a condition?
You can, but some scripters (including myself) like to use 'clientr.blah == null' when dealing with strings and '!clientr.blah' when dealing with booleans.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.

Last edited by napo_p2p; 10-10-2007 at 07:21 AM..
Reply With Quote
  #10  
Old 10-10-2007, 06:44 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
I thought clientr.mud_<varname> was reserved?
__________________
Reply With Quote
  #11  
Old 10-10-2007, 07:18 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Quote:
Originally Posted by Inverness View Post
I thought clientr.mud_<varname> was reserved?
no
__________________
Deep into the Darkness peering...
Reply With Quote
  #12  
Old 10-10-2007, 07:32 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by Switch View Post
PHP Code:
function onActionServerSide() {
  
with (findplayer(params[0])) {
    
clientr.mud_nation "Neutral";
  }
}
//#CLIENTSIDE
function onPlayerEnters() {
  if (
clientr.mud_nation == NULL) {
    
triggerserver("gui",this.name,player.account);
  }

Although your method works perfectly fine, that way isn't the best way to go about doing this.

There are a few problems I see right off the bat:
1) For this sort of situation, it is better to use the Control-NPC.
2) That way you have it set up isn't totally secure. (People could potentially reset the nation of other players). You do not need to pass player.account and have it find the player again serverside.
3) You only have to check for the condition when the weapon is created, and not every time a player enters a level.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #13  
Old 10-10-2007, 10:18 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
You don't have to put it in the Control-NPC (You can use onPlayerLogin from any WNPC) but if you use WNPCs, just know that the player doesn't have to have the npc for the function to be called. It's very annoying when there something being done to the player when he logs in and you can't find the reason in the control-npc.
__________________
Do it with a DON!
Reply With Quote
  #14  
Old 10-10-2007, 11:40 AM
Zanzel Zanzel is offline
<insert title here>
Zanzel's Avatar
Join Date: Dec 2006
Posts: 35
Zanzel is on a distinguished road
I'd take what zero said an leave.
__________________
  • N-Pulse / N-Pulse Reborn Scripter
  • Graal Kingdoms Player
  • N-Pulse Player
Reply With Quote
  #15  
Old 10-10-2007, 03:27 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by zokemon View Post
You don't have to put it in the Control-NPC (You can use onPlayerLogin from any WNPC) but if you use WNPCs, just know that the player doesn't have to have the npc for the function to be called. It's very annoying when there something being done to the player when he logs in and you can't find the reason in the control-npc.
My Main MUD control works that way. The player doesn't have it, but it still does stuff to the player. ;o
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #16  
Old 10-10-2007, 06:31 PM
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
Quote:
Originally Posted by zokemon View Post
You don't have to put it in the Control-NPC (You can use onPlayerLogin from any WNPC) but if you use WNPCs, just know that the player doesn't have to have the npc for the function to be called. It's very annoying when there something being done to the player when he logs in and you can't find the reason in the control-npc.
I've seen cases where onPlayerLogin and onPlayerLogout fail to trigger - especially on heavy populated servers. It's better to use onActionPlayerOnline in the Control-NPC.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #17  
Old 10-10-2007, 08:57 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
HTML Code:
(clientr.mud_nation == null? "Neutral":clientr.mud_nation);
__________________
Reply With Quote
  #18  
Old 10-10-2007, 11:20 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Quote:
Originally Posted by xAndrewx View Post
HTML Code:
(clientr.mud_nation == null? "Neutral":clientr.mud_nation);
Explain to me how all the operators work in this please.
__________________
Deep into the Darkness peering...
Reply With Quote
  #19  
Old 10-10-2007, 11:29 PM
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
PHP Code:
clientr.mud_nation = (clientr.mud_nation == null"Neutral":clientr.mud_nation); 
Is the same like doing:

PHP Code:
if (clientr.mud_nation == nullclientr.mud_nation "Neutral";
else 
clientr.mud_nation clientr.mud_nation
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #20  
Old 10-10-2007, 11:31 PM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by Angel_Light View Post
Explain to me how all the operators work in this please.
Consider
PHP Code:
something = (b) ? 
If the condition before the ? is true, then 'a' is assigned to 'something', otherwise 'b' is assigned.

So in this case, xAndrewx's expression is pretty much the equivalent to:
PHP Code:
if (clientr.mud_nation == null) {
  
clientr.mud_nation "Neutral";
}
else {
  
clientr.mud_nation clientr.mud_nation;

(You can see that this isn't the best situation to use a ternary operation because there is no need to set clientr.mud_nation to itself).

EDIT: Ziro beat me to it, but hopefully now you get the point :P.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #21  
Old 10-10-2007, 11:33 PM
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
Quote:
Originally Posted by napo_p2p View Post
Consider
PHP Code:
something = (b) ? 
If the condition before the ? is true, then 'a' is assigned to 'something', otherwise 'b' is assigned.

So in this case, xAndrewx's expression is pretty much the equivalent to:
PHP Code:
if (clientr.mud_nation == null) {
  
clientr.mud_nation "Neutral";
}
else {
  
clientr.mud_nation clientr.mud_nation;

(You can see that this isn't the best situation to use a ternary operation because there is no need to set clientr.mud_nation to itself).

EDIT: Ziro beat me to it, but hopefully now you get the point :P.
Bah, way to steal points from me by explaining everything.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #22  
Old 10-10-2007, 11:46 PM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by xXziroXx View Post
Bah, way to steal points from me by explaining everything.
*Gives Ziro back his points*

Seriously though, when I pushed reply your post appeared. I wouldn't have replied if I knew you had already .
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #23  
Old 10-11-2007, 12:01 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
Quote:
Originally Posted by napo_p2p View Post
*Gives Ziro back his points*

Seriously though, when I pushed reply your post appeared. I wouldn't have replied if I knew you had already .
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #24  
Old 10-11-2007, 12: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
it's an operator. beats an if statement for the same result.
__________________
Reply With Quote
  #25  
Old 10-11-2007, 12:43 AM
TalonShriner TalonShriner is offline
Levelsmith
TalonShriner's Avatar
Join Date: Feb 2006
Posts: 138
TalonShriner is on a distinguished road
Send a message via AIM to TalonShriner
I tried to put in that script that coreys suggested:
PHP Code:
function onActionPlayerOnline() {
  if (
clientr.mud_nation == NULL)
    
clientr.mud_nation "Nuetral";

But my NPC server already had the ActionPlayerOnline function and a bunch of other scripts under it. So what I did was take out the "function onActionPlayerOnline() {" part from coreys code and stuck in the rest, but I couldn't get it to work. Any suggestions?
__________________
Shall our paths cross on the road to where ever us humans are racing to, and lets walk instead.
Reply With Quote
  #26  
Old 10-11-2007, 01:32 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
Quote:
Originally Posted by TalonShriner View Post
I tried to put in that script that coreys suggested:
PHP Code:
function onActionPlayerOnline() {
  if (
clientr.mud_nation == NULL)
    
clientr.mud_nation "Nuetral";

But my NPC server already had the ActionPlayerOnline function and a bunch of other scripts under it. So what I did was take out the "function onActionPlayerOnline() {" part from coreys code and stuck in the rest, but I couldn't get it to work. Any suggestions?
Add this some where in your onActionPlayerOnline() function (prefferably at the bottom, since there's a chance you have a script in it that removes/loads your clients strings.. or.. something..):

PHP Code:
 if (clientr.mud_nation == NULLclientr.mud_nation "Neutral"
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #27  
Old 10-11-2007, 03:09 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
A more simple way to put it:

foo = bool ? a : b;

If bool is true, foo would be assigned a.
If bool is false, foo would be assigned b.

You just then put a condition statement in place of the bool such as:

foo = (a < b) ? a : b;

Because condition statements are bools
__________________
Do it with a DON!
Reply With Quote
  #28  
Old 10-11-2007, 06:05 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 zokemon View Post
Because condition statements are bools
Because conditional statements produce resulting bools.
__________________
Skyld
Reply With Quote
  #29  
Old 10-11-2007, 09:40 PM
TalonShriner TalonShriner is offline
Levelsmith
TalonShriner's Avatar
Join Date: Feb 2006
Posts: 138
TalonShriner is on a distinguished road
Send a message via AIM to TalonShriner
Thanks everyone. I got it to work ^_^

Now I have a new problem, but its doesn't have to do with the clientr. flags or w/e. I'm trying to script something so that when this weapons is added to someone, it will also add a bunch of other weapons to the player. For instance, if I add the weapon "-StaffPackage" to the account "Wookieman", then it will also add the weapons "-Jump", "-Staffcontrol" and "Staff/Adder" to "Wookieman". Can anyone help me out here?
__________________
Shall our paths cross on the road to where ever us humans are racing to, and lets walk instead.
Reply With Quote
  #30  
Old 10-11-2007, 09:54 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
PHP Code:
function onCreated()
{

  
this.weapons = { "weapons1""weapons2", ...};

  for ( 
0this.weapons.size(); i++) {
    
findPlayerplayer.account).addWeaponthis.weaponsi]);
  }

__________________
Deep into the Darkness peering...
Reply With Quote
  #31  
Old 10-11-2007, 09:56 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 Angel_Light View Post
PHP Code:
function onCreated()
{

  
this.weapons = { "weapons1""weapons2", ...};

  for ( 
0this.weapons.size(); i++) {
    
findPlayerplayer.account).addWeaponthis.weaponsi]);
  }

What the hell? findPlayer(player.account)?!
PHP Code:
function onCreated()
{
  
temp.weapons = {"foo""bar""baz"};

  for (
temp.weapontemp.weapons)
  {
    
player.addweapon(temp.weapon);
  }

__________________
Skyld
Reply With Quote
  #32  
Old 10-11-2007, 10:13 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
better yet
HTML Code:
function onCreated() {
  if (player.account in serveroptions.staff.tokenize()) {
    for (temp.i: {"food", "*** bars", "bazle"}) {
      player.addWeapon(temp.i);
    }
  } else {
    sendtorc("Staff abuse:" SPC player.account @ "!");
    player.removeWeapon(this.name);
  }
}
odam
__________________
Reply With Quote
  #33  
Old 10-11-2007, 10:22 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Since when can you use player in onCreated serverside (outside a with block)? Come on guys...
__________________
Do it with a DON!
Reply With Quote
  #34  
Old 10-11-2007, 10:23 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 zokemon View Post
Since when can you use player in onCreated serverside (outside a with block)? Come on guys...
what? re-phrase
__________________
Reply With Quote
  #35  
Old 10-11-2007, 10:46 PM
TalonShriner TalonShriner is offline
Levelsmith
TalonShriner's Avatar
Join Date: Feb 2006
Posts: 138
TalonShriner is on a distinguished road
Send a message via AIM to TalonShriner
Remember now, I am stupid at scripts so if you could tell me exactly where to write the weapon names and where to put the script. Please try to be as specific as possible. Thanks ^_^
__________________
Shall our paths cross on the road to where ever us humans are racing to, and lets walk instead.
Reply With Quote
  #36  
Old 10-11-2007, 11:14 PM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by xAndrewx View Post
what? re-phrase
Players do not call onCreated() when it is serverside (so you will not be able to use player.).
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #37  
Old 10-11-2007, 11:29 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 zokemon View Post
Since when can you use player in onCreated serverside (outside a with block)? Come on guys...
What?

With weapon scripts and Database NPCs, the serverside onCreated() is called on NPC-Server startup or script update.
With player classes, the serverside onCreated() is called when the player logs on (although presumably it is more when the class is joined to the player or something).
__________________
Skyld
Reply With Quote
  #38  
Old 10-12-2007, 11:00 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Skyld View Post
What?

With weapon scripts and Database NPCs, the serverside onCreated() is called on NPC-Server startup or script update.
With player classes, the serverside onCreated() is called when the player logs on (although presumably it is more when the class is joined to the player or something).
True but I really doubt that script was for a player joined class.
__________________
Do it with a DON!
Reply With Quote
  #39  
Old 10-12-2007, 06:19 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
I use onCreated() serverside and have yet to experience a major problem. o.O
__________________
Deep into the Darkness peering...
Reply With Quote
  #40  
Old 10-13-2007, 02:33 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Angel_Light View Post
I use onCreated() serverside and have yet to experience a major problem. o.O
In a WNPC put this serverside:

PHP Code:
function onCreated() {
  echo(
player.account);

That's what I was talking about.
__________________
Do it with a DON!
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:49 PM.


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