Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-14-2002, 04:47 AM
Andor_RC9 Andor_RC9 is offline
Registered User
Join Date: Feb 2002
Location: U.S.A - Ohio
Posts: 84
Andor_RC9 is on a distinguished road
Send a message via ICQ to Andor_RC9 Send a message via AIM to Andor_RC9 Send a message via Yahoo to Andor_RC9
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) ????


__________________
*mE0w*

Statistics show that 60% of all statistics are made-up
Reply With Quote
  #2  
Old 03-14-2002, 07:25 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
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) ????


'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 ...
Reply With Quote
  #3  
Old 03-14-2002, 03:45 PM
neomaximus2k neomaximus2k is offline
Registered User
Join Date: Feb 2002
Location: UK
Posts: 324
neomaximus2k is on a distinguished road
Send a message via ICQ to neomaximus2k
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) ????


i'm still updating
__________________
Beware of thy Inner self
NPC Code:

_.,.__
((o\\o\))
.-. ` \\``
__( )___.o"".,___
=== ~~~~~~~~
==
= Neo

Reply With Quote
  #4  
Old 03-14-2002, 05:00 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
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...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #5  
Old 03-15-2002, 12:26 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
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
__________________
No Webhost at the moment
Reply With Quote
  #6  
Old 03-15-2002, 01:53 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
I have entertained the thought of writing a new NPC Scripting.doc for a while, think its a good idea?
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #7  
Old 03-15-2002, 02:01 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Planning a complete documentation of Graal and
the scripting engine, any help is welcome,
like examples for the different scripting functions
Reply With Quote
  #8  
Old 03-15-2002, 03:38 AM
Jman9912-P2P Jman9912-P2P is offline
Registered User
Join Date: Nov 2001
Location: North Carolina!
Posts: 217
Jman9912-P2P is on a distinguished road
Send a message via AIM to Jman9912-P2P Send a message via Yahoo to Jman9912-P2P
well i kno html and some php and stuff like that i may be able to help
__________________
AIM: Jman9912
Email: [email protected]
Reply With Quote
  #9  
Old 03-15-2002, 06:41 AM
Andor_RC9 Andor_RC9 is offline
Registered User
Join Date: Feb 2002
Location: U.S.A - Ohio
Posts: 84
Andor_RC9 is on a distinguished road
Send a message via ICQ to Andor_RC9 Send a message via AIM to Andor_RC9 Send a message via Yahoo to Andor_RC9
Yes, but JMan, who doesnt know html?
__________________
*mE0w*

Statistics show that 60% of all statistics are made-up
Reply With Quote
  #10  
Old 03-15-2002, 07:13 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
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...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #11  
Old 03-15-2002, 02:11 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by Kaimetsu


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

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #12  
Old 03-15-2002, 04:12 PM
neomaximus2k neomaximus2k is offline
Registered User
Join Date: Feb 2002
Location: UK
Posts: 324
neomaximus2k is on a distinguished road
Send a message via ICQ to neomaximus2k
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
__________________
Beware of thy Inner self
NPC Code:

_.,.__
((o\\o\))
.-. ` \\``
__( )___.o"".,___
=== ~~~~~~~~
==
= Neo

Reply With Quote
  #13  
Old 03-16-2002, 06:09 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
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
probably spans, like with the old 404 error page with internet explorer.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #14  
Old 03-16-2002, 10:18 AM
neomaximus2k neomaximus2k is offline
Registered User
Join Date: Feb 2002
Location: UK
Posts: 324
neomaximus2k is on a distinguished road
Send a message via ICQ to neomaximus2k
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
__________________
Beware of thy Inner self
NPC Code:

_.,.__
((o\\o\))
.-. ` \\``
__( )___.o"".,___
=== ~~~~~~~~
==
= Neo

Reply With Quote
  #15  
Old 03-16-2002, 04:18 PM
user13-xo user13-xo is offline
Registered User
Join Date: Nov 2001
Location: California
Posts: 297
user13-xo is on a distinguished road
Send a message via AIM to user13-xo
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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