Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   commands.rtf (https://forums.graalonline.com/forums/showthread.php?t=25639)

Andor_RC9 03-14-2002 04:47 AM

commands.rtf
 
When will commands.rtf be updated with the new
script functions such as "in" and that new one i dont get
a : b ? c (something like that) ????


:confused: :confused: :confused: :confused: :confused: :confused:

nyghtGT 03-14-2002 07:25 AM

Re: commands.rtf
 
Quote:

Originally posted by Andor_RC9
When will commands.rtf be updated with the new
script functions such as "in" and that new one i dont get
a : b ? c (something like that) ????


:confused: :confused: :confused: :confused: :confused: :confused:

'in' has been around a while:
NPC Code:

NPC Code:

if (created) {
this.check={3,4,5,6,7,8};
timeout=1;
}
if (timeout) {
for (i=0;i<10;i++) {
if (playerx in |this.check[i]|) {
message In Area;
} else {
message Out of Area;
}
}
timeout=1;
}




i'm just guessing, but that may work ...

neomaximus2k 03-14-2002 03:45 PM

Re: commands.rtf
 
Quote:

Originally posted by Andor_RC9
When will commands.rtf be updated with the new
script functions such as "in" and that new one i dont get
a : b ? c (something like that) ????


:confused: :confused: :confused: :confused: :confused: :confused:

i'm still updating

Saga2001 03-14-2002 05:00 PM

Don't forget the condition thing, I don't know weather to call it an operator, or a condition, but this for setting vars:
NPC Code:

this.var = (condition ? ifitstrue : ifitsfalse);



Oh yeah, and its not new, its quite old...
You just haven't ever seen it before...

TDO2000 03-15-2002 12:26 AM

some things you can use in for

1. testing for an element in an array
example:
NPC Code:

if (created) {
this.array={1,2,3,4,5};
this.rnd=int(random(0,10));
if (this.rnd in this array) message yes!;
}



2. checking if a value is between 2 other values
example:
NPC Code:

if (playerenters) {
if (playerx in |0,10| && playery in |32,64|) message Yes!;
}



3. or just testing if a var is exact one of the given values
NPC Code:

if (playerenters) {
timereverywhere;
timeout=.05;
}
if (timeout) {
for (i=0;i<4;i++) {
if (keydown(i) && i in {0,2}) message Pressed up or down;
}
timeout=.05;
}


so here you can test if the player pressed up (0) or down (2) with just one argument...

there are also other possibilities to use in

Saga2001 03-15-2002 01:53 AM

I have entertained the thought of writing a new NPC Scripting.doc for a while, think its a good idea?

Admins 03-15-2002 02:01 AM

Planning a complete documentation of Graal and
the scripting engine, any help is welcome,
like examples for the different scripting functions

Jman9912-P2P 03-15-2002 03:38 AM

well i kno html and some php and stuff like that i may be able to help

Andor_RC9 03-15-2002 06:41 AM

Yes, but JMan, who doesnt know html?

Saga2001 03-15-2002 07:13 AM

Well I will definatly start working on such a project, I hope that the new engine doesn't change too durastically, than my work would be sad. I would like to do the expand and collapse thing, but would you use spans? Because I know how to do it with java, but I doubt that little window on the side has a java engine it in...

Saga2001 03-15-2002 02:11 PM

Quote:

Originally posted by Kaimetsu


Javascript, you mean? It could be made to work.

Yeah, sorry...

neomaximus2k 03-15-2002 04:12 PM

Quote:

Originally posted by Stefan
Planning a complete documentation of Graal and
the scripting engine, any help is welcome,
like examples for the different scripting functions

Woul dbe a good idea with the HTML, but i mananged to incorporate collapsable things into word the one, god knows how i did it so i am looking into that again :D

Saga2001 03-16-2002 06:09 AM

Quote:

Originally posted by neomaximus2k


Woul dbe a good idea with the HTML, but i mananged to incorporate collapsable things into word the one, god knows how i did it so i am looking into that again :D

probably spans, like with the old 404 error page with internet explorer.

neomaximus2k 03-16-2002 10:18 AM

Quote:

Originally posted by Saga2001


probably spans, like with the old 404 error page with internet explorer.

could be but then again you wouldn't have to add the JAVA system to graal at all, just use an external JS file and the commands.rtf file together to get the effect

user13-xo 03-16-2002 04:18 PM

You could use dynamic html. Ill make the command.rtf into a menu since I'm banned from graal 2001 and got nothing better to do.

Saga2001 03-16-2002 05:55 PM

Ummmmm... Actually DHTML is Spans, there is no javaSCRIPT involved with the IE4 thing, oh, yeah and Java 1.2 is ownage.

mikepg 03-16-2002 09:10 PM

well
 
If it is made to be expandable ect, There should be a little option button (like the smily topic icons), that lets you choose which version of commands rtf you want to use, because other than not being updated as frequently as graal comes out, I'm content with it.

neomaximus2k 03-17-2002 05:30 PM

Re: well
 
Quote:

Originally posted by mikepg
If it is made to be expandable ect, There should be a little option button (like the smily topic icons), that lets you choose which version of commands rtf you want to use, because other than not being updated as frequently as graal comes out, I'm content with it.
That is a good idea, could be built into the other configuration options that grall posseses

As for the collapsable menu, i know how to do it with the current version of graal now but i cant make one.

If someone makes one i am 100% sure i can sort the rest out

mikepg 03-18-2002 12:58 AM

An example:
 
I think it should look like this:

www.lagoonia.150m.com/commands.html

If you made that about the size of the current commands.rtf (the frames and font), stacked like that, I think it would be a great new format. I also think this thread should be moved to future improvements, lol.

mikepg 03-18-2002 01:01 AM

oh crud
 
sorry about the add banners, try
http://lagoonia.port5.com/commands.html

it should look a lot better without adds and popups. Sorry about that.

neomaximus2k 03-18-2002 03:13 AM

Re: oh crud
 
Quote:

Originally posted by mikepg
sorry about the add banners, try
http://lagoonia.port5.com/commands.html

it should look a lot better without adds and popups. Sorry about that.

nice idea but rather lame if you dont mind me saying so.

jeff335 03-19-2002 05:35 AM

Stefan:

I can help with the commands.rtf, including serverside stuff which I can fiddle with on Providence when it is back up. Forum PM me or email [email protected] if you want my assistance.

Saga2001 03-19-2002 12:29 PM

Quote:

dood jeff335 posted dis -
Stefan:

I can help with the commands.rtf, including serverside stuff which I can fiddle with on Providence when it is back up. Forum PM me or email [email protected] if you want my assistance.

yes, stefan is going to forum pm j00 without j00 forum pming him...fat chance...just work on it...

neomaximus2k 03-19-2002 03:46 PM

Quote:

Originally posted by Saga2001


yes, stefan is going to forum pm j00 without j00 forum pming him...fat chance...just work on it...

you never know! the vertical alignment of the sun and radial distance from the moon when coupled with the polarity of the being reversed just MAY cause stefan in a weird and freaky chance actually PM him!!!1

isn't it amazing with polarity can do :D

jeff335 03-20-2002 06:49 AM

Awright, awright, I'll just work on it and send it to him when i am done...

neomaximus2k 03-20-2002 03:54 PM

Quote:

Originally posted by neomaximus2k


you never know! the vertical alignment of the sun and radial distance from the moon when coupled with the polarity of the being reversed just MAY cause stefan in a weird and freaky chance actually PM him!!!1

isn't it amazing with polarity can do :D

I thought that was a good scientific explanation


All times are GMT +2. The time now is 04:17 PM.

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