Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   The terrible twins (clientside and serverside) - PART TWO! (https://forums.graalonline.com/forums/showthread.php?t=53937)

Googi 07-21-2004 09:03 PM

The terrible twins (clientside and serverside) - PART TWO!
 
Having failed to correctly identify which commands are clientside and which ones are serverside, I'm forced to ask if I would be correct in saying...

The following is done serverside:

Defining this.vars.
Defining level.vars (level just being a generic word used instead of "this")
Setting the timeout
"with" statements
The "message" command

And that the following is done clientside:

Setting playerdir.
The "disabledefmovement" and "enabledefmovement" commands.
The "setani" command.
The "showimg", "hideimg", "changeimgvis" and "changeimgcolors" commands.

Rick 07-21-2004 09:07 PM

playerdir should be settable serverside, if it doesn't. I shall smacketh Stefan.

Anything *img* is clientside. setani should be serverside, unless you mean showani (I think that's the command).

timeouts can exist on both sides. Message is also both sides, I believe.

Lance 07-21-2004 09:09 PM

Quote:

Originally Posted by Rick
playerdir should be settable serverside, if it doesn't. I shall smacketh Stefan.

Anything *img* is clientside. setani should be serverside, unless you mean showani (I think that's the command).

timeouts can exist on both sides. Message is also both sides, I believe.

Ganis are clientside. They can be set serverside as well.

Rick 07-21-2004 09:11 PM

Quote:

Originally Posted by Lance
Ganis are clientside. They can be set serverside as well.

Well, I meant serverside as well, poor wording on my part. :)

Crono 07-21-2004 09:25 PM

I thought setplayerprop #c was serverside and message was client?

Xecutor 07-21-2004 10:23 PM

Quote:

Originally Posted by Gerami
I thought setplayerprop #c was serverside and message was client?

They are both client and serversided. Note that they aren't even related.

Rick 07-21-2004 10:34 PM

setplayerprop #c is for player chat.
message is for NPC chat.

protagonist 07-21-2004 11:26 PM

Quote:

Originally Posted by Rick
setplayerprop #c is for player chat.
message is for NPC chat.


Yeah.

The alternate for NPC chat is setcharprop #c. I don't know why you would use it, though.

Nappa 07-22-2004 02:24 AM

I use setcharprop #c, :(. SAY THAT TO MY FACE, SUCKA

Lance 07-22-2004 02:50 AM

Quote:

Originally Posted by protagonist
Yeah.

The alternate for NPC chat is setcharprop #c. I don't know why you would use it, though.

Well, we who are scripters know that when you have a showcharacter NPC, this is the more appropriate way to do so.

protagonist 07-22-2004 03:05 AM

Quote:

Originally Posted by Lance
Well, we who are scripters know that when you have a showcharacter NPC, this is the more appropriate way to do so.

Do I detect a hint of condescending attitude? :\

Lance 07-22-2004 03:20 AM

Quote:

Originally Posted by protagonist
Do I detect a hint of condescending attitude? :\

I do not know what you are talking about. This is the soon-to-be-renamed super happy fun forum, and there are most certainly no condescending attitudes here.

protagonist 07-22-2004 03:21 AM

Quote:

Originally Posted by Lance
I do not know what you are talking about. This is the soon-to-be-renamed super happy fun forum, and there are most certainly no condescending attitudes here.


I am sure you will be banned from it, then. :\

Lance 07-22-2004 03:28 AM

Quote:

Originally Posted by protagonist
I am sure you will be banned from it, then. :\

Sorry, but I moderate it. :]

I do not like these attacks, though. So, please stop.

Nappa 07-22-2004 03:32 AM

I say we banish message for all eternity.

DOWN WITH MESSAGE, UP WITH SETCHARPROP #C!

Lance 07-22-2004 03:33 AM

Quote:

Originally Posted by Nappa
I say we banish message for all eternity.

DOWN WITH MESSAGE, UP WITH SETCHARPROP #C!

But then what will the poor non-showcharacter NPCs do? :(

protagonist 07-22-2004 03:34 AM

Quote:

Originally Posted by Lance
Sorry, but I moderate it. :]

I do not like these attacks, though. So, please stop.

I am not attacking you, I'm asking you why you are behaving so inappropriately to a user when you are a moderator. Especially in your own forum. Explain?

Lance 07-22-2004 03:36 AM

Quote:

Originally Posted by protagonist
I am not attacking you, I'm asking you why you are behaving so inappropriately to a user when you are a moderator. Especially in your own forum. Explain?

Telling me I will be banned is most certainly an attack of some sort.

Waiting on some kind of explanation of how I acted inappropriately. Also, I might advise you that you are now breaking that other rule that says if you have a problem with a moderator you are supposed to PM them.

Nappa 07-22-2004 03:36 AM

Quote:

Originally Posted by Lance
But then what will the poor non-showcharacter NPCs do? :(


They will suffer the wrath of a thousand suns!

THAT IS WHAT THEY SHALL DO

Googi 07-22-2004 04:14 AM

Well, are there any other reasons that a script would work offline but not online besides mistakes with clientside and serverside?

Lance 07-22-2004 04:15 AM

Quote:

Originally Posted by Googi
Well, are there any other reasons that a script would work offline but not online besides mistakes with clientside and serverside?

That would be the primary reason.

Googi 07-22-2004 04:42 AM

There's no clientside/serverside limitations of if () statements, right?

protagonist 07-22-2004 04:43 AM

Quote:

Originally Posted by Lance
Telling me I will be banned is most certainly an attack of some sort.

I was replying to your sarcastic comment with a fitting response.
Quote:

Originally Posted by Lance
Waiting on some kind of explanation of how I acted inappropriately. Also, I might advise you that you are now breaking that other rule that says if you have a problem with a moderator you are supposed to PM them.

I will do so, then.

Rick 07-22-2004 06:11 AM

Quote:

Originally Posted by Googi
There's no clientside/serverside limitations of if () statements, right?

Yep, there is no limitation.

Xecutor 07-22-2004 06:20 AM

Quote:

Originally Posted by Rick
Yep, there is no limitation.

Well actually if you are comparing variables set serverside or clientside then it would be limited.

Googi 07-22-2004 05:28 PM

Quote:

Originally Posted by Xecutor
Well actually if you are comparing variables set serverside or clientside then it would be limited.

Wait, so you're saying that the following script wouldn't work because the variable was set serverside and the command is clientside?

NPC Code:

if (playerchats) {
this.var=2;
}

//#CLIENTSIDE

if (keypressed) {
if (this.var==2) {
showimg 1,img.png,295,380;
changeimgvis 1,4;
}
}


Xecutor 07-22-2004 05:35 PM

That is correct.

Crono 07-22-2004 11:17 PM

Quote:

Originally Posted by Xecutor
They are both client and serversided. Note that they aren't even related.

Woops, i mean the other one..is it setchar #c? Or something like that. I'm not familiar with a lot of things and suck without the comands list next to me :(!

When I tried message it wasnt working right serverside. Dont remember why ;-;

Projectshifter 07-23-2004 06:47 AM

Quote:

Originally Posted by Xecutor
Well actually if you are comparing variables set serverside or clientside then it would be limited.

This was in reference to if () statements.
You can set variables serverside and clientside. You can do most tasks serverside and clientside, but you cannot read a this.var set clientside serverside and vice-versa. Level.vars are serverside only I believe, as is the with() command. Many things that you can do serverside and clientside depend on what action you're performing.
If I want to show a local message, setplayerprop #c,Blah; would work clientside to set the chat of the player. I've found a lot of times doing setplayerprop #c,; clientside does not in fact set it for the other players, so serversided would be better if you're hiding the chat. Just random things you have to figure out.
Most of it is common sense, just figure who has to access it, and does it effect more than that one player? For example, setting preferences for a GUI doesn't need any interaction outside of the clientside, but modifying guilds needs to have interaction with a server/players, therefore would need to be serversided :)
-Projectshifter

Dach 07-23-2004 08:51 AM

Quote:

Originally Posted by Projectshifter
I've found a lot of times doing setplayerprop #c,; clientside does not in fact set it for the other players,

eh? it updates for all players either way... unless you meant setcharprop here


All times are GMT +2. The time now is 01:22 PM.

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