Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   GScript <-> GScript2 (https://forums.graalonline.com/forums/showthread.php?t=55859)

Slash-P2P 10-30-2004 07:54 PM

I admit I'll try to learn GS2 but I don't know exactly what could make GS2 so much greater than GS1. I've barely heard anything about GS2 or seen any code examples.

falco10291029 10-30-2004 09:08 PM

same here

Kaimetsu 10-30-2004 09:41 PM

Quote:

Originally Posted by Slash-P2P
I admit I'll try to learn GS2 but I don't know exactly what could make GS2 so much greater than GS1

Have you ever programmed in such languages as C?

Slash-P2P 10-30-2004 09:56 PM

Quote:

Originally Posted by Kaimetsu
Have you ever programmed in such languages as C?

No. I've used a little bit of Visual Basic but thats it.

falco10291029 10-31-2004 12:59 AM

I know a little bit of basic, and i know the basic format of C, but that's it

Kaimetsu 10-31-2004 11:59 AM

Quote:

Originally Posted by Slash-P2P
No

Then I cannot blame you for being unable to see the possibilities. But do not assume that they don't exist.

Slash-P2P 10-31-2004 04:41 PM

Quote:

Originally Posted by Kaimetsu
Then I cannot blame you for being unable to see the possibilities. But do not assume that they don't exist.

I said I don't know what can make it so much better. I'm not doubting these ways exist.

Dach 11-05-2004 09:23 PM

Quote:

Originally Posted by Kaimetsu
Because nobody should be mixing GS1 with GS2. I would prefer to see a system where the language used is specified in some kind of directive at the top (like '//#GS1' or so).

Oh, I see what you're getting at now. That'll definitely become something of a problem.

Quote:

Originally Posted by Stefan
As long as your server wants to support Graal v2, you will need to keep the client-side scripts in old scripting though.

Are you saying client-side won't support GS2?

Quote:

Originally Posted by Slash-P2P
I admit I'll try to learn GS2 but I don't know exactly what could make GS2 so much greater than GS1. I've barely heard anything about GS2 or seen any code examples.

From what I've seen you shouldn't have much trouble moving from GS1 to GS2.

Kaimetsu 11-05-2004 09:36 PM

Quote:

Originally Posted by Dach
Are you saying client-side won't support GS2?

v3.1 and upwards will support GS2, but not v2. I'm assuming Stefan will allow use of the earlier versions for a while after the new generation is released.

Slash-P2P 11-07-2004 10:48 AM

Does anyone have any real code examples or GS2?
All I've seen is something like:
player.chat="hello" or something

Admins 11-07-2004 03:25 PM

NPC Code:

function compileScript() {
script = "";
script.add("function onCreated() {");

for (con: this.containers)
addControlCreationScript(script.link(),con,0);

script.add("}");
script.savelines("weapon.txt",0);

ScriptEditor.openScriptWindow(script);
}


Here an example of writing into a file (savelines), the new for-each operator, calling functions with parameters (addControlCreationScript), and calling public functions of other scripts/objects (ScriptEditor.openScriptWindow).
You can do similar things with addstring script,... instead of script.add, passing parameters by setting this. variables, and doing callnpc, but with the new script it's more simple (e.g. the functions of other objects can return values).

xAndrewx 11-07-2004 04:10 PM

Quote:

Originally Posted by Stefan
NPC Code:

function compileScript() {
script = "";
script.add("function onCreated() {");

for (con: this.containers)
addControlCreationScript(script.link(),con,0);

script.add("}");
script.savelines("weapon.txt",0);

ScriptEditor.openScriptWindow(script);
}


Here an example of writing into a file (savelines), the new for-each operator, calling functions with parameters (addControlCreationScript), and calling public functions of other scripts/objects (ScriptEditor.openScriptWindow).
You can do similar things with addstring script,... instead of script.add, passing parameters by setting this. variables, and doing callnpc, but with the new script it's more simple (e.g. the functions of other objects can return values).

Holy, thats new graal script? :O

Slash-P2P 11-07-2004 08:23 PM

Quote:

Originally Posted by Stefan
NPC Code:

the most confusing thing i've ever seen


Here an example of writing into a file (savelines), the new for-each operator, calling functions with parameters (addControlCreationScript), and calling public functions of other scripts/objects (ScriptEditor.openScriptWindow).
You can do similar things with addstring script,... instead of script.add, passing parameters by setting this. variables, and doing callnpc, but with the new script it's more simple (e.g. the functions of other objects can return values).

That's supposed to be simple?

falco10291029 11-08-2004 02:31 AM

Quote:

Originally Posted by SlashP2P
That's supposed to be simple?

I agree with slash wholeheartedly, that looks very advanced, or maybe you didn't explain it correctly, either way, it won't be easy to change over to Gscript2 :-/

Dach 11-08-2004 09:41 PM

Quote:

Originally Posted by falco10291029
I agree with slash wholeheartedly, that looks very advanced, or maybe you didn't explain it correctly, either way, it won't be easy to change over to Gscript2 :-/

That would be an example of are more complex operation.

It really wasn't that hard to follow anyway, granted you have some programming knowledge.

He created a weapon file, put "function OnCreated() {" in there, used that cool for-each thing to most likely put some code in there, then added a "}", then saved the file and called the script editor to open the window.
and I just made a crappy run-on sentence of me babbling


All times are GMT +2. The time now is 10:40 PM.

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