![]() |
New GS2 commands.rtf
1 Attachment(s)
I'm not sure if this would count as a script, but I'm rather sure that this deserves to be put in this forum board nonetheless.
I have recently finished converting the most recent commands.rtf I could find into GS2. Now before you cream your pants or whatever, I have to say that I haven't been able to check everything with the wiki. I want scripters to work together on it. This doesn't mean that I'm an idiot with GS2 or anything though, but to be on the safe side I took the liberty of leaving various message codes, built-in functions, things I wasn't sure about, and whatnot alone -- I would appreciate it if people could PM me or post here with a translation. I actively encourage any and all -knowledgeable- scripters (i.e. people who don't suck at scripting) to make edits and PM me with them so I can update this post or, if you're too lazy, to post edits that I can incorporate when I get around to it. Keep in mind that its important to be as concise as possible. Although some commands are still there from GS1 and whatnot, I can guarantee that all the given commands and formats are correct (unless someone chimes in otherwise in a following post or I say otherwise). I did my best to stay true to the original commands.rtf by following its formats and diction. Please post praise/worship/compliments/corrections/editions/etc. If you make a new edition pelase forum PM it to me so I can replace yours with this one (provided that its not wrong or anything). edit -- Things I do not want the commands.rtf to become:
(Also please recognize that I didn't put my name -anywhere- in here so don't try to put yours in. Dach and ace2896 and all the other people in the past never did it with theirs so don't be an ostentatious homo) This may not be perfect or exactly "politically correct" so to speak, but this is definately a working commands.rtf and does its job. (Latest Edition: 11 Oct 2006) |
Nice :)
|
'Nice', but I most likely wont use it..
|
Quote:
|
function funcname() { operations; }
should probably be: function funcname(parameters) { operations; } -- return; ends the function immediatelly and returns to the function caller Might be: return value; ends the function immediatelly and returns the value specified. (If no value is specified 'null' or 0 is returned) -- triggeraction(x,y,actionname,params); triggers an ‘if (action<action>)...’ on the objects on (x,y) should be updated to gscript2 aswell: triggeraction(x,y,actionname,params); triggers an ‘onAction<Action>()...’ on the objects on (x,y) -- This is no longer correct: this. variables that start with ‘this.’ are only accessible for the npc itself and something should be written up for 'temp.' and non-prefixed variables aswell. -- Built-in Flags/Events (function on...() {) true when: ... onwall( x, y ) the specified field is blocked You can't use functions with the syntax onOnWall(x,y)() etc. This section should be revised to differentiate functions from flags. -- str SPC str inserts a space between two strings should be appended after: str NL str line break ( NL is an abbreviation for 'newline' ) These should be moved to the operators section, aswell. -- @ should be added to the operators section, as a string concatination method. -- Some things need to be marked as deprecated, and some things in that no longer work correctly. These are the things I've noticed at first glance. If I have time tomorrow or something I will go through it again and possibly write up something for the ones I didn't provide much information for. |
// for program execution
for (needle: haystack) do { ... } while(condition); switch (variable) case value: default: // complex npc operations: ... echo( string ) outputs 'string' to the player's log on clientside or in the NPC-Control on serverside "Special Symbols" (??? Operators) | bitwise or xor bitwise xor << bitwise shift left >> bitwise shift right & bitwise and {} array constructor [] array reference (or new [size] array) new Object constructor ?a:b tertiary operator (condition?true-case:false-case) :: class scope operator timeout should not be removed from built-in variables. Uh yeah, I'll come up with more, no doubt. #v(var) -> var #f -> image #e(start,len,str) -> str.substring(start,len) |
btw guys I have a life too so don't expect me to do it immediately or within the next few days if I don't feel up to it...
You're more than welcome to attach your own edited one and say the stuff you changed -- I'll be more than happy to put the most up-to-date one in the original post. edit -- all stuff above this post has been edited in, except for the 'for (needle: haystack)' because I'm not 100% on how to explain it so I need a description. Also I'll add the 'do while' thing in a bit because I left it out. I'll edit this again I'd appreciate it if you'd PM me the changes and stuff instead of post them here because I don't want people to look at the thread and then scroll down to see everything that might be wrong with it. |
Quote:
Quote:
|
I hate it when you people take everything other people say word for word and then make a post with multiple quotes to make it look like you're arguing word by word.
w/e as long as it works out |
Quote:
|
w/e lets keep on topic
please post editions and whatnot (and if the moderator wouldn't mind deleting posts from "btw guys..." to this one?) |
it's not case default: in switch, it's just default:
also, it's not evaluating a condition, it's more reporting the value of a variable. |
#messagecodes are obsolete.
|
Quote:
|
bizzump because it doesn't sizzuck
|
Does this have mostly everything or does it still have a ways to go?
|
It's neither finished nor particularly accurate.
|
Quote:
And if anyone have a problem with how innaccurate it is, feel free to post a new version or PM me an updated one. |
Quote:
|
Ahh you might wanna eliminate the message codes. Reference stuff like player.head, player.shield, player.colors[index], and so on instead.
Keep up the work though. Something like this is good to have as reference, just be sure to correct and take note on peoples suggestions. :) |
Message codes . . . Bleh.
|
| All times are GMT +2. The time now is 11:18 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.