Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   A Few Scripting Questions o.O (https://forums.graalonline.com/forums/showthread.php?t=57330)

Arnack 01-27-2005 12:30 AM

A Few Scripting Questions o.O
 
1. What is /clientside in the script? I read the FAQs, and everything, and don't see what it means.
2. If you are a Scripter for a server, what would be you job? Tell a LAT a script for... Something like what? See I need help, really bad? Can someone help meh?
Arnack

Lance 01-27-2005 12:43 AM

Quote:

Originally Posted by Arnack
1. What is /clientside in the script? I read the FAQs, and everything, and don't see what it means.
2. If you are a Scripter for a server, what would be you job? Tell a LAT a script for... Something like what? See I need help, really bad? Can someone help meh?
Arnack

1) "//#CLIENTSIDE" is a separator. The scripting above is serverside, the scripting below is clientside.

2) A scripter usually authors and repairs scripts as his superiors/other staff direct.

(Also: please don't sign your posts, use a signature for such things.)

Arnack 01-27-2005 12:48 AM

Sry, but I really did'nt get the 1st question, yeah I am slow.

Lance 01-27-2005 12:49 AM

Quote:

Originally Posted by Arnack
Sry, but I really did'nt get the 1st question, yeah I am slow.

Could you be a little more specific? What part didn't you understand?

Arnack 01-27-2005 12:51 AM

That it separates... Umm stuff?

Sildae 01-27-2005 12:53 AM

Quote:

Originally Posted by Arnack
1. What is /clientside in the script? I read the FAQs, and everything, and don't see what it means.

It is a division by "clientside", which looks like a global floating point variable.

Quote:

2. If you are a Scripter for a server, what would be you job?
It would be coordinating a team of lower scripters to create the scripts needed for the playerworld's design.

Quote:

Tell a LAT a script for... Something
Well, sure. But that is not directly related to a staff position.
I also think that you are not a scripter if you speak about "telling a script".

Quote:

like what?
Usually it is stuff like "Can you tell me the script for a custom HP system that features multiple damage types and also guns?".

Quote:

See I need help, really bad?
Oh, yes.

Quote:

Can someone help meh?
Yes, try reading documentation.

Lance 01-27-2005 12:56 AM

Quote:

Originally Posted by Arnack
That it separates... Umm stuff?

Okay, how about this: what do you think the difference between serverside and clientside scripts are? Hint: There's a hint.

Arnack 01-27-2005 01:01 AM

Umm? I don't know? Client side is...umm, your cpu.,and umm, server side is umm... The server?! But why would youseperate it and stuff?

Sildae 01-27-2005 01:05 AM

Quote:

Originally Posted by Arnack
But why would youseperate it and stuff?

Can you think of any reason toseperate it and stuff?

Lance 01-27-2005 01:06 AM

Quote:

Originally Posted by Arnack
Umm? I don't know? Client side is...umm, your cpu.,and umm, server side is umm... The server?! But why would youseperate it and stuff?

Clientside scripts are executed on the client.
Serverside scripts are executed on the server.

As you learn scripting, you will learn which types of scripts are more suited for the client and which are more suited for the server.

Arnack 01-27-2005 01:12 AM

1 last ques. I think. What is the dif? Between those 2? What plans on there scripts?

Skyld 01-27-2005 01:27 AM

Quote:

Originally Posted by Arnack
1 last ques. I think. What is the dif? Between those 2? What plans on there scripts?

The clientside has control over the client and things that the client does.
The serverside has control over players and database npcs.

Slash-P2P 01-27-2005 01:30 AM

Clientside: the player's computer runs the script
Serverside: the gserver runs the script

in addition to that some commands are different and blah blah.

Arnack 01-27-2005 01:32 AM

Can you give meh and ex for both?

Slash-P2P 01-27-2005 01:43 AM

if (created) {
message the server runs this;
}


or


//#CLIENTSIDE
if (created) {
message your computer runs this.;
}

Arnack 01-27-2005 01:46 AM

When you mean to your cpu, it does...? Only just for you, not other people on the server?

Evil_Trunks 01-27-2005 02:04 AM

all players in the level recieve the script and run it clientside when you use //#CLIENTSIDE

Shaun 01-27-2005 04:02 AM

Ha, I have finally learned what //#CLIENTSIDE actually does just now. I used to think that since there is // infront, it was just some sort of comments. Why would there be comment bars for part of the script ran? That doesn't seem right.

Just about a month ago I noticed scripts don't work, most of the time, unless they have //#CLIENTSIDE, so I stuck that in all the scripts from then on. Now I see that it actually means something specific. Still think it shouldn't look like a comment though.

Evil_Trunks 01-27-2005 04:30 AM

I always figured it was done that way for compatibility with the built in NPC editor.

it doesn't belong in ALL scripts, just certain things require it

the NPC server's job is to handle scripts, things are often done better serverside
when you use clientside the client has to compile and execute the script itself, causing more network data being sent

Lance 01-27-2005 04:59 AM

Quote:

Originally Posted by Shaun
Ha, I have finally learned what //#CLIENTSIDE actually does just now. I used to think that since there is // infront, it was just some sort of comments. Why would there be comment bars for part of the script ran? That doesn't seem right.

Just about a month ago I noticed scripts don't work, most of the time, unless they have //#CLIENTSIDE, so I stuck that in all the scripts from then on. Now I see that it actually means something specific. Still think it shouldn't look like a comment though.

-----

#!/usr/bin/perl
#
#Script goes here

------

#include
#define

-----

etc

There are plenty of valid reasons for things to 'look like a comment.'

Kaimetsu 01-27-2005 01:18 PM

Quote:

Originally Posted by Shaun
Why would there be comment bars for part of the script ran?

Because it is not part of the script. It is not executed.

Crono 01-27-2005 01:25 PM

I used to think there was such thing as //#SERVERSIDE and if you didnt put it then your scripts would break XD

HoudiniMan 01-27-2005 02:04 PM

Quote:

Originally Posted by Sildae
It is a division by "clientside", which looks like a global floating point variable.

*Alarm* Unqualified support attempt detected *Alarm*

He was talking about //#CLIENTSIDE obviously, if you didn't know then i would think twice about helping others... If you did and you were saying that just to spite him, that's not wanted either.

For Arnack:

Generally clientside scripts are for displaying things like Inventories (Q menus), GUIs like health meters and clocks, and controls player movement. Serverside scripts are for things like changing gralats, setting player parameters, and warping. Many things that require serverside simply won't work clientside. Good luck becoming more familiar with serverside scripting :) It opens a whole new world compared to just clientside, offline scripting.

Sildae 01-27-2005 02:38 PM

Quote:

Originally Posted by Lance
#include
#define

# are not comments. Comments are /* */ and optionally //.

Sildae 01-27-2005 02:46 PM

Quote:

Originally Posted by HoudiniMan
*Alarm* Unqualified support attempt detected *Alarm*

*Alarm* More qualified than you. By far. *Alarm*
See how the asterisks make my post 40% more convincing.

Quote:

He was talking about //#CLIENTSIDE obviously
He was appropriately informed of what //#CLIENTSIDE does. Where is your problem?

Quote:

if you didn't know then i would think twice about helping others...
I knew. If you did not know that you should think twice about responding to my post.

Quote:

If you did and you were saying that just to spite him, that's not wanted either.
I do not think that you have any influence on what is wanted. Your flames are unneeded at least as much as my post.

Quote:

For Arnack:
Stop talking to Arnack in a post that is a reply to my post. wtf.

Also you need to be stabbed for your "advice".

Alexander 01-27-2005 04:55 PM

Quote:

Originally Posted by Sildae
# are not comments. Comments are /* */ and optionally //.

In Perl, # is used for inline comments.

Shaun 01-27-2005 05:13 PM

I thought Gscript was copying C and C++.

In C, C++, #define is used, but # is also not a comment.

Kaimetsu, it still has an impact on how the script works. You at least agree it is not just a comment?

Kaimetsu 01-27-2005 05:19 PM

Quote:

Originally Posted by Shaun
Kaimetsu, it still has an impact on how the script works. You at least agree it is not just a comment?

It's more accurate to think of it as two separate scripts. The //#CLIENTSIDE directive is not part of either, nor does it affect how they operate. It simply tells the server how to divide the code.

Lance 01-27-2005 09:09 PM

Quote:

Originally Posted by Sildae
# are not comments. Comments are /* */ and optionally //.

I was not talking about graal scripting there.

Shaun 01-28-2005 02:32 AM

Quote:

Originally Posted by Kaimetsu
It's more accurate to think of it as two separate scripts. The //#CLIENTSIDE directive is not part of either, nor does it affect how they operate. It simply tells the server how to divide the code.

Do you agree //#CLIENTSIDE has some overall effect on how the script (or scripts) are ran, that without //#CLIENTSIDE, things may be different?

Evil_Trunks 01-28-2005 02:53 AM

obviously they would be different

without //#CLIENTSIDE they wouldn't be clientside....

it's hard to explain it..... x.x

Arnack 01-28-2005 03:26 AM

What is a good moderate scripter scripting guide?

Kaimetsu 01-28-2005 01:17 PM

Quote:

Originally Posted by Shaun
Do you agree //#CLIENTSIDE has some overall effect on how the script (or scripts) are ran

Only indirectly.

Look: Directives are not commands. Comments are as good a medium for expressing them as any other.

Sildae 01-28-2005 02:27 PM

Quote:

Originally Posted by Lance
I was not talking about graal scripting there.

Neither was I.

Shaun 01-28-2005 06:22 PM

Quote:

Originally Posted by Kaimetsu
Only indirectly.

Look: Directives are not commands. Comments are as good a medium for expressing them as any other.

Would you agree that // are no longer just comments, if they can have any effect (direct or indirect) on how any script is ran?

Kaimetsu 01-28-2005 06:26 PM

Quote:

Originally Posted by Shaun
Would you agree that // are no longer just comments, if they can have any effect (direct or indirect) on how any script is ran?

Clearly I would not. As far as GScript is concerned, they are just comments.

Arnack 02-27-2005 10:16 PM

G-Script2? Where can I find how to do it?

Polo 02-28-2005 12:45 AM

http://ilfirin.org/graal/GScript2

Thats the best resource I know of.

Zero Hour 02-28-2005 08:08 AM

I don't mean to poke my nose in, I normally don't.

Why is the "//" part used, anyways? Does the server check the script for "//#CLIENTSIDE" then send the part below to the client?
Why isn't it something like "#Clientside" or some other means of breaking it without it having the appearance of a comment?

I guess those are my only two questions. (I understand clientside, and serverside... so you don't need to explain)
[EDIT]
Quote:

Originally Posted by Polo
http://ilfirin.org/graal/GScript2
Thats the best resource I know of.

That's very comprehensive
[/EDIT]

Dach 02-28-2005 11:12 PM

Quote:

Originally Posted by Zero Hour
I don't mean to poke my nose in, I normally don't.

Why is the "//" part used, anyways?

probably easier to make it a comment for the regular scripting engine and have something else examine for serverside/clientside parts, or was rather since we have a new engine that doesn't entirely work any bit at all the same


All times are GMT +2. The time now is 07:55 PM.

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