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
  #61  
Old 09-14-2003, 04:01 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by GoZelda

Wrong. You can use any letter, as long it isn't used (x,y,z).
I,j,k,l etc. is for compability with Java and C++, just like == is.
Wrong. Those variable names are used simply for the sake of uniformity. Compatibility isn't even a factor.
__________________
Reply With Quote
  #62  
Old 09-14-2003, 04:11 PM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
Quote:
Originally posted by GoZelda

I,j,k,l etc. is for compability with Java and C++, just like == is.
AHAHAHAHAHAHAHA
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote
  #63  
Old 09-14-2003, 04:34 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Quote:
Originally posted by Kaimetsu


Wrong. Those variable names are used simply for the sake of uniformity. Compatibility isn't even a factor.
o.O crappy Java tutorial. Crappy NPCprogramming.RTF.
:grrr:
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote
  #64  
Old 09-14-2003, 04:43 PM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
Quote:
Originally posted by GoZelda

o.O crappy Java tutorial. Crappy NPCprogramming.RTF.
:grrr:
Dude, that has nothing to do with it. I don't think you fully understand the word 'compatibility'.
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote
  #65  
Old 09-14-2003, 04:48 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Quote:
Originally posted by Tseng


Dude, that has nothing to do with it. I don't think you fully understand the word 'compatibility'.
That could very well be XD
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote
  #66  
Old 09-21-2003, 04:01 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Quote:
Originally posted by Tseng


AHAHAHAHAHAHAHA
Quote:
Originally said by Stefan Knorr in NPCprogramming.rtf

You can also use other symbols like ":=" and a single "=" for checking equality, but it's not recommended (to keep compability to the Java/C++ syntax)
I'll get the for stuff later.
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote
  #67  
Old 09-21-2003, 04:13 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by GoZelda
I'll get the for stuff later.
English isn't Stefan's first language.

Anyway, i and j aren't part of Java or C and they're not syntactic devices. They're just variable names.
__________________
Reply With Quote
  #68  
Old 09-21-2003, 05:35 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Quote:
Originally posted by Kaimetsu


English isn't Stefan's first language.
Nor is it mine, so i guess that's the reason of this... misunderstanding.
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote
  #69  
Old 12-09-2003, 02:40 PM
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
There is now a new command on RC:

/style scripttype name

Scripttype can be class, npc or weapon.
It is reformatting the script to look nicer. Please test it before using, sometimes triggeractions can be messed up because it divides weapon names like Day-Night in Day - Night. You can change the style options in the server options:

scriptstyle=spaces=2,padding=oper,brackets=attach

Spaces gives the number of spaces to put in front of each line (indenting).

Padding says where to put spaces in between:
'oper' will put spaces behind commands like 'if' and before and after operands like '+' and '==',
'paren' will put spaces in [] and (),
'all' will do both.

Brackets says if it should break lines before and after { and } ('break'),
or if it should actually attach it to the previous 'if' or 'for' command ('attach'). Use 'linux' as option if you want to break declarations (array declarations like a = {1,23}) but want to attach brackets after commands.

The npcserver uses the astyle library to format the text.

[edit: post merge by Loriel ]

Yes i,j,k is common standard for loop index variables. The 'l' is not used often because it looks like a 1. So better continue with m,n,o,p,q,r,s,t etc.

Last edited by Loriel; 12-09-2003 at 02:55 PM..
Reply With Quote
  #70  
Old 12-09-2003, 05:10 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by Stefan
There is now a new command on RC:

/style scripttype name

Scripttype can be class, npc or weapon.
It is reformatting the script to look nicer. Please test it before using, sometimes triggeractions can be messed up because it divides weapon names like Day-Night in Day - Night. You can change the style options in the server options:

scriptstyle=spaces=2,padding=oper,brackets=attach

Spaces gives the number of spaces to put in front of each line (indenting).

Padding says where to put spaces in between:
'oper' will put spaces behind commands like 'if' and before and after operands like '+' and '==',
'paren' will put spaces in [] and (),
'all' will do both.

Brackets says if it should break lines before and after { and } ('break'),
or if it should actually attach it to the previous 'if' or 'for' command ('attach'). Use 'linux' as option if you want to break declarations (array declarations like a = {1,23}) but want to attach brackets after commands.

The npcserver uses the astyle library to format the text.

[edit: post merge by Loriel ]

Yes i,j,k is common standard for loop index variables. The 'l' is not used often because it looks like a 1. So better continue with m,n,o,p,q,r,s,t etc.
Finally!
But a style button wouldn't be better?
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #71  
Old 12-09-2003, 06:37 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
A style button would have required yet another RC update, and would also need to be rescripted for the new RC later on. Also, I doubt it would do much good to the RC's compactness to link it with the library Stefan mentioned.
Edit: Actually, no. Forget that. A style button would be better.
Reply With Quote
  #72  
Old 12-10-2003, 01:22 AM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
Finnaly! Good job Stefan

But, yea, A style button would be better
__________________
-Kjetil Valen
Reply With Quote
  #73  
Old 12-10-2003, 01:33 AM
xPuppetMasterx xPuppetMasterx is offline
reef
xPuppetMasterx's Avatar
Join Date: Jun 2003
Location: Back in the USA
Posts: 274
xPuppetMasterx is on a distinguished road
Send a message via AIM to xPuppetMasterx
Very nice. This will come in handy.
__________________
So free
Reply With Quote
  #74  
Old 12-10-2003, 01:56 AM
xManiamaNx xManiamaNx is offline
Supreme Dictator
xManiamaNx's Avatar
Join Date: Nov 2002
Location: 127.0.0.1
Posts: 385
xManiamaNx is on a distinguished road
Send a message via MSN to xManiamaNx Send a message via Yahoo to xManiamaNx
Wait for the new scripted rc, then you'll be able to have style buttons
__________________
Maniaman

Play Maloria Now: [2.3] [3]
Maloria Website

Reply With Quote
  #75  
Old 12-10-2003, 06:18 AM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
What are the options to have the same style that Stefan uses when he scripts? Fourm PM this to me please, as I never read this thread much.
NPC Code:

if (created) { //Braces on the same line, 1 space after the )
operations(); //Next command is on another line, alone, 2 spaces indented;
if (myflag) {
operations(); //Embedded command is 2 spaces indented, added to the origional 2 spaces
} // Closing brace on it's own line
}

__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
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 12:40 PM.


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