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)

falco10291029 11-09-2004 11:57 PM

I wished that would have crashed when i was allowed on G3d, i REALLY wanted to go play with the dragons :)

Hmm that example makes gscript 2 look better. Seems as if for certain things converting to it won't be too hard. Im geussing the for (pl: allplayers) means that it is defining pl as allplayers and will be looking at everyone's values for that.

Slash-P2P 11-10-2004 12:50 AM

Quote:

Originally Posted by Stefan
A simplier example:
NPC Code:

for (pl: allplayers) {
if (!(pl.x in |577,1008| && pl.y in |-200,320|)) {
pl.x = 768 + random(-5,5);
pl.y = 44 + random(-5,5);
pl.sendrpgmessage("Sorry you cannot walk out of this yet.");
}
}


I understand it ^^

Benm00t 11-10-2004 01:29 AM

Quote:

Originally Posted by Slash-P2P
I understand it ^^

So do i, and Gscript1 just went right over my head.

<3 for GScript2. Like Kai said before, if you've ever used a language like C then you should be right at home with GScript2. :-D

Slash-P2P 11-10-2004 01:59 AM

Quote:

Originally Posted by Benm00t
So do i, and Gscript1 just went right over my head.

<3 for GScript2. Like Kai said before, if you've ever used a language like C then you should be right at home with GScript2. :-D

I've been using gscript1 since I first started playing Graal back in like 99 or so..

LogicBot 11-10-2004 02:04 AM

Quote:

Originally Posted by Slash-P2P
I've been using gscript1 since I first started playing Graal back in like 99 or so..

"I started playing Graal in 1982, but then we called it 'Zelda Offline' in those days.."

:rolleyes:

And the simpler one looks more complicated. I hate it when you have to put it in: "&&.{#, script enabled}+!!@#.. @!}" or at least thats how it looks to me. I'll get used to it. >_<

Loriel 11-10-2004 02:21 AM

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);
}


Ruby (hackish):
NPC Code:

def compile_script
script = "function onCreated() {\n"\
" #{@containers.map{|con| control_creation_script(con, 0)}.join("\n ")}\n"\
"}"
File.open('weapon.txt', 'w') {|f| f.puts script }
ScriptEditor.open_script_window(script)
end


Andares 11-10-2004 03:28 AM

Quote:

Originally Posted by Loriel
Ruby (hackish):
NPC Code:

def compile_script
script = "function onCreated() {\n"\
" #{@containers.map{|con| control_creation_script(con, 0)}.join("\n ")}\n"\
"}"
File.open('weapon.txt', 'w') {|f| f.puts script }
ScriptEditor.open_script_window(script)
end


I'm a ruby nuby, please explain it :O.
Btw, I'd love -c on #gscript, pls.

Ajira 11-10-2004 03:49 AM

Is there an 'estimated' date for the release of a solid v3/GScript2?

Slash-P2P 11-10-2004 04:50 AM

Quote:

Originally Posted by Ajira
Is there an 'estimated' date for the release of a solid v3/GScript2?

This is Graal Online...so...nope ^^

falco10291029 11-10-2004 05:21 AM

Quote:

Originally Posted by SlashP2P
This is Graal Online...so...nope

Exactly, and if they did say one....well let's just all look at G3D lol

Slash-P2P 11-10-2004 06:27 AM

Quote:

Originally Posted by falco10291029
Exactly, and if they did say one....well let's just all look at G3D lol

There was supposed to be a preview in first quarter 2003 haha.

falco10291029 11-10-2004 10:33 PM

Quote:

There was supposed to be a preview in first quarter 2003 haha.
My sentiments exactly.

Loriel 11-10-2004 11:32 PM

Quote:

Originally Posted by Andares
I'm a ruby nuby, please explain it :O.
Btw, I'd love -c on #gscript, pls.

Query me on freenode ;)

zokemon 11-13-2004 06:38 AM

It looks simple to me o.o
Although I did learn Torque Engine script in 2 hours just from looking at the sample files...

Kaimetsu 11-13-2004 01:50 PM

Quote:

Originally Posted by zokemon
Although I did learn Torque Engine script in 2 hours just from looking at the sample files...

I am completely and unsarcastically certain that this is true!

Crono 11-13-2004 02:15 PM

Stefan that warping script for graal 3d looks simple. Even I understand it.

zokemon 11-13-2004 08:53 PM

Quote:

Originally Posted by Kaimetsu
I am completely and unsarcastically certain that this is true!

Ehh...?

falco10291029 11-15-2004 02:46 AM

hey, question. WIll you be able to use Gscript 1 and 2 in the exact same script, like:
NPC Code:

if (playerenters) {
for (q: players//not sure if this is usable, just trying to use a gs2 command) {

if (q.x>30) setplayerprop#c, HOLY CRAP! I have been seen with my x above 30 with a combined script that uses GS1 and 2!;

}


}


Kaimetsu 11-15-2004 03:47 AM

Quote:

Originally Posted by falco10291029
WIll you be able to use Gscript 1 and 2 in the exact same script

This has already been answered in the thread. Recap: Yes, but don't.

falco10291029 11-15-2004 03:59 AM

Oh, geuss i misunderstood that part

MysticalDragon 11-18-2004 05:10 PM

it should be released soon :( ,expecially for the ones that want everything to be done in Gscript2 like Element.

Ajira 11-18-2004 09:37 PM

Quote:

Originally Posted by MysticalDragon
it should be released soon :( ,expecially for the ones that want everything to be done in Gscript2 like Element.

Hope you're right...

falco10291029 11-18-2004 09:39 PM

I'll most likely use mainly Gscript1 but adding in things from gscript2 that make the script more efficient.

Slash-P2P 11-18-2004 10:27 PM

I'll probably redo Element in GS2.

zokemon 11-19-2004 12:22 AM

Quote:

Originally Posted by MysticalDragon
it should be released soon :( ,expecially for the ones that want everything to be done in Gscript2 like Element.

Quote:

Originally Posted by Slash-P2P
I'll probably redo Element in GS2.

;)

Admins 11-19-2004 12:40 PM

We are currently testing the new scripting engine and new mudlib with Graal Kingdoms (on hidden server "Scriper Server"). Those are the incompatibilities which I have seen yet:

- this.timeout, this.x, this.y etc. are mapped to timeout,x,y in the new engine, while in the old engine they are normal variables; this is not simple to fix, so it would be better if the scripts are fixed, the npcserver could eventually give a warning if such variables are found when compiling the script

- if (x,y in |0,64|) doesn't work because the comma makes problems; it would be better to write if (x in |0,64| && y in |0,64|)

- function SetAni() { setani sword,; } doesn't work, because "setani sword,;" is internally converted to "setani("sword","")" and function names are case-insensitive, so it would either cause an "endless" loop (if it is allowed to overwrite default functions, like it is currently), or calls to SetAni() wouldn't work because it would call the default function (if overwriting of default functions is not allowed); in the old engine it was not a problem because functions and commands were handled differently

zokemon 11-19-2004 07:08 PM

Sounds much better handled then Gscript1 :)

Slash-P2P 11-20-2004 12:15 AM

Quote:

Originally Posted by Stefan
We are currently testing the new scripting engine and new mudlib with Graal Kingdoms (on hidden server "Scriper Server").

Release the old mudlib for Graal Kingdoms :cool:

zokemon 11-20-2004 02:47 AM

Quote:

Originally Posted by Slash-P2P
Release the old mudlib for Graal Kingdoms :cool:

Give me money :cool:


All times are GMT +2. The time now is 04:38 AM.

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