Creation/Dev/GScript/GScript for Dummies
Preface
Introduction
New Engine GScript for Dummies is a guide designed to aid the learning of the new scripting engine, frequently dubbed 'gscript2'. This guide will explain the basics, such as functions, variables and some Gscript-specific concepts that you will need to know in order to get scripting in no time. The guide is indexed at the top of the page, and by clicking one of the index links, you will be taken to the appropriate section. If you haven't really a clue where to start, then you're probably best reading through the entire guide.
Who is this for?
This is for absolutely anyone who is interested in learning in Gscript. Having some previous knowledge of scripting would be beneficial, but isn't required.
What should I do if I have a problem or a question not covered here?
You can, of course, post your problem on the GraalOnline Forums in the NPC Scripting section. Similarly, you can also contact a member of the Global Scripting Team via Forum PM if you think that you require more direct assistance, although usually forum regulars will be happy to help.
Welcome to GScript
GScript is the scripting language that powers most of the dynamic content provided by GraalOnline. The scripting language is a very useful tool, since it enables you to create a very wide variety of systems, including automated baddies, scripted systems, GUIs.
Glossary of Terms
Through this guide, a number of terms are likely to be used. In case you are not sure exactly what any of the terms mean, you can look them up here!
- Variable: This is a special type of object that stores data. The data might be a string, an integer, a float, or an array.
- String: This is a type of data that can be stored in a variable. A string is a collection of letters, numbers and symbols. For example, if you are interested in storing a sentence in a variable, a string is probably your best bet.
- Integer: This is a type of data that can be stored in a variable. An integer is simply a round number. No decimal places. Positive or negative, it's just a round number.
- Float: This is a type of data that can be stored in a variable. A float is a number that is not an integer, that may contain decimal places.
- Function: This is a block of code. A function is a defined routine of instructions that can be ran at any time in a script.
- Predefined Function: This is a function that is already available in the scripting engine. Such functions are internal, that usually allow mathematical and other variable operations, manipulation of players and such like. You do not need to define a predefined function yourself, since it is already there for you to use!