<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://graalonline.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Chad</id>
	<title>Graal Bible - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://graalonline.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Chad"/>
	<link rel="alternate" type="text/html" href="https://graalonline.net/Special:Contributions/Chad"/>
	<updated>2026-04-09T19:09:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.4</generator>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript&amp;diff=5099</id>
		<title>Creation/Dev/GScript</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript&amp;diff=5099"/>
		<updated>2005-12-02T21:04:59Z</updated>

		<summary type="html">&lt;p&gt;Chad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''GScript''' is [[Graal]]'s scripting language.&lt;br /&gt;
&lt;br /&gt;
Its syntax and some of its semantics might seem familiar to those who program in [[WikiPedia:C (Programming Language) | C]] or derived languages, although it lacks some of the expressivity of a real programming language and has special constructs that make programming [[Graal]] [[NPC]]s easier.&lt;br /&gt;
&lt;br /&gt;
GScript started as a very limited language and has since kept up with improvements to the game engine and can now be used for pretty sophisticated scripts that greatly customise the gaming experience.&lt;br /&gt;
&lt;br /&gt;
It is used, with minor differences, for [[Clientside]] tasks like [[GUI | GUI programming]], special effects with nifty 3d lighting and custom [[NPC weapon|NPC Weapons]] or &amp;amp;quot;engines&amp;amp;quot;, and [[Serverside]] systems like player housing, complex baddies or pets.&lt;br /&gt;
&lt;br /&gt;
[[Old GScript]] has been replaced by a new version (dubbed GScript2 during development) that is rather advanced, in some way object oriented, and thanks to influence from [[WikiPedia:Java programming language| Java]] and [[Torque]]'s scripting language, less brain-damaged in some aspects. No offense intended.&lt;br /&gt;
&lt;br /&gt;
GScript can be discussed in the [[GScript IRC channel]].&lt;br /&gt;
&lt;br /&gt;
[[Script Functions: Client]]&lt;br /&gt;
&lt;br /&gt;
[[Script Functions: NPC Server]]&lt;br /&gt;
&lt;br /&gt;
[[Script Functions: Graal 3D]]&lt;br /&gt;
&lt;br /&gt;
[[Graal v4 IRC|Graal IRC Scripting: Graal v4 IRC Scripting Reference]]&lt;br /&gt;
&lt;br /&gt;
[[Troubleshooting Graal v4 IRC|Graal IRC Scripting: Troubleshooting Scripting Reference]]&lt;br /&gt;
&lt;br /&gt;
[[Particle Engine|Graal v4 Particle Engine]]&lt;br /&gt;
&lt;br /&gt;
[[GS1 To GS2|GS1 To GS2: Guide for fixing scripts to work with the new engine]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Why scripts ===&lt;br /&gt;
&lt;br /&gt;
Scripts bring life into objects and make it easy to &lt;br /&gt;
customize the game. Instead of just placing a stone&lt;br /&gt;
into your world, you can make it so that the stone&lt;br /&gt;
can be lifted or kicked. Instead of being limited to&lt;br /&gt;
some fixed player movement you can rescript it&lt;br /&gt;
to let the player jump, strafe and duck. To let the &lt;br /&gt;
player inspect and organize his/her items you can&lt;br /&gt;
create some dialogs and display those by script,&lt;br /&gt;
e.g. when the player presses a special key.&lt;br /&gt;
&lt;br /&gt;
In Graal the scripting is done in 'Graal Script',&lt;br /&gt;
it's looking like Java/C++, but brings some &lt;br /&gt;
additional features for making things easier&lt;br /&gt;
for game creators, while on the other hand&lt;br /&gt;
running in a sandbox and limiting access to&lt;br /&gt;
game-related stuff only.&lt;br /&gt;
&lt;br /&gt;
Graal Script is almost fully compatible to &lt;br /&gt;
the 'old' Graal script used in Graal v1.0 - 3.0,&lt;br /&gt;
and is partially compatible to Torque script. &lt;br /&gt;
&lt;br /&gt;
=== NPCs and 'weapons' ===&lt;br /&gt;
&lt;br /&gt;
There are generally two types of objects in Graal&lt;br /&gt;
which have scripts: The first type are the &lt;br /&gt;
non-player-characters (NPCs). The name 'NPC' is&lt;br /&gt;
actually used for all visible objects in the game: &lt;br /&gt;
monsters, stones, bushes, houses, ships, plants etc.&lt;br /&gt;
Scripts for npcs are most of the time containing&lt;br /&gt;
code for moving the npc or for reacting to &lt;br /&gt;
activities of the player, e.g. giving money to&lt;br /&gt;
the player when he grabs the npc.&lt;br /&gt;
The other type of script-holding objects are the&lt;br /&gt;
'weapons'. Those are items in the inventory of&lt;br /&gt;
the player, not necessary being weapons. Most of&lt;br /&gt;
the time they are actually just scripts which&lt;br /&gt;
control the movement of the player, display weapon&lt;br /&gt;
graphics, or display menus.&lt;br /&gt;
&lt;br /&gt;
So there are objects in the game which have &lt;br /&gt;
their own script, and players which have a set&lt;br /&gt;
of scripts in their invisible backpack.&lt;br /&gt;
&lt;br /&gt;
=== Server-side and client-side ===&lt;br /&gt;
&lt;br /&gt;
Graal is an online game, and there are differences&lt;br /&gt;
to standard scripting in offline games.&lt;br /&gt;
In offline programs you have access to everything,&lt;br /&gt;
anytime. In online games everything is divided&lt;br /&gt;
into two parts: the server-side which controls&lt;br /&gt;
most things in the game, and the client-side which&lt;br /&gt;
displays the game to the player.&lt;br /&gt;
Since the client only displays things, it is not&lt;br /&gt;
possible to cheat by hacking the client. On client-side&lt;br /&gt;
you mainly have code for displaying special effects,&lt;br /&gt;
for displaying the GUI (windows, status bars, item menus),&lt;br /&gt;
playing sound effects and music. Also the player &lt;br /&gt;
movement is done on client-side.&lt;br /&gt;
On the server-side scripts are used to do the more&lt;br /&gt;
secure parts of the game engine,&lt;br /&gt;
and things that are the same for all players -&lt;br /&gt;
npcs are added, moved, npcs interact with players,&lt;br /&gt;
the stats of the players are calculated, the&lt;br /&gt;
communication between players is handled.&lt;br /&gt;
&lt;br /&gt;
All scripts for npcs and weapons can contain&lt;br /&gt;
server-side code and client-side code. The server-side&lt;br /&gt;
code is executed directly on the server, the&lt;br /&gt;
client-side code is sent to the client when he/she&lt;br /&gt;
logins and executed separately for each player on&lt;br /&gt;
their own computer. Usually the two parts of the script&lt;br /&gt;
are divided by line that only contains &amp;quot;//#CLIENTSIDE&amp;quot;,&lt;br /&gt;
like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// Server-side part which is setting the image&lt;br /&gt;
// of the npc when it is created&lt;br /&gt;
function onCreated() {&lt;br /&gt;
  setimg(&amp;quot;door.png&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
&lt;br /&gt;
// Here follows the client-side part,&lt;br /&gt;
// which plays a sound effect when the player&lt;br /&gt;
// touchs the npc&lt;br /&gt;
function onPlayerTouchsme() {&lt;br /&gt;
  play(&amp;quot;chest.wav&amp;quot;);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
&lt;br /&gt;
In general scripts are made for reacting to &lt;br /&gt;
events - when the npc is created then the script&lt;br /&gt;
initializes the attributes of the npc,&lt;br /&gt;
when the player says something then the npc is&lt;br /&gt;
moving to the player, when the player grabs the&lt;br /&gt;
npc then the npc is giving the player some money etc.&lt;br /&gt;
So the script is basicly a collection of actions&lt;br /&gt;
that are done when special events are happening.&lt;br /&gt;
Events can e.g. be the &amp;quot;created&amp;quot; event when the npc&lt;br /&gt;
is created, the &amp;quot;playertouchsme&amp;quot; event when the &lt;br /&gt;
player touchs the npc, or the &amp;quot;playerchats&amp;quot; event&lt;br /&gt;
when the player says something. To write code that reacts&lt;br /&gt;
to one of those event, you define an event&lt;br /&gt;
function like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function onEVENTNAME() {&lt;br /&gt;
  // actions&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the event is happening, then Graal executes&lt;br /&gt;
that scripting function and all commands you &lt;br /&gt;
have added there.&lt;br /&gt;
Sometimes the event gives some parameters to the &lt;br /&gt;
event function, then change your function to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function onEVENTNAME(parameter1, parameter2, ...) {&lt;br /&gt;
  // actions&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By accessing 'parameter1' etc. (you can name&lt;br /&gt;
them differently) you can react to the event more&lt;br /&gt;
exactly. &lt;br /&gt;
&lt;br /&gt;
Instead of reacting to events, the npcs and&lt;br /&gt;
weapons can also invoke new events. That way &lt;br /&gt;
you can let other npcs doing things. You also&lt;br /&gt;
need that if you want to coninuously doing things -&lt;br /&gt;
use timeout events for that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated() {&lt;br /&gt;
  setTimer(1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function onTimeout() {&lt;br /&gt;
  // actions&lt;br /&gt;
  setTimer(1);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the onCreated event function the script is&lt;br /&gt;
setting the timer to 1 second. When that second is&lt;br /&gt;
over, then the &amp;quot;timeout&amp;quot; event is invoked on the&lt;br /&gt;
npc and the onTimeout event function is executed.&lt;br /&gt;
Because it is setting the timer to 1 second&lt;br /&gt;
again, the onTimeout event will occur again after&lt;br /&gt;
one second, and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compatibility note:&lt;br /&gt;
In older Graal scripts you will also find the&lt;br /&gt;
deprecated way of receiving events:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;if (EVENTNAME) {&lt;br /&gt;
  // actions&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is an if-command outside of any brackets. If&lt;br /&gt;
Graal sees that you use such an if-command, then&lt;br /&gt;
it will execute the whole script so that the actions&lt;br /&gt;
you have written inside the if-command will be&lt;br /&gt;
executed too.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
=== Accessing variables ===&lt;br /&gt;
&lt;br /&gt;
Graal Script variables are 'variant', that means they are objects&lt;br /&gt;
that hold values of different types.&lt;br /&gt;
When you assign a value to the variable then it automatically&lt;br /&gt;
switches to the right type:&lt;br /&gt;
&lt;br /&gt;
Numeric (floating point):&lt;br /&gt;
  var = 1;&lt;br /&gt;
String (text):&lt;br /&gt;
  var = &amp;quot;hello&amp;quot;;&lt;br /&gt;
Object link:&lt;br /&gt;
  var = player;&lt;br /&gt;
Array (list of objects):&lt;br /&gt;
  var = {1,2,3};&lt;br /&gt;
&lt;br /&gt;
You can check the current type with the&lt;br /&gt;
type()-function - obj.type() returns&lt;br /&gt;
0,1,2,3 for numeric, string, object or array.&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Addition                  a + b&lt;br /&gt;
Substraction              a - b&lt;br /&gt;
Mulitplication            a * b&lt;br /&gt;
Division                  a / b&lt;br /&gt;
Modulus                   a % b&lt;br /&gt;
Power                     a ^ b&lt;br /&gt;
String Concationation     a @ b&lt;br /&gt;
    with space            a SPC b&lt;br /&gt;
    with newline          a NL b&lt;br /&gt;
    with tabulator        a TAB b&lt;br /&gt;
Bool-And                  a &amp;amp;&amp;amp; b&lt;br /&gt;
Bool-Or                   a || b&lt;br /&gt;
Bool-Not                  !a&lt;br /&gt;
Negative                  -a&lt;br /&gt;
Equal                     a == b&lt;br /&gt;
Not-Equal                 a != b&lt;br /&gt;
Less                      a &amp;lt; b&lt;br /&gt;
Greater                   a &amp;gt; b&lt;br /&gt;
Less-Equal                a &amp;lt;= b,  a =&amp;lt; b&lt;br /&gt;
Greater-Equal             a &amp;gt;= b,  a =&amp;gt; b&lt;br /&gt;
In-Range                  a in &amp;lt;b,c&amp;gt;, a in |b,c&amp;gt;, a in &amp;lt;b,c|, a in |b,c|&lt;br /&gt;
In-Array                  a in {b,c,...}, {a,b,...} in {c,d,...}&lt;br /&gt;
Bitwise-Or                a | b&lt;br /&gt;
Bitwise-And               a &amp;amp; b&lt;br /&gt;
Bitwise-Shift left        a &amp;lt;&amp;lt; b&lt;br /&gt;
Bitwise-Shift right       a &amp;gt;&amp;gt; b&lt;br /&gt;
Bitwise-Invert            ~a&lt;br /&gt;
Bitwise-Xor               a xor b (operator ^ already used for power)&lt;br /&gt;
Array-Constructor         {a,b,...}&lt;br /&gt;
Empty Array               new [count], new[countdim1][countdim2]...&lt;br /&gt;
Array Member              a[index]&lt;br /&gt;
Function call             a(), a(b,c,...)&lt;br /&gt;
Object Attribute          a.b, a.(b)&lt;br /&gt;
Post Increment            a++&lt;br /&gt;
Post Decrement            a--&lt;br /&gt;
Pre Increment             ++a&lt;br /&gt;
Pre Decrement             --a&lt;br /&gt;
Old String Function       #a&lt;br /&gt;
Conditional               a? b : c&lt;br /&gt;
Assignment                a = b, a := b&lt;br /&gt;
Additive Assignment       a += b&lt;br /&gt;
Substractive Assignment   a -= b&lt;br /&gt;
Multiplicative Assignment a *= b&lt;br /&gt;
Division Assignment       a /= b&lt;br /&gt;
Modulus Assignment        a %= b&lt;br /&gt;
Power Assignment          a ^= b&lt;br /&gt;
Bitwise-Or Assignment     a |= b&lt;br /&gt;
Bitwise-And Assignment    a &amp;amp;= b&lt;br /&gt;
Shift Left Assignment     a &amp;lt;&amp;lt;= b&lt;br /&gt;
Shift Right Assignment    a &amp;gt;&amp;gt;= b&lt;br /&gt;
String Append             a @= b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Standard object functions ===&lt;br /&gt;
&lt;br /&gt;
For a complete list of functions and attributes of objects&lt;br /&gt;
see docu_graalscriptfunctions.txt. The base type of all&lt;br /&gt;
objects is &amp;quot;TGraalVar&amp;quot;. You can also get the latest list by&lt;br /&gt;
calling the executale with &amp;quot;-listscriptfunctions&amp;quot; as &lt;br /&gt;
command-line parameter. &lt;br /&gt;
Here only some of the built-in functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
obj.type()  - gets the type of the var (float 0, string 1, object 2, array 3)&lt;br /&gt;
obj.length() - string length&lt;br /&gt;
obj.trim() - removes spaces from the front and back of a string&lt;br /&gt;
obj.lower() - converts a string to lower case&lt;br /&gt;
obj.upper() - converts a string to upper case&lt;br /&gt;
obj.tokenize([delimiters])&lt;br /&gt;
obj.charat(pos)&lt;br /&gt;
obj.pos(substring)&lt;br /&gt;
obj.starts(string)&lt;br /&gt;
obj.ends(string)&lt;br /&gt;
obj.substring(index[,length])&lt;br /&gt;
obj.size() - array length&lt;br /&gt;
obj.subarray(index[,length])&lt;br /&gt;
obj.addarray(obj2)&lt;br /&gt;
obj.insertarray(index,obj2)&lt;br /&gt;
obj.index(obj2) - position of obj2 in the array&lt;br /&gt;
obj.clear()&lt;br /&gt;
obj.add(obj2)&lt;br /&gt;
obj.delete(index)&lt;br /&gt;
obj.remove(obj2)&lt;br /&gt;
obj.replace(index,obj2)&lt;br /&gt;
obj.insert(index,obj2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Standard functions ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
format(format,parameters,...) - formats a &amp;quot;%s %d&amp;quot; string, inserts the parameters, and returns a string&lt;br /&gt;
int(a)&lt;br /&gt;
abs(a)&lt;br /&gt;
random(rangestart,rangeend)&lt;br /&gt;
sin(a)&lt;br /&gt;
cos(a)&lt;br /&gt;
arctan(a)&lt;br /&gt;
exp(a)&lt;br /&gt;
log(base,a)&lt;br /&gt;
min(a,b)&lt;br /&gt;
max(a,b)&lt;br /&gt;
getangle(delta x,delta y)&lt;br /&gt;
getdir(delta x,delta y) - returns 0 for up, 1 for left, 2 for down, 3 for right&lt;br /&gt;
vecx(direction)&lt;br /&gt;
vecy(direction)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
&lt;br /&gt;
=== GUI controls ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onAdd() when added to the parent&lt;br /&gt;
onRemove() when removed from the parent&lt;br /&gt;
onWake() when activated&lt;br /&gt;
onSleep() when deactivated&lt;br /&gt;
onResize(w,h)&lt;br /&gt;
onMove(x,y)&lt;br /&gt;
onMouseEnter(modifier,x,y,clickcount)&lt;br /&gt;
onMouseLeave(modifier,x,y,clickcount)&lt;br /&gt;
onMouseDown(modifier,x,y,clickcount)&lt;br /&gt;
onMouseUp(modifier,x,y,clickcount)&lt;br /&gt;
onMouseDragged(modifier,x,y,clickcount)&lt;br /&gt;
onMouseMove(modifier,x,y,clickcount)&lt;br /&gt;
onRightMouseDown(modifier,x,y,clickcount)&lt;br /&gt;
onRightMouseUp(modifier,x,y,clickcount)&lt;br /&gt;
onRightMouseDragged(modifier,x,y,clickcount)&lt;br /&gt;
onMouseWheelUp(modifier,x,y,clickcount)&lt;br /&gt;
onMouseWheelDown(modifier,x,y,clickcount)&lt;br /&gt;
onKeyDown(keycode,string)&lt;br /&gt;
onKeyUp(keycode,string)&lt;br /&gt;
onKeyRepeat(keycode,string)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiMLTextCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onReflow(w,h) when the text has changed&lt;br /&gt;
onURL(url) when clicked on url&lt;br /&gt;
onSelectTag(tagid) when clicked on an image&lt;br /&gt;
&lt;br /&gt;
Text-Tags:&lt;br /&gt;
The text of multi-line text controls can contain&lt;br /&gt;
a few HTML-tags and Torque-tags, you can use both&lt;br /&gt;
of those tag types to define colors and fonts&lt;br /&gt;
or to include images. Currently following tags&lt;br /&gt;
are available:&lt;br /&gt;
&lt;br /&gt;
HTML:&lt;br /&gt;
&amp;lt;a href=url&amp;gt; text &amp;lt;/a&amp;gt; - when the user clicks on 'text' then &lt;br /&gt;
  a web browser is opened for the specified url&lt;br /&gt;
&amp;lt;body bgcolor=colorname or #rrggbb&amp;gt; - sets the background color&lt;br /&gt;
&amp;lt;br&amp;gt; - line break&lt;br /&gt;
&amp;lt;center&amp;gt; text &amp;lt;/center&amp;gt; - centers the contained text&lt;br /&gt;
&amp;lt;font face=fontname size=textsize color=colorname or #rrggbb&amp;gt; text &amp;lt;/font&amp;gt;&lt;br /&gt;
  - draws text with a special font, size and color; you only&lt;br /&gt;
  need to define one of those 3 attributes&lt;br /&gt;
&amp;lt;ignorelinebreaks&amp;gt; &amp;lt;/ignorelinebreaks&amp;gt; - go into normal HTML mode where&lt;br /&gt;
  you need to insert &amp;lt;br&amp;gt; to do a linebreak&lt;br /&gt;
&amp;lt;img src=filename id=integer&amp;gt; - an image is displayed, you &lt;br /&gt;
  can also specify a tagid if you want to get onSelectTag-events&lt;br /&gt;
  for this image&lt;br /&gt;
&amp;lt;p align=left/center/right&amp;gt; text &amp;lt;/p&amp;gt; - sets the align of the &lt;br /&gt;
  contained text&lt;br /&gt;
&amp;lt;span style=&amp;quot;width=100; height=100;&amp;quot; id=integer&amp;gt; &amp;lt;/span&amp;gt; - for &lt;br /&gt;
  displaying a subpage, you can also specifiy an id for &lt;br /&gt;
  onSelectTag-events; instead of &amp;lt;span&amp;gt; you can also use &amp;lt;div&amp;gt; tags&lt;br /&gt;
&lt;br /&gt;
Torque:&lt;br /&gt;
&amp;lt;a:url&amp;gt; text &amp;lt;/a&amp;gt; - when the user clicks on 'text' then &lt;br /&gt;
  a web browser is opened for the specified url&lt;br /&gt;
&amp;lt;bitmap:filename&amp;gt; - an image is displayed&lt;br /&gt;
&amp;lt;color:rrggbb&amp;gt; - sets the color of the text (hexadecimal value)&lt;br /&gt;
&amp;lt;lmargin:pixels&amp;gt; - sets the left margin for the text&lt;br /&gt;
&amp;lt;lmargin%:percent&amp;gt; - sets the size of the left margin depending &lt;br /&gt;
  on the width of the whole control&lt;br /&gt;
&amp;lt;linkcolor:rrggbb&amp;gt; - sets the color of links (the &amp;lt;a&amp;gt;-tag)&lt;br /&gt;
&amp;lt;linkcolorhl:rrggbb&amp;gt; - sets the highlighted color, when&lt;br /&gt;
  the user moves the mouse over a link&lt;br /&gt;
&amp;lt;just:left/center/right&amp;gt; - sets the align of the following text&lt;br /&gt;
&amp;lt;rmargin:pixels&amp;gt; - sets the right margin for the text&lt;br /&gt;
&amp;lt;rmargin%:percent&amp;gt; - sets the size of the right margin depending &lt;br /&gt;
  on the width of the whole control&lt;br /&gt;
&amp;lt;sbreak&amp;gt; - line break&lt;br /&gt;
&amp;lt;spush&amp;gt; - switches to a new style (like &amp;lt;font&amp;gt;)&lt;br /&gt;
&amp;lt;spop&amp;gt; - switches back to the last saved style (like &amp;lt;/font&amp;gt;)&lt;br /&gt;
&amp;lt;tab:tab1,tab2,..&amp;gt; - sets the position of where tabulators should&lt;br /&gt;
  be displayed if you have text like 'Apple \t Egg \t Chicken'&lt;br /&gt;
&amp;lt;tag:id&amp;gt; - inserts an invisible tag which can be used&lt;br /&gt;
  for the scrollToTag(id) function (beside image-tags)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== GuiTextEditCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onTabComplete()&lt;br /&gt;
onAction(text) when return key pressed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiTextListCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onSelect(id,text) when row selected&lt;br /&gt;
onDblClick(id) when double-click on row or return key pressed&lt;br /&gt;
onDeleteKey(id) when delete key pressed&lt;br /&gt;
onIconResized(w,h) when setIconSize() called&lt;br /&gt;
onOpenMenu(0,index,text) when an item was right-clicked&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiPopUpMenuCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onSelect(id,text) when menu option choosen&lt;br /&gt;
onCancel() when menu is closed without action&lt;br /&gt;
onOpenMenu(0,index,text) when an item was right-clicked&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiMenuBar: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onMenuSelect(menuid,menutext)&lt;br /&gt;
onMenuItemSelect(menuid,menutext,itemid,itemtext)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiTreeViewCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onSelect(id,rightmouse) when row selected&lt;br /&gt;
onUnselect(id) when row de-selected&lt;br /&gt;
onInspect(id) when clicked on the name of an item&lt;br /&gt;
onOpenMenu(0,index,text) when an item was right-clicked&lt;br /&gt;
onContextMenu(&amp;quot;x y&amp;quot;,id) when clicked with right-mouse key on row&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Old script compatibility ==&lt;br /&gt;
&lt;br /&gt;
=== Removed functionality ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- toinventory&lt;br /&gt;
- followplayer&lt;br /&gt;
- playersays()&lt;br /&gt;
- setbackpal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Supported old scripting commands and their mapping to new script ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
addstring oldstring, oldstring;&lt;br /&gt;
                                addstring(string,string);&lt;br /&gt;
addtiledef oldstring, oldstring, float;&lt;br /&gt;
                                addtiledef(string,string,float);&lt;br /&gt;
addtiledef2 oldstring, oldstring, float, float;&lt;br /&gt;
                                addtiledef2(string,string,float,float);&lt;br /&gt;
attachplayertoobj float, float;&lt;br /&gt;
                                attachplayertoobj(float,float);&lt;br /&gt;
blockagain;&lt;br /&gt;
                                blockagain();&lt;br /&gt;
blockagainlocal;&lt;br /&gt;
                                blockagainlocal();&lt;br /&gt;
callnpc float, oldstring;&lt;br /&gt;
                                callnpc(float,string);&lt;br /&gt;
callweapon float, oldstring;&lt;br /&gt;
                                callweapon(float,string);&lt;br /&gt;
canbecarried;&lt;br /&gt;
                                canbecarried();&lt;br /&gt;
canbepulled;&lt;br /&gt;
                                canbepulled();&lt;br /&gt;
canbepushed;&lt;br /&gt;
                                canbepushed();&lt;br /&gt;
cannotbecarried;&lt;br /&gt;
                                cannotbecarried();&lt;br /&gt;
cannotbepulled;&lt;br /&gt;
                                cannotbepulled();&lt;br /&gt;
cannotbepushed;&lt;br /&gt;
                                cannotbepushed();&lt;br /&gt;
canwarp;&lt;br /&gt;
                                canwarp();&lt;br /&gt;
canwarp2;&lt;br /&gt;
                                canwarp2();&lt;br /&gt;
carryobject oldstring;&lt;br /&gt;
                                carryobject(string);&lt;br /&gt;
changeimgcolors float, float, float, float, float;&lt;br /&gt;
                                changeimgcolors(float,float,float,float,float);&lt;br /&gt;
changeimgmode float, float;&lt;br /&gt;
                                changeimgmode(float,float);&lt;br /&gt;
changeimgpart float, float, float, float, float;&lt;br /&gt;
                                changeimgpart(float,float,float,float,float);&lt;br /&gt;
changeimgvis float, float;&lt;br /&gt;
                                changeimgvis(float,float);&lt;br /&gt;
changeimgzoom float, float;&lt;br /&gt;
                                changeimgzoom(float,float);&lt;br /&gt;
deletestring oldstring, float;&lt;br /&gt;
                                deletestring(string,float);&lt;br /&gt;
destroy;&lt;br /&gt;
                                destroy();&lt;br /&gt;
detachplayer;&lt;br /&gt;
                                detachplayer();&lt;br /&gt;
disabledefmovement;&lt;br /&gt;
                                disabledefmovement();&lt;br /&gt;
disablemap;&lt;br /&gt;
                                disablemap();&lt;br /&gt;
disablepause;&lt;br /&gt;
                                disablepause();&lt;br /&gt;
disableselectweapons;&lt;br /&gt;
                                disableselectweapons();&lt;br /&gt;
disableweapons;&lt;br /&gt;
                                disableweapons();&lt;br /&gt;
dontblock;&lt;br /&gt;
                                dontblock();&lt;br /&gt;
dontblocklocal;&lt;br /&gt;
                                dontblocklocal();&lt;br /&gt;
drawaslight;&lt;br /&gt;
                                drawaslight();&lt;br /&gt;
drawoverplayer;&lt;br /&gt;
                                drawoverplayer();&lt;br /&gt;
drawunderplayer;&lt;br /&gt;
                                drawunderplayer();&lt;br /&gt;
enabledefmovement;&lt;br /&gt;
                                enabledefmovement();&lt;br /&gt;
enablefeatures float;&lt;br /&gt;
                                enablefeatures(float);&lt;br /&gt;
enablemap;&lt;br /&gt;
                                enablemap();&lt;br /&gt;
enablepause;&lt;br /&gt;
                                enablepause();&lt;br /&gt;
enableselectweapons;&lt;br /&gt;
                                enableselectweapons();&lt;br /&gt;
enableweapons;&lt;br /&gt;
                                enableweapons();&lt;br /&gt;
explodebomb float;&lt;br /&gt;
                                explodebomb(float);&lt;br /&gt;
followplayer;&lt;br /&gt;
                                followplayer();&lt;br /&gt;
freezeplayer float;&lt;br /&gt;
                                freezeplayer(float);&lt;br /&gt;
freezeplayer2;&lt;br /&gt;
                                freezeplayer2();&lt;br /&gt;
hide;&lt;br /&gt;
                                hide();&lt;br /&gt;
hideimg float;&lt;br /&gt;
                                hideimg(float);&lt;br /&gt;
hideimgs float, float;&lt;br /&gt;
                                hideimgs(float,float);&lt;br /&gt;
hidelocal;&lt;br /&gt;
                                hidelocal();&lt;br /&gt;
&lt;br /&gt;
hitcompu float, float, float, float;&lt;br /&gt;
                                hitcompu(float,float,float,float);&lt;br /&gt;
hitnpc float, float, float, float;&lt;br /&gt;
                                hitnpc(float,float,float,float);&lt;br /&gt;
hitobjects float, float, float;&lt;br /&gt;
                                hitobjects(float,float,float);&lt;br /&gt;
hideplayer float;&lt;br /&gt;
                                hideplayer(float);&lt;br /&gt;
hidesword float;&lt;br /&gt;
                                hidesword(float);&lt;br /&gt;
hitplayer float, float, float, float;&lt;br /&gt;
                                hitplayer(float,float,float,float);&lt;br /&gt;
hurt float;&lt;br /&gt;
                                hurt(float);&lt;br /&gt;
insertstring oldstring, float, oldstring;&lt;br /&gt;
                                insertstring(string,float,string);&lt;br /&gt;
join oldstring;&lt;br /&gt;
                                join(string);&lt;br /&gt;
lay oldstring;&lt;br /&gt;
                                lay(string);&lt;br /&gt;
lay2 oldstring, float, float;&lt;br /&gt;
                                lay2(string,float,float);&lt;br /&gt;
loadmap oldstring;&lt;br /&gt;
                                loadmap(string);&lt;br /&gt;
message oldstring;&lt;br /&gt;
                                message(string);&lt;br /&gt;
move float, float, float, float;&lt;br /&gt;
                                move(float,float,float,float);&lt;br /&gt;
noplayerkilling;&lt;br /&gt;
                                noplayerkilling();&lt;br /&gt;
openurl oldstring;&lt;br /&gt;
                                openurl(string);&lt;br /&gt;
openurl2 oldstring, float, float;&lt;br /&gt;
                                openurl2(string,float,float);&lt;br /&gt;
play oldstring;&lt;br /&gt;
                                play(string);&lt;br /&gt;
play2 oldstring, float, float, float;&lt;br /&gt;
                                play2(string,float,float,float);&lt;br /&gt;
playlooped oldstring;&lt;br /&gt;
                                playlooped(string);&lt;br /&gt;
putbomb float, float, float;&lt;br /&gt;
                                putbomb(float,float,float);&lt;br /&gt;
putcomp oldstring, float, float;&lt;br /&gt;
                                putcomp(string,float,float);&lt;br /&gt;
putexplosion float, float, float;&lt;br /&gt;
                                putexplosion(float,float,float);&lt;br /&gt;
putexplosion2 float, float, float, float;&lt;br /&gt;
                                putexplosion2(float,float,float,float);&lt;br /&gt;
puthorse oldstring, float, float;&lt;br /&gt;
                                puthorse(string,float,float);&lt;br /&gt;
putleaps float, float, float;&lt;br /&gt;
                                putleaps(float,float,float);&lt;br /&gt;
putnewcomp oldstring, float, float, oldstring, float;&lt;br /&gt;
                                putnewcomp(string,float,float,string,float);&lt;br /&gt;
putnpc oldstring, oldstring, float, float;&lt;br /&gt;
                                putnpc(string,string,float,float);&lt;br /&gt;
putnpc2 float, float, oldstring;&lt;br /&gt;
                                putnpc2(float,float,string);&lt;br /&gt;
reflectarrow float;&lt;br /&gt;
                                reflectarrow(float);&lt;br /&gt;
removearrow float;&lt;br /&gt;
                                removearrow(float);&lt;br /&gt;
removebomb float;&lt;br /&gt;
                                removebomb(float);&lt;br /&gt;
removecompus;&lt;br /&gt;
                                removecompus();&lt;br /&gt;
removeexplo float;&lt;br /&gt;
                                removeexplo(float);&lt;br /&gt;
removehorse float;&lt;br /&gt;
                                removehorse(float);&lt;br /&gt;
rmeoveitem float;&lt;br /&gt;
                                removeitem(float)&lt;br /&gt;
removestring oldstring, oldstring;&lt;br /&gt;
                                removestring(string,string);&lt;br /&gt;
removetiledefs oldstring;&lt;br /&gt;
                                removetiledefs(string);&lt;br /&gt;
replaceani oldstring, oldstring;&lt;br /&gt;
                                replaceani(string,string);&lt;br /&gt;
replacestring oldstring, float, oldstring;&lt;br /&gt;
                                replacestring(string,float,string);&lt;br /&gt;
resetfocus;&lt;br /&gt;
                                resetfocus();&lt;br /&gt;
savelog oldstring;&lt;br /&gt;
                                savelog(string);&lt;br /&gt;
savelog2 oldstring, oldstring;&lt;br /&gt;
                                savelog2(string,string);&lt;br /&gt;
say float;&lt;br /&gt;
                                say(float);&lt;br /&gt;
say2 oldstring;&lt;br /&gt;
                                say2(string);&lt;br /&gt;
sendrpgmessage oldstring;&lt;br /&gt;
                                sendrpgmessage(string);&lt;br /&gt;
sendpm oldstring;&lt;br /&gt;
                                sendpm(string);&lt;br /&gt;
sendtonc oldstring;&lt;br /&gt;
                                sendtonc(string);&lt;br /&gt;
sendtorc oldstring;&lt;br /&gt;
                                sendtorc(string);&lt;br /&gt;
serverwarp oldstring;&lt;br /&gt;
                                serverwarp(string);&lt;br /&gt;
set oldstring;&lt;br /&gt;
                                set(string);&lt;br /&gt;
setani oldstring, oldstring;&lt;br /&gt;
                                setani(string,string);&lt;br /&gt;
setarray float, float;&lt;br /&gt;
                                setarray(var,float);&lt;br /&gt;
setbeltcolor oldstring;&lt;br /&gt;
                                setbeltcolor(string);&lt;br /&gt;
setbow oldstring;&lt;br /&gt;
                                setbow(string);&lt;br /&gt;
setcharani oldstring, oldstring;&lt;br /&gt;
                                setcharani(string,string);&lt;br /&gt;
setchargender oldstring;&lt;br /&gt;
                                setchargender(string);&lt;br /&gt;
setcharprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setcoatcolor oldstring;&lt;br /&gt;
                                setcoatcolor(string);&lt;br /&gt;
setcoloreffect float, float, float, float;&lt;br /&gt;
                                setcoloreffect(float,float,float,float);&lt;br /&gt;
setcursor float;&lt;br /&gt;
                                setcursor(float);&lt;br /&gt;
setcurcor2 oldstring;&lt;br /&gt;
                                setcursor2(string);&lt;br /&gt;
seteffect float, float, float, float;&lt;br /&gt;
                                seteffect(float,float,float,float);&lt;br /&gt;
seteffectmode float;&lt;br /&gt;
                                seteffectmode(float);&lt;br /&gt;
setfocus float, float;&lt;br /&gt;
                                setfocus(float,float);&lt;br /&gt;
setgender oldstring;&lt;br /&gt;
                                setgender(string);&lt;br /&gt;
sethead oldstring;&lt;br /&gt;
                                sethead(string);&lt;br /&gt;
setlevel oldstring;&lt;br /&gt;
                                setlevel(string);&lt;br /&gt;
setlevel2 oldstring, float, float;&lt;br /&gt;
                                setlevel2(string,float,float);&lt;br /&gt;
setmap oldstring, oldstring, float, float;&lt;br /&gt;
                                setmap(string,string,float,float);&lt;br /&gt;
setminimap oldstring, oldstring, float, float;&lt;br /&gt;
                                setminimap(string,string,float,float);&lt;br /&gt;
setmusicvolume float, float;&lt;br /&gt;
                                setmusicvolume(float,float);&lt;br /&gt;
setimg oldstring;&lt;br /&gt;
                                setimg(string);&lt;br /&gt;
setimgpart oldstring, float, float, float, float;&lt;br /&gt;
                                setimgpart(string,float,float,float,float);&lt;br /&gt;
setletters oldstring;&lt;br /&gt;
                                setletters(string);&lt;br /&gt;
setplayerdir oldstring;&lt;br /&gt;
                                setplayerdir(string);&lt;br /&gt;
setplayerprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setpm oldstring;&lt;br /&gt;
                                setpm(string);&lt;br /&gt;
setshape float, float, float;&lt;br /&gt;
                                setshape(float,float,float);&lt;br /&gt;
setshape2 float, float, float;&lt;br /&gt;
                                setshape2(float,float,float);&lt;br /&gt;
setshield oldstring, float;&lt;br /&gt;
                                setshield(string,float);&lt;br /&gt;
setshoecolor oldstring;&lt;br /&gt;
                                setshoecolor(string);&lt;br /&gt;
setshootparams oldstring;&lt;br /&gt;
                                setshootparams(string);&lt;br /&gt;
setskincolor oldstring;&lt;br /&gt;
                                setskincolor(string);&lt;br /&gt;
setsleevecolor oldstring;&lt;br /&gt;
                                setsleevecolor(string);&lt;br /&gt;
setstring oldstring, oldstring;&lt;br /&gt;
                                setstring(string,string);&lt;br /&gt;
setsword oldstring, float;&lt;br /&gt;
                                setsword(string,float);&lt;br /&gt;
seturllevel oldstring;&lt;br /&gt;
                                seturllevel(string);&lt;br /&gt;
setz float, float, float, float, float, float, float, float;&lt;br /&gt;
                                setz(float,float,float,float,float,float,float,float);&lt;br /&gt;
setzoomeffect float;&lt;br /&gt;
                                setzoomeffect(float);&lt;br /&gt;
shoot float, float, float, float, float, float, oldstring, oldstring;&lt;br /&gt;
                                shoot(float,float,float,float,float,float,string,string);&lt;br /&gt;
shootarrow float;&lt;br /&gt;
                                shootarrow(float);&lt;br /&gt;
shootball;&lt;br /&gt;
                                shootball();&lt;br /&gt;
shootfireball float;&lt;br /&gt;
                                shootfireball(float);&lt;br /&gt;
shootfireblast float;&lt;br /&gt;
                                shootfireblast(float);&lt;br /&gt;
shootnuke float;&lt;br /&gt;
                                shootnuke(float);&lt;br /&gt;
show;&lt;br /&gt;
                                show();&lt;br /&gt;
showani float, float, float, float, oldstring;&lt;br /&gt;
                                showani(float,float,float,float,string);&lt;br /&gt;
showani2 float, float, float, float, float, oldstring;&lt;br /&gt;
                                showani2(float,float,float,float,float,string);&lt;br /&gt;
showcharacter;&lt;br /&gt;
                                showcharacter();&lt;br /&gt;
showfile oldstring;&lt;br /&gt;
                                showfile(string);&lt;br /&gt;
showimg float, oldstring, float, float;&lt;br /&gt;
                                showimg(float,string,float,float);&lt;br /&gt;
showimg2 float, oldstring, float, float, float;&lt;br /&gt;
                                showimg2(float,string,float,float,float);&lt;br /&gt;
showlocal;&lt;br /&gt;
                                showlocal();&lt;br /&gt;
&lt;br /&gt;
showpoly float, float;&lt;br /&gt;
                                showpoly(float,array);&lt;br /&gt;
showpoly2 float, float;&lt;br /&gt;
                                showpoly2(float,array);&lt;br /&gt;
showstats float;&lt;br /&gt;
                                showstats(float);&lt;br /&gt;
showtext float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext(float,float,float,string,string,string);&lt;br /&gt;
showtext2 float, float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext2(float,float,float,float,string,string,string);&lt;br /&gt;
sleep float;&lt;br /&gt;
                                sleep(float);&lt;br /&gt;
spyfire float, float;&lt;br /&gt;
                                spyfire(float,float);&lt;br /&gt;
stopmidi;&lt;br /&gt;
                                stopmidi();&lt;br /&gt;
stopsound oldstring;&lt;br /&gt;
                                stopsound(string);&lt;br /&gt;
take oldstring;&lt;br /&gt;
                                take(string);&lt;br /&gt;
take2 float;&lt;br /&gt;
                                take2(float);&lt;br /&gt;
takehorse float;&lt;br /&gt;
                                takehorse(float);&lt;br /&gt;
takeplayercarry;&lt;br /&gt;
                                takeplayercarry();&lt;br /&gt;
takeplayerhorse;&lt;br /&gt;
                                takeplayerhorse();&lt;br /&gt;
throwcarry;&lt;br /&gt;
                                throwcarry();&lt;br /&gt;
timereverywhere;&lt;br /&gt;
                                timereverywhere();&lt;br /&gt;
timershow;&lt;br /&gt;
                                timershow();&lt;br /&gt;
toinventory oldstring;&lt;br /&gt;
                                toinventory(string);&lt;br /&gt;
tokenize oldstring;&lt;br /&gt;
                                tokens = string.tokenize();&lt;br /&gt;
tokenize2 oldstring, oldstring;&lt;br /&gt;
                                tokens = string.tokenize(&amp;quot; ,&amp;quot; @ string);&lt;br /&gt;
toweapons oldstring;&lt;br /&gt;
                                toweapons(string);&lt;br /&gt;
triggeraction float, float, oldstring, oldstring;&lt;br /&gt;
                                triggeraction(float,float,string,string);&lt;br /&gt;
unfreezeplayer;&lt;br /&gt;
                                unfreezeplayer();&lt;br /&gt;
unset oldstring;&lt;br /&gt;
                                unset(string);&lt;br /&gt;
updateboard float, float, float, float;&lt;br /&gt;
                                updateboard(float,float,float,float);&lt;br /&gt;
updateterrain;&lt;br /&gt;
                                updateterrain();&lt;br /&gt;
wraptext float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext(float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
wraptext2 float, float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext2(float,float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Supported old string operations ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
These old string operators can be used in string parameters&lt;br /&gt;
for the old commands, also you can use them directly as operators, e.g.&lt;br /&gt;
#c = &amp;quot;hello&amp;quot;&lt;br /&gt;
is actually doing&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#a            player.account&lt;br /&gt;
#a(float)     players[float].account&lt;br /&gt;
#m            player.ani&lt;br /&gt;
              ani&lt;br /&gt;
#m(float)     players[float].ani&lt;br /&gt;
#K(float)     char(float)&lt;br /&gt;
#8            player.bodyimg&lt;br /&gt;
              bodyimg&lt;br /&gt;
#8(float)     players[float].bodyimg&lt;br /&gt;
#c            player.chat&lt;br /&gt;
              chat&lt;br /&gt;
#c(float)     players[float].chat&lt;br /&gt;
#C0           player.colors[0]&lt;br /&gt;
              colors[0]&lt;br /&gt;
#C0(float)    players[float].colors[0]&lt;br /&gt;
#C1           player.colors[1]&lt;br /&gt;
              colors[1]&lt;br /&gt;
#C1(float)    players[float].colors[1]&lt;br /&gt;
#C2           player.colors[2]&lt;br /&gt;
              colors[2]&lt;br /&gt;
#C2(float)    players[float].colors[2]&lt;br /&gt;
#C3           player.colors[3]&lt;br /&gt;
              colors[3]&lt;br /&gt;
#C3(float)    players[float].colors[3]&lt;br /&gt;
#C4           player.colors[4]&lt;br /&gt;
              colors[4]&lt;br /&gt;
#C4(float)    players[float].colors[4]&lt;br /&gt;
#C5           player.colors[5]&lt;br /&gt;
              colors[5]&lt;br /&gt;
#C5(float)    players[float].colors[5]&lt;br /&gt;
#D            downloadfile()&lt;br /&gt;
#E            emoticonchar()&lt;br /&gt;
#e(float,float,oldstring)&lt;br /&gt;
              string.substring(float,float)&lt;br /&gt;
#g            player.guild&lt;br /&gt;
              guild&lt;br /&gt;
#g(float)     players[float].guild&lt;br /&gt;
#3            player.headimg&lt;br /&gt;
              headimg&lt;br /&gt;
#3(float)     players[float].headimg&lt;br /&gt;
#5            player.horseimg&lt;br /&gt;
              horseimg&lt;br /&gt;
#5(float)     players[float].horseimg&lt;br /&gt;
#k(float)     keyname(float)&lt;br /&gt;
#L            player.level&lt;br /&gt;
#I(oldstring,float)&lt;br /&gt;
              getstring(string)[float]&lt;br /&gt;
#n            player.nick&lt;br /&gt;
              nick&lt;br /&gt;
#n(float)     players[float].nick&lt;br /&gt;
#f            image&lt;br /&gt;
#f(float)     npcs[float].image&lt;br /&gt;
#F            level&lt;br /&gt;
#p(float)     params[float]&lt;br /&gt;
#P(float)     player.attr[float]&lt;br /&gt;
              attr[float]&lt;br /&gt;
#P(float_1,float_2)&lt;br /&gt;
              players[float_2].attr[float_1]&lt;br /&gt;
#P1           player.attr[1]&lt;br /&gt;
              attr[1]&lt;br /&gt;
#P1(float)    players[float].attr[1]&lt;br /&gt;
#P2           player.attr[2]&lt;br /&gt;
              attr[2]&lt;br /&gt;
#P2(float)    players[float].attr[2]&lt;br /&gt;
#P3           player.attr[3]&lt;br /&gt;
              attr[3]&lt;br /&gt;
#P3(float)    players[float].attr[3]&lt;br /&gt;
#P4           player.attr[4]&lt;br /&gt;
              attr[4]&lt;br /&gt;
#P4(float)    players[float].attr[4]&lt;br /&gt;
#P5           player.attr[5]&lt;br /&gt;
              attr[5]&lt;br /&gt;
#P5(float)    players[float].attr[5]&lt;br /&gt;
#P6           player.attr[6]&lt;br /&gt;
              attr[6]&lt;br /&gt;
#P6(float)    players[float].attr[6]&lt;br /&gt;
#P7           player.attr[7]&lt;br /&gt;
              attr[7]&lt;br /&gt;
#P7(float)    players[float].attr[7]&lt;br /&gt;
#P8           player.attr[8]&lt;br /&gt;
              attr[8]&lt;br /&gt;
#P8(float)    players[float].attr[8]&lt;br /&gt;
#P9           player.attr[9]&lt;br /&gt;
              attr[9]&lt;br /&gt;
#P9(float)    players[float].attr[9]&lt;br /&gt;
#R(oldstring) string.random()&lt;br /&gt;
#2            player.shieldimg&lt;br /&gt;
              shieldimg&lt;br /&gt;
#2(float)     players[float].shieldimg&lt;br /&gt;
#s(oldstring) getstring(string)&lt;br /&gt;
#1            player.swordimg&lt;br /&gt;
              swordimg&lt;br /&gt;
#1(float)     players[float].swordimg&lt;br /&gt;
#S            player.sword.script&lt;br /&gt;
#t(float)     tokens[float]&lt;br /&gt;
#T(oldstring) string.trim()&lt;br /&gt;
#v(float)     float&lt;br /&gt;
#W            player.weapon.image&lt;br /&gt;
#W(float)     weapons[float].image&lt;br /&gt;
#w            player.weapon.name&lt;br /&gt;
#w(float)     weapons[float].name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Compatibility note:&lt;br /&gt;
When you use the command setcharprop then the first parameter&lt;br /&gt;
is handled differently: instead of changing 'player.chat' it&lt;br /&gt;
is changing 'chat', the chat text of the npc. So 'setcharprop #c,hello'&lt;br /&gt;
would be translated into&lt;br /&gt;
chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
while 'setplayerprop #c,hello' is translated into&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
In the list above both possibilities are listed.&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript&amp;diff=5098</id>
		<title>Creation/Dev/GScript</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript&amp;diff=5098"/>
		<updated>2005-12-02T21:00:30Z</updated>

		<summary type="html">&lt;p&gt;Chad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''GScript''' is [[Graal]]'s scripting language.&lt;br /&gt;
&lt;br /&gt;
Its syntax and some of its semantics might seem familiar to those who program in [[WikiPedia:C (Programming Language) | C]] or derived languages, although it lacks some of the expressivity of a real programming language and has special constructs that make programming [[Graal]] [[NPC]]s easier.&lt;br /&gt;
&lt;br /&gt;
GScript started as a very limited language and has since kept up with improvements to the game engine and can now be used for pretty sophisticated scripts that greatly customise the gaming experience.&lt;br /&gt;
&lt;br /&gt;
It is used, with minor differences, for [[Clientside]] tasks like [[GUI | GUI programming]], special effects with nifty 3d lighting and custom [[NPC weapon|NPC Weapons]] or &amp;amp;quot;engines&amp;amp;quot;, and [[Serverside]] systems like player housing, complex baddies or pets.&lt;br /&gt;
&lt;br /&gt;
[[Old GScript]] has been replaced by a new version (dubbed GScript2 during development) that is rather advanced, in some way object oriented, and thanks to influence from [[Java]] and [[Torque]]'s scripting language, less brain-damaged in some aspects. No offense intended.&lt;br /&gt;
&lt;br /&gt;
GScript can be discussed in the [[GScript IRC channel]].&lt;br /&gt;
&lt;br /&gt;
[[Script Functions: Client]]&lt;br /&gt;
&lt;br /&gt;
[[Script Functions: NPC Server]]&lt;br /&gt;
&lt;br /&gt;
[[Script Functions: Graal 3D]]&lt;br /&gt;
&lt;br /&gt;
[[Graal v4 IRC|Graal IRC Scripting: Graal v4 IRC Scripting Reference]]&lt;br /&gt;
&lt;br /&gt;
[[Troubleshooting Graal v4 IRC|Graal IRC Scripting: Troubleshooting Scripting Reference]]&lt;br /&gt;
&lt;br /&gt;
[[Particle Engine|Graal v4 Particle Engine]]&lt;br /&gt;
&lt;br /&gt;
[[GS1 To GS2|GS1 To GS2: Guide for fixing scripts to work with the new engine]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Why scripts ===&lt;br /&gt;
&lt;br /&gt;
Scripts bring life into objects and make it easy to &lt;br /&gt;
customize the game. Instead of just placing a stone&lt;br /&gt;
into your world, you can make it so that the stone&lt;br /&gt;
can be lifted or kicked. Instead of being limited to&lt;br /&gt;
some fixed player movement you can rescript it&lt;br /&gt;
to let the player jump, strafe and duck. To let the &lt;br /&gt;
player inspect and organize his/her items you can&lt;br /&gt;
create some dialogs and display those by script,&lt;br /&gt;
e.g. when the player presses a special key.&lt;br /&gt;
&lt;br /&gt;
In Graal the scripting is done in 'Graal Script',&lt;br /&gt;
it's looking like Java/C++, but brings some &lt;br /&gt;
additional features for making things easier&lt;br /&gt;
for game creators, while on the other hand&lt;br /&gt;
running in a sandbox and limiting access to&lt;br /&gt;
game-related stuff only.&lt;br /&gt;
&lt;br /&gt;
Graal Script is almost fully compatible to &lt;br /&gt;
the 'old' Graal script used in Graal v1.0 - 3.0,&lt;br /&gt;
and is partially compatible to Torque script. &lt;br /&gt;
&lt;br /&gt;
=== NPCs and 'weapons' ===&lt;br /&gt;
&lt;br /&gt;
There are generally two types of objects in Graal&lt;br /&gt;
which have scripts: The first type are the &lt;br /&gt;
non-player-characters (NPCs). The name 'NPC' is&lt;br /&gt;
actually used for all visible objects in the game: &lt;br /&gt;
monsters, stones, bushes, houses, ships, plants etc.&lt;br /&gt;
Scripts for npcs are most of the time containing&lt;br /&gt;
code for moving the npc or for reacting to &lt;br /&gt;
activities of the player, e.g. giving money to&lt;br /&gt;
the player when he grabs the npc.&lt;br /&gt;
The other type of script-holding objects are the&lt;br /&gt;
'weapons'. Those are items in the inventory of&lt;br /&gt;
the player, not necessary being weapons. Most of&lt;br /&gt;
the time they are actually just scripts which&lt;br /&gt;
control the movement of the player, display weapon&lt;br /&gt;
graphics, or display menus.&lt;br /&gt;
&lt;br /&gt;
So there are objects in the game which have &lt;br /&gt;
their own script, and players which have a set&lt;br /&gt;
of scripts in their invisible backpack.&lt;br /&gt;
&lt;br /&gt;
=== Server-side and client-side ===&lt;br /&gt;
&lt;br /&gt;
Graal is an online game, and there are differences&lt;br /&gt;
to standard scripting in offline games.&lt;br /&gt;
In offline programs you have access to everything,&lt;br /&gt;
anytime. In online games everything is divided&lt;br /&gt;
into two parts: the server-side which controls&lt;br /&gt;
most things in the game, and the client-side which&lt;br /&gt;
displays the game to the player.&lt;br /&gt;
Since the client only displays things, it is not&lt;br /&gt;
possible to cheat by hacking the client. On client-side&lt;br /&gt;
you mainly have code for displaying special effects,&lt;br /&gt;
for displaying the GUI (windows, status bars, item menus),&lt;br /&gt;
playing sound effects and music. Also the player &lt;br /&gt;
movement is done on client-side.&lt;br /&gt;
On the server-side scripts are used to do the more&lt;br /&gt;
secure parts of the game engine,&lt;br /&gt;
and things that are the same for all players -&lt;br /&gt;
npcs are added, moved, npcs interact with players,&lt;br /&gt;
the stats of the players are calculated, the&lt;br /&gt;
communication between players is handled.&lt;br /&gt;
&lt;br /&gt;
All scripts for npcs and weapons can contain&lt;br /&gt;
server-side code and client-side code. The server-side&lt;br /&gt;
code is executed directly on the server, the&lt;br /&gt;
client-side code is sent to the client when he/she&lt;br /&gt;
logins and executed separately for each player on&lt;br /&gt;
their own computer. Usually the two parts of the script&lt;br /&gt;
are divided by line that only contains &amp;quot;//#CLIENTSIDE&amp;quot;,&lt;br /&gt;
like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// Server-side part which is setting the image&lt;br /&gt;
// of the npc when it is created&lt;br /&gt;
function onCreated() {&lt;br /&gt;
  setimg(&amp;quot;door.png&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
&lt;br /&gt;
// Here follows the client-side part,&lt;br /&gt;
// which plays a sound effect when the player&lt;br /&gt;
// touchs the npc&lt;br /&gt;
function onPlayerTouchsme() {&lt;br /&gt;
  play(&amp;quot;chest.wav&amp;quot;);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
&lt;br /&gt;
In general scripts are made for reacting to &lt;br /&gt;
events - when the npc is created then the script&lt;br /&gt;
initializes the attributes of the npc,&lt;br /&gt;
when the player says something then the npc is&lt;br /&gt;
moving to the player, when the player grabs the&lt;br /&gt;
npc then the npc is giving the player some money etc.&lt;br /&gt;
So the script is basicly a collection of actions&lt;br /&gt;
that are done when special events are happening.&lt;br /&gt;
Events can e.g. be the &amp;quot;created&amp;quot; event when the npc&lt;br /&gt;
is created, the &amp;quot;playertouchsme&amp;quot; event when the &lt;br /&gt;
player touchs the npc, or the &amp;quot;playerchats&amp;quot; event&lt;br /&gt;
when the player says something. To write code that reacts&lt;br /&gt;
to one of those event, you define an event&lt;br /&gt;
function like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function onEVENTNAME() {&lt;br /&gt;
  // actions&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the event is happening, then Graal executes&lt;br /&gt;
that scripting function and all commands you &lt;br /&gt;
have added there.&lt;br /&gt;
Sometimes the event gives some parameters to the &lt;br /&gt;
event function, then change your function to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function onEVENTNAME(parameter1, parameter2, ...) {&lt;br /&gt;
  // actions&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By accessing 'parameter1' etc. (you can name&lt;br /&gt;
them differently) you can react to the event more&lt;br /&gt;
exactly. &lt;br /&gt;
&lt;br /&gt;
Instead of reacting to events, the npcs and&lt;br /&gt;
weapons can also invoke new events. That way &lt;br /&gt;
you can let other npcs doing things. You also&lt;br /&gt;
need that if you want to coninuously doing things -&lt;br /&gt;
use timeout events for that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated() {&lt;br /&gt;
  setTimer(1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function onTimeout() {&lt;br /&gt;
  // actions&lt;br /&gt;
  setTimer(1);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the onCreated event function the script is&lt;br /&gt;
setting the timer to 1 second. When that second is&lt;br /&gt;
over, then the &amp;quot;timeout&amp;quot; event is invoked on the&lt;br /&gt;
npc and the onTimeout event function is executed.&lt;br /&gt;
Because it is setting the timer to 1 second&lt;br /&gt;
again, the onTimeout event will occur again after&lt;br /&gt;
one second, and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compatibility note:&lt;br /&gt;
In older Graal scripts you will also find the&lt;br /&gt;
deprecated way of receiving events:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;if (EVENTNAME) {&lt;br /&gt;
  // actions&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is an if-command outside of any brackets. If&lt;br /&gt;
Graal sees that you use such an if-command, then&lt;br /&gt;
it will execute the whole script so that the actions&lt;br /&gt;
you have written inside the if-command will be&lt;br /&gt;
executed too.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
=== Accessing variables ===&lt;br /&gt;
&lt;br /&gt;
Graal Script variables are 'variant', that means they are objects&lt;br /&gt;
that hold values of different types.&lt;br /&gt;
When you assign a value to the variable then it automatically&lt;br /&gt;
switches to the right type:&lt;br /&gt;
&lt;br /&gt;
Numeric (floating point):&lt;br /&gt;
  var = 1;&lt;br /&gt;
String (text):&lt;br /&gt;
  var = &amp;quot;hello&amp;quot;;&lt;br /&gt;
Object link:&lt;br /&gt;
  var = player;&lt;br /&gt;
Array (list of objects):&lt;br /&gt;
  var = {1,2,3};&lt;br /&gt;
&lt;br /&gt;
You can check the current type with the&lt;br /&gt;
type()-function - obj.type() returns&lt;br /&gt;
0,1,2,3 for numeric, string, object or array.&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Addition                  a + b&lt;br /&gt;
Substraction              a - b&lt;br /&gt;
Mulitplication            a * b&lt;br /&gt;
Division                  a / b&lt;br /&gt;
Modulus                   a % b&lt;br /&gt;
Power                     a ^ b&lt;br /&gt;
String Concationation     a @ b&lt;br /&gt;
    with space            a SPC b&lt;br /&gt;
    with newline          a NL b&lt;br /&gt;
    with tabulator        a TAB b&lt;br /&gt;
Bool-And                  a &amp;amp;&amp;amp; b&lt;br /&gt;
Bool-Or                   a || b&lt;br /&gt;
Bool-Not                  !a&lt;br /&gt;
Negative                  -a&lt;br /&gt;
Equal                     a == b&lt;br /&gt;
Not-Equal                 a != b&lt;br /&gt;
Less                      a &amp;lt; b&lt;br /&gt;
Greater                   a &amp;gt; b&lt;br /&gt;
Less-Equal                a &amp;lt;= b,  a =&amp;lt; b&lt;br /&gt;
Greater-Equal             a &amp;gt;= b,  a =&amp;gt; b&lt;br /&gt;
In-Range                  a in &amp;lt;b,c&amp;gt;, a in |b,c&amp;gt;, a in &amp;lt;b,c|, a in |b,c|&lt;br /&gt;
In-Array                  a in {b,c,...}, {a,b,...} in {c,d,...}&lt;br /&gt;
Bitwise-Or                a | b&lt;br /&gt;
Bitwise-And               a &amp;amp; b&lt;br /&gt;
Bitwise-Shift left        a &amp;lt;&amp;lt; b&lt;br /&gt;
Bitwise-Shift right       a &amp;gt;&amp;gt; b&lt;br /&gt;
Bitwise-Invert            ~a&lt;br /&gt;
Bitwise-Xor               a xor b (operator ^ already used for power)&lt;br /&gt;
Array-Constructor         {a,b,...}&lt;br /&gt;
Empty Array               new [count], new[countdim1][countdim2]...&lt;br /&gt;
Array Member              a[index]&lt;br /&gt;
Function call             a(), a(b,c,...)&lt;br /&gt;
Object Attribute          a.b, a.(b)&lt;br /&gt;
Post Increment            a++&lt;br /&gt;
Post Decrement            a--&lt;br /&gt;
Pre Increment             ++a&lt;br /&gt;
Pre Decrement             --a&lt;br /&gt;
Old String Function       #a&lt;br /&gt;
Conditional               a? b : c&lt;br /&gt;
Assignment                a = b, a := b&lt;br /&gt;
Additive Assignment       a += b&lt;br /&gt;
Substractive Assignment   a -= b&lt;br /&gt;
Multiplicative Assignment a *= b&lt;br /&gt;
Division Assignment       a /= b&lt;br /&gt;
Modulus Assignment        a %= b&lt;br /&gt;
Power Assignment          a ^= b&lt;br /&gt;
Bitwise-Or Assignment     a |= b&lt;br /&gt;
Bitwise-And Assignment    a &amp;amp;= b&lt;br /&gt;
Shift Left Assignment     a &amp;lt;&amp;lt;= b&lt;br /&gt;
Shift Right Assignment    a &amp;gt;&amp;gt;= b&lt;br /&gt;
String Append             a @= b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Standard object functions ===&lt;br /&gt;
&lt;br /&gt;
For a complete list of functions and attributes of objects&lt;br /&gt;
see docu_graalscriptfunctions.txt. The base type of all&lt;br /&gt;
objects is &amp;quot;TGraalVar&amp;quot;. You can also get the latest list by&lt;br /&gt;
calling the executale with &amp;quot;-listscriptfunctions&amp;quot; as &lt;br /&gt;
command-line parameter. &lt;br /&gt;
Here only some of the built-in functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
obj.type()  - gets the type of the var (float 0, string 1, object 2, array 3)&lt;br /&gt;
obj.length() - string length&lt;br /&gt;
obj.trim() - removes spaces from the front and back of a string&lt;br /&gt;
obj.lower() - converts a string to lower case&lt;br /&gt;
obj.upper() - converts a string to upper case&lt;br /&gt;
obj.tokenize([delimiters])&lt;br /&gt;
obj.charat(pos)&lt;br /&gt;
obj.pos(substring)&lt;br /&gt;
obj.starts(string)&lt;br /&gt;
obj.ends(string)&lt;br /&gt;
obj.substring(index[,length])&lt;br /&gt;
obj.size() - array length&lt;br /&gt;
obj.subarray(index[,length])&lt;br /&gt;
obj.addarray(obj2)&lt;br /&gt;
obj.insertarray(index,obj2)&lt;br /&gt;
obj.index(obj2) - position of obj2 in the array&lt;br /&gt;
obj.clear()&lt;br /&gt;
obj.add(obj2)&lt;br /&gt;
obj.delete(index)&lt;br /&gt;
obj.remove(obj2)&lt;br /&gt;
obj.replace(index,obj2)&lt;br /&gt;
obj.insert(index,obj2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Standard functions ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
format(format,parameters,...) - formats a &amp;quot;%s %d&amp;quot; string, inserts the parameters, and returns a string&lt;br /&gt;
int(a)&lt;br /&gt;
abs(a)&lt;br /&gt;
random(rangestart,rangeend)&lt;br /&gt;
sin(a)&lt;br /&gt;
cos(a)&lt;br /&gt;
arctan(a)&lt;br /&gt;
exp(a)&lt;br /&gt;
log(base,a)&lt;br /&gt;
min(a,b)&lt;br /&gt;
max(a,b)&lt;br /&gt;
getangle(delta x,delta y)&lt;br /&gt;
getdir(delta x,delta y) - returns 0 for up, 1 for left, 2 for down, 3 for right&lt;br /&gt;
vecx(direction)&lt;br /&gt;
vecy(direction)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
&lt;br /&gt;
=== GUI controls ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onAdd() when added to the parent&lt;br /&gt;
onRemove() when removed from the parent&lt;br /&gt;
onWake() when activated&lt;br /&gt;
onSleep() when deactivated&lt;br /&gt;
onResize(w,h)&lt;br /&gt;
onMove(x,y)&lt;br /&gt;
onMouseEnter(modifier,x,y,clickcount)&lt;br /&gt;
onMouseLeave(modifier,x,y,clickcount)&lt;br /&gt;
onMouseDown(modifier,x,y,clickcount)&lt;br /&gt;
onMouseUp(modifier,x,y,clickcount)&lt;br /&gt;
onMouseDragged(modifier,x,y,clickcount)&lt;br /&gt;
onMouseMove(modifier,x,y,clickcount)&lt;br /&gt;
onRightMouseDown(modifier,x,y,clickcount)&lt;br /&gt;
onRightMouseUp(modifier,x,y,clickcount)&lt;br /&gt;
onRightMouseDragged(modifier,x,y,clickcount)&lt;br /&gt;
onMouseWheelUp(modifier,x,y,clickcount)&lt;br /&gt;
onMouseWheelDown(modifier,x,y,clickcount)&lt;br /&gt;
onKeyDown(keycode,string)&lt;br /&gt;
onKeyUp(keycode,string)&lt;br /&gt;
onKeyRepeat(keycode,string)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiMLTextCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onReflow(w,h) when the text has changed&lt;br /&gt;
onURL(url) when clicked on url&lt;br /&gt;
onSelectTag(tagid) when clicked on an image&lt;br /&gt;
&lt;br /&gt;
Text-Tags:&lt;br /&gt;
The text of multi-line text controls can contain&lt;br /&gt;
a few HTML-tags and Torque-tags, you can use both&lt;br /&gt;
of those tag types to define colors and fonts&lt;br /&gt;
or to include images. Currently following tags&lt;br /&gt;
are available:&lt;br /&gt;
&lt;br /&gt;
HTML:&lt;br /&gt;
&amp;lt;a href=url&amp;gt; text &amp;lt;/a&amp;gt; - when the user clicks on 'text' then &lt;br /&gt;
  a web browser is opened for the specified url&lt;br /&gt;
&amp;lt;body bgcolor=colorname or #rrggbb&amp;gt; - sets the background color&lt;br /&gt;
&amp;lt;br&amp;gt; - line break&lt;br /&gt;
&amp;lt;center&amp;gt; text &amp;lt;/center&amp;gt; - centers the contained text&lt;br /&gt;
&amp;lt;font face=fontname size=textsize color=colorname or #rrggbb&amp;gt; text &amp;lt;/font&amp;gt;&lt;br /&gt;
  - draws text with a special font, size and color; you only&lt;br /&gt;
  need to define one of those 3 attributes&lt;br /&gt;
&amp;lt;ignorelinebreaks&amp;gt; &amp;lt;/ignorelinebreaks&amp;gt; - go into normal HTML mode where&lt;br /&gt;
  you need to insert &amp;lt;br&amp;gt; to do a linebreak&lt;br /&gt;
&amp;lt;img src=filename id=integer&amp;gt; - an image is displayed, you &lt;br /&gt;
  can also specify a tagid if you want to get onSelectTag-events&lt;br /&gt;
  for this image&lt;br /&gt;
&amp;lt;p align=left/center/right&amp;gt; text &amp;lt;/p&amp;gt; - sets the align of the &lt;br /&gt;
  contained text&lt;br /&gt;
&amp;lt;span style=&amp;quot;width=100; height=100;&amp;quot; id=integer&amp;gt; &amp;lt;/span&amp;gt; - for &lt;br /&gt;
  displaying a subpage, you can also specifiy an id for &lt;br /&gt;
  onSelectTag-events; instead of &amp;lt;span&amp;gt; you can also use &amp;lt;div&amp;gt; tags&lt;br /&gt;
&lt;br /&gt;
Torque:&lt;br /&gt;
&amp;lt;a:url&amp;gt; text &amp;lt;/a&amp;gt; - when the user clicks on 'text' then &lt;br /&gt;
  a web browser is opened for the specified url&lt;br /&gt;
&amp;lt;bitmap:filename&amp;gt; - an image is displayed&lt;br /&gt;
&amp;lt;color:rrggbb&amp;gt; - sets the color of the text (hexadecimal value)&lt;br /&gt;
&amp;lt;lmargin:pixels&amp;gt; - sets the left margin for the text&lt;br /&gt;
&amp;lt;lmargin%:percent&amp;gt; - sets the size of the left margin depending &lt;br /&gt;
  on the width of the whole control&lt;br /&gt;
&amp;lt;linkcolor:rrggbb&amp;gt; - sets the color of links (the &amp;lt;a&amp;gt;-tag)&lt;br /&gt;
&amp;lt;linkcolorhl:rrggbb&amp;gt; - sets the highlighted color, when&lt;br /&gt;
  the user moves the mouse over a link&lt;br /&gt;
&amp;lt;just:left/center/right&amp;gt; - sets the align of the following text&lt;br /&gt;
&amp;lt;rmargin:pixels&amp;gt; - sets the right margin for the text&lt;br /&gt;
&amp;lt;rmargin%:percent&amp;gt; - sets the size of the right margin depending &lt;br /&gt;
  on the width of the whole control&lt;br /&gt;
&amp;lt;sbreak&amp;gt; - line break&lt;br /&gt;
&amp;lt;spush&amp;gt; - switches to a new style (like &amp;lt;font&amp;gt;)&lt;br /&gt;
&amp;lt;spop&amp;gt; - switches back to the last saved style (like &amp;lt;/font&amp;gt;)&lt;br /&gt;
&amp;lt;tab:tab1,tab2,..&amp;gt; - sets the position of where tabulators should&lt;br /&gt;
  be displayed if you have text like 'Apple \t Egg \t Chicken'&lt;br /&gt;
&amp;lt;tag:id&amp;gt; - inserts an invisible tag which can be used&lt;br /&gt;
  for the scrollToTag(id) function (beside image-tags)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== GuiTextEditCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onTabComplete()&lt;br /&gt;
onAction(text) when return key pressed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiTextListCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onSelect(id,text) when row selected&lt;br /&gt;
onDblClick(id) when double-click on row or return key pressed&lt;br /&gt;
onDeleteKey(id) when delete key pressed&lt;br /&gt;
onIconResized(w,h) when setIconSize() called&lt;br /&gt;
onOpenMenu(0,index,text) when an item was right-clicked&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiPopUpMenuCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onSelect(id,text) when menu option choosen&lt;br /&gt;
onCancel() when menu is closed without action&lt;br /&gt;
onOpenMenu(0,index,text) when an item was right-clicked&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiMenuBar: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onMenuSelect(menuid,menutext)&lt;br /&gt;
onMenuItemSelect(menuid,menutext,itemid,itemtext)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiTreeViewCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onSelect(id,rightmouse) when row selected&lt;br /&gt;
onUnselect(id) when row de-selected&lt;br /&gt;
onInspect(id) when clicked on the name of an item&lt;br /&gt;
onOpenMenu(0,index,text) when an item was right-clicked&lt;br /&gt;
onContextMenu(&amp;quot;x y&amp;quot;,id) when clicked with right-mouse key on row&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Old script compatibility ==&lt;br /&gt;
&lt;br /&gt;
=== Removed functionality ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- toinventory&lt;br /&gt;
- followplayer&lt;br /&gt;
- playersays()&lt;br /&gt;
- setbackpal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Supported old scripting commands and their mapping to new script ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
addstring oldstring, oldstring;&lt;br /&gt;
                                addstring(string,string);&lt;br /&gt;
addtiledef oldstring, oldstring, float;&lt;br /&gt;
                                addtiledef(string,string,float);&lt;br /&gt;
addtiledef2 oldstring, oldstring, float, float;&lt;br /&gt;
                                addtiledef2(string,string,float,float);&lt;br /&gt;
attachplayertoobj float, float;&lt;br /&gt;
                                attachplayertoobj(float,float);&lt;br /&gt;
blockagain;&lt;br /&gt;
                                blockagain();&lt;br /&gt;
blockagainlocal;&lt;br /&gt;
                                blockagainlocal();&lt;br /&gt;
callnpc float, oldstring;&lt;br /&gt;
                                callnpc(float,string);&lt;br /&gt;
callweapon float, oldstring;&lt;br /&gt;
                                callweapon(float,string);&lt;br /&gt;
canbecarried;&lt;br /&gt;
                                canbecarried();&lt;br /&gt;
canbepulled;&lt;br /&gt;
                                canbepulled();&lt;br /&gt;
canbepushed;&lt;br /&gt;
                                canbepushed();&lt;br /&gt;
cannotbecarried;&lt;br /&gt;
                                cannotbecarried();&lt;br /&gt;
cannotbepulled;&lt;br /&gt;
                                cannotbepulled();&lt;br /&gt;
cannotbepushed;&lt;br /&gt;
                                cannotbepushed();&lt;br /&gt;
canwarp;&lt;br /&gt;
                                canwarp();&lt;br /&gt;
canwarp2;&lt;br /&gt;
                                canwarp2();&lt;br /&gt;
carryobject oldstring;&lt;br /&gt;
                                carryobject(string);&lt;br /&gt;
changeimgcolors float, float, float, float, float;&lt;br /&gt;
                                changeimgcolors(float,float,float,float,float);&lt;br /&gt;
changeimgmode float, float;&lt;br /&gt;
                                changeimgmode(float,float);&lt;br /&gt;
changeimgpart float, float, float, float, float;&lt;br /&gt;
                                changeimgpart(float,float,float,float,float);&lt;br /&gt;
changeimgvis float, float;&lt;br /&gt;
                                changeimgvis(float,float);&lt;br /&gt;
changeimgzoom float, float;&lt;br /&gt;
                                changeimgzoom(float,float);&lt;br /&gt;
deletestring oldstring, float;&lt;br /&gt;
                                deletestring(string,float);&lt;br /&gt;
destroy;&lt;br /&gt;
                                destroy();&lt;br /&gt;
detachplayer;&lt;br /&gt;
                                detachplayer();&lt;br /&gt;
disabledefmovement;&lt;br /&gt;
                                disabledefmovement();&lt;br /&gt;
disablemap;&lt;br /&gt;
                                disablemap();&lt;br /&gt;
disablepause;&lt;br /&gt;
                                disablepause();&lt;br /&gt;
disableselectweapons;&lt;br /&gt;
                                disableselectweapons();&lt;br /&gt;
disableweapons;&lt;br /&gt;
                                disableweapons();&lt;br /&gt;
dontblock;&lt;br /&gt;
                                dontblock();&lt;br /&gt;
dontblocklocal;&lt;br /&gt;
                                dontblocklocal();&lt;br /&gt;
drawaslight;&lt;br /&gt;
                                drawaslight();&lt;br /&gt;
drawoverplayer;&lt;br /&gt;
                                drawoverplayer();&lt;br /&gt;
drawunderplayer;&lt;br /&gt;
                                drawunderplayer();&lt;br /&gt;
enabledefmovement;&lt;br /&gt;
                                enabledefmovement();&lt;br /&gt;
enablefeatures float;&lt;br /&gt;
                                enablefeatures(float);&lt;br /&gt;
enablemap;&lt;br /&gt;
                                enablemap();&lt;br /&gt;
enablepause;&lt;br /&gt;
                                enablepause();&lt;br /&gt;
enableselectweapons;&lt;br /&gt;
                                enableselectweapons();&lt;br /&gt;
enableweapons;&lt;br /&gt;
                                enableweapons();&lt;br /&gt;
explodebomb float;&lt;br /&gt;
                                explodebomb(float);&lt;br /&gt;
followplayer;&lt;br /&gt;
                                followplayer();&lt;br /&gt;
freezeplayer float;&lt;br /&gt;
                                freezeplayer(float);&lt;br /&gt;
freezeplayer2;&lt;br /&gt;
                                freezeplayer2();&lt;br /&gt;
hide;&lt;br /&gt;
                                hide();&lt;br /&gt;
hideimg float;&lt;br /&gt;
                                hideimg(float);&lt;br /&gt;
hideimgs float, float;&lt;br /&gt;
                                hideimgs(float,float);&lt;br /&gt;
hidelocal;&lt;br /&gt;
                                hidelocal();&lt;br /&gt;
&lt;br /&gt;
hitcompu float, float, float, float;&lt;br /&gt;
                                hitcompu(float,float,float,float);&lt;br /&gt;
hitnpc float, float, float, float;&lt;br /&gt;
                                hitnpc(float,float,float,float);&lt;br /&gt;
hitobjects float, float, float;&lt;br /&gt;
                                hitobjects(float,float,float);&lt;br /&gt;
hideplayer float;&lt;br /&gt;
                                hideplayer(float);&lt;br /&gt;
hidesword float;&lt;br /&gt;
                                hidesword(float);&lt;br /&gt;
hitplayer float, float, float, float;&lt;br /&gt;
                                hitplayer(float,float,float,float);&lt;br /&gt;
hurt float;&lt;br /&gt;
                                hurt(float);&lt;br /&gt;
insertstring oldstring, float, oldstring;&lt;br /&gt;
                                insertstring(string,float,string);&lt;br /&gt;
join oldstring;&lt;br /&gt;
                                join(string);&lt;br /&gt;
lay oldstring;&lt;br /&gt;
                                lay(string);&lt;br /&gt;
lay2 oldstring, float, float;&lt;br /&gt;
                                lay2(string,float,float);&lt;br /&gt;
loadmap oldstring;&lt;br /&gt;
                                loadmap(string);&lt;br /&gt;
message oldstring;&lt;br /&gt;
                                message(string);&lt;br /&gt;
move float, float, float, float;&lt;br /&gt;
                                move(float,float,float,float);&lt;br /&gt;
noplayerkilling;&lt;br /&gt;
                                noplayerkilling();&lt;br /&gt;
openurl oldstring;&lt;br /&gt;
                                openurl(string);&lt;br /&gt;
openurl2 oldstring, float, float;&lt;br /&gt;
                                openurl2(string,float,float);&lt;br /&gt;
play oldstring;&lt;br /&gt;
                                play(string);&lt;br /&gt;
play2 oldstring, float, float, float;&lt;br /&gt;
                                play2(string,float,float,float);&lt;br /&gt;
playlooped oldstring;&lt;br /&gt;
                                playlooped(string);&lt;br /&gt;
putbomb float, float, float;&lt;br /&gt;
                                putbomb(float,float,float);&lt;br /&gt;
putcomp oldstring, float, float;&lt;br /&gt;
                                putcomp(string,float,float);&lt;br /&gt;
putexplosion float, float, float;&lt;br /&gt;
                                putexplosion(float,float,float);&lt;br /&gt;
putexplosion2 float, float, float, float;&lt;br /&gt;
                                putexplosion2(float,float,float,float);&lt;br /&gt;
puthorse oldstring, float, float;&lt;br /&gt;
                                puthorse(string,float,float);&lt;br /&gt;
putleaps float, float, float;&lt;br /&gt;
                                putleaps(float,float,float);&lt;br /&gt;
putnewcomp oldstring, float, float, oldstring, float;&lt;br /&gt;
                                putnewcomp(string,float,float,string,float);&lt;br /&gt;
putnpc oldstring, oldstring, float, float;&lt;br /&gt;
                                putnpc(string,string,float,float);&lt;br /&gt;
putnpc2 float, float, oldstring;&lt;br /&gt;
                                putnpc2(float,float,string);&lt;br /&gt;
reflectarrow float;&lt;br /&gt;
                                reflectarrow(float);&lt;br /&gt;
removearrow float;&lt;br /&gt;
                                removearrow(float);&lt;br /&gt;
removebomb float;&lt;br /&gt;
                                removebomb(float);&lt;br /&gt;
removecompus;&lt;br /&gt;
                                removecompus();&lt;br /&gt;
removeexplo float;&lt;br /&gt;
                                removeexplo(float);&lt;br /&gt;
removehorse float;&lt;br /&gt;
                                removehorse(float);&lt;br /&gt;
rmeoveitem float;&lt;br /&gt;
                                removeitem(float)&lt;br /&gt;
removestring oldstring, oldstring;&lt;br /&gt;
                                removestring(string,string);&lt;br /&gt;
removetiledefs oldstring;&lt;br /&gt;
                                removetiledefs(string);&lt;br /&gt;
replaceani oldstring, oldstring;&lt;br /&gt;
                                replaceani(string,string);&lt;br /&gt;
replacestring oldstring, float, oldstring;&lt;br /&gt;
                                replacestring(string,float,string);&lt;br /&gt;
resetfocus;&lt;br /&gt;
                                resetfocus();&lt;br /&gt;
savelog oldstring;&lt;br /&gt;
                                savelog(string);&lt;br /&gt;
savelog2 oldstring, oldstring;&lt;br /&gt;
                                savelog2(string,string);&lt;br /&gt;
say float;&lt;br /&gt;
                                say(float);&lt;br /&gt;
say2 oldstring;&lt;br /&gt;
                                say2(string);&lt;br /&gt;
sendrpgmessage oldstring;&lt;br /&gt;
                                sendrpgmessage(string);&lt;br /&gt;
sendpm oldstring;&lt;br /&gt;
                                sendpm(string);&lt;br /&gt;
sendtonc oldstring;&lt;br /&gt;
                                sendtonc(string);&lt;br /&gt;
sendtorc oldstring;&lt;br /&gt;
                                sendtorc(string);&lt;br /&gt;
serverwarp oldstring;&lt;br /&gt;
                                serverwarp(string);&lt;br /&gt;
set oldstring;&lt;br /&gt;
                                set(string);&lt;br /&gt;
setani oldstring, oldstring;&lt;br /&gt;
                                setani(string,string);&lt;br /&gt;
setarray float, float;&lt;br /&gt;
                                setarray(var,float);&lt;br /&gt;
setbeltcolor oldstring;&lt;br /&gt;
                                setbeltcolor(string);&lt;br /&gt;
setbow oldstring;&lt;br /&gt;
                                setbow(string);&lt;br /&gt;
setcharani oldstring, oldstring;&lt;br /&gt;
                                setcharani(string,string);&lt;br /&gt;
setchargender oldstring;&lt;br /&gt;
                                setchargender(string);&lt;br /&gt;
setcharprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setcoatcolor oldstring;&lt;br /&gt;
                                setcoatcolor(string);&lt;br /&gt;
setcoloreffect float, float, float, float;&lt;br /&gt;
                                setcoloreffect(float,float,float,float);&lt;br /&gt;
setcursor float;&lt;br /&gt;
                                setcursor(float);&lt;br /&gt;
setcurcor2 oldstring;&lt;br /&gt;
                                setcursor2(string);&lt;br /&gt;
seteffect float, float, float, float;&lt;br /&gt;
                                seteffect(float,float,float,float);&lt;br /&gt;
seteffectmode float;&lt;br /&gt;
                                seteffectmode(float);&lt;br /&gt;
setfocus float, float;&lt;br /&gt;
                                setfocus(float,float);&lt;br /&gt;
setgender oldstring;&lt;br /&gt;
                                setgender(string);&lt;br /&gt;
sethead oldstring;&lt;br /&gt;
                                sethead(string);&lt;br /&gt;
setlevel oldstring;&lt;br /&gt;
                                setlevel(string);&lt;br /&gt;
setlevel2 oldstring, float, float;&lt;br /&gt;
                                setlevel2(string,float,float);&lt;br /&gt;
setmap oldstring, oldstring, float, float;&lt;br /&gt;
                                setmap(string,string,float,float);&lt;br /&gt;
setminimap oldstring, oldstring, float, float;&lt;br /&gt;
                                setminimap(string,string,float,float);&lt;br /&gt;
setmusicvolume float, float;&lt;br /&gt;
                                setmusicvolume(float,float);&lt;br /&gt;
setimg oldstring;&lt;br /&gt;
                                setimg(string);&lt;br /&gt;
setimgpart oldstring, float, float, float, float;&lt;br /&gt;
                                setimgpart(string,float,float,float,float);&lt;br /&gt;
setletters oldstring;&lt;br /&gt;
                                setletters(string);&lt;br /&gt;
setplayerdir oldstring;&lt;br /&gt;
                                setplayerdir(string);&lt;br /&gt;
setplayerprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setpm oldstring;&lt;br /&gt;
                                setpm(string);&lt;br /&gt;
setshape float, float, float;&lt;br /&gt;
                                setshape(float,float,float);&lt;br /&gt;
setshape2 float, float, float;&lt;br /&gt;
                                setshape2(float,float,float);&lt;br /&gt;
setshield oldstring, float;&lt;br /&gt;
                                setshield(string,float);&lt;br /&gt;
setshoecolor oldstring;&lt;br /&gt;
                                setshoecolor(string);&lt;br /&gt;
setshootparams oldstring;&lt;br /&gt;
                                setshootparams(string);&lt;br /&gt;
setskincolor oldstring;&lt;br /&gt;
                                setskincolor(string);&lt;br /&gt;
setsleevecolor oldstring;&lt;br /&gt;
                                setsleevecolor(string);&lt;br /&gt;
setstring oldstring, oldstring;&lt;br /&gt;
                                setstring(string,string);&lt;br /&gt;
setsword oldstring, float;&lt;br /&gt;
                                setsword(string,float);&lt;br /&gt;
seturllevel oldstring;&lt;br /&gt;
                                seturllevel(string);&lt;br /&gt;
setz float, float, float, float, float, float, float, float;&lt;br /&gt;
                                setz(float,float,float,float,float,float,float,float);&lt;br /&gt;
setzoomeffect float;&lt;br /&gt;
                                setzoomeffect(float);&lt;br /&gt;
shoot float, float, float, float, float, float, oldstring, oldstring;&lt;br /&gt;
                                shoot(float,float,float,float,float,float,string,string);&lt;br /&gt;
shootarrow float;&lt;br /&gt;
                                shootarrow(float);&lt;br /&gt;
shootball;&lt;br /&gt;
                                shootball();&lt;br /&gt;
shootfireball float;&lt;br /&gt;
                                shootfireball(float);&lt;br /&gt;
shootfireblast float;&lt;br /&gt;
                                shootfireblast(float);&lt;br /&gt;
shootnuke float;&lt;br /&gt;
                                shootnuke(float);&lt;br /&gt;
show;&lt;br /&gt;
                                show();&lt;br /&gt;
showani float, float, float, float, oldstring;&lt;br /&gt;
                                showani(float,float,float,float,string);&lt;br /&gt;
showani2 float, float, float, float, float, oldstring;&lt;br /&gt;
                                showani2(float,float,float,float,float,string);&lt;br /&gt;
showcharacter;&lt;br /&gt;
                                showcharacter();&lt;br /&gt;
showfile oldstring;&lt;br /&gt;
                                showfile(string);&lt;br /&gt;
showimg float, oldstring, float, float;&lt;br /&gt;
                                showimg(float,string,float,float);&lt;br /&gt;
showimg2 float, oldstring, float, float, float;&lt;br /&gt;
                                showimg2(float,string,float,float,float);&lt;br /&gt;
showlocal;&lt;br /&gt;
                                showlocal();&lt;br /&gt;
&lt;br /&gt;
showpoly float, float;&lt;br /&gt;
                                showpoly(float,array);&lt;br /&gt;
showpoly2 float, float;&lt;br /&gt;
                                showpoly2(float,array);&lt;br /&gt;
showstats float;&lt;br /&gt;
                                showstats(float);&lt;br /&gt;
showtext float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext(float,float,float,string,string,string);&lt;br /&gt;
showtext2 float, float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext2(float,float,float,float,string,string,string);&lt;br /&gt;
sleep float;&lt;br /&gt;
                                sleep(float);&lt;br /&gt;
spyfire float, float;&lt;br /&gt;
                                spyfire(float,float);&lt;br /&gt;
stopmidi;&lt;br /&gt;
                                stopmidi();&lt;br /&gt;
stopsound oldstring;&lt;br /&gt;
                                stopsound(string);&lt;br /&gt;
take oldstring;&lt;br /&gt;
                                take(string);&lt;br /&gt;
take2 float;&lt;br /&gt;
                                take2(float);&lt;br /&gt;
takehorse float;&lt;br /&gt;
                                takehorse(float);&lt;br /&gt;
takeplayercarry;&lt;br /&gt;
                                takeplayercarry();&lt;br /&gt;
takeplayerhorse;&lt;br /&gt;
                                takeplayerhorse();&lt;br /&gt;
throwcarry;&lt;br /&gt;
                                throwcarry();&lt;br /&gt;
timereverywhere;&lt;br /&gt;
                                timereverywhere();&lt;br /&gt;
timershow;&lt;br /&gt;
                                timershow();&lt;br /&gt;
toinventory oldstring;&lt;br /&gt;
                                toinventory(string);&lt;br /&gt;
tokenize oldstring;&lt;br /&gt;
                                tokens = string.tokenize();&lt;br /&gt;
tokenize2 oldstring, oldstring;&lt;br /&gt;
                                tokens = string.tokenize(&amp;quot; ,&amp;quot; @ string);&lt;br /&gt;
toweapons oldstring;&lt;br /&gt;
                                toweapons(string);&lt;br /&gt;
triggeraction float, float, oldstring, oldstring;&lt;br /&gt;
                                triggeraction(float,float,string,string);&lt;br /&gt;
unfreezeplayer;&lt;br /&gt;
                                unfreezeplayer();&lt;br /&gt;
unset oldstring;&lt;br /&gt;
                                unset(string);&lt;br /&gt;
updateboard float, float, float, float;&lt;br /&gt;
                                updateboard(float,float,float,float);&lt;br /&gt;
updateterrain;&lt;br /&gt;
                                updateterrain();&lt;br /&gt;
wraptext float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext(float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
wraptext2 float, float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext2(float,float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Supported old string operations ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
These old string operators can be used in string parameters&lt;br /&gt;
for the old commands, also you can use them directly as operators, e.g.&lt;br /&gt;
#c = &amp;quot;hello&amp;quot;&lt;br /&gt;
is actually doing&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#a            player.account&lt;br /&gt;
#a(float)     players[float].account&lt;br /&gt;
#m            player.ani&lt;br /&gt;
              ani&lt;br /&gt;
#m(float)     players[float].ani&lt;br /&gt;
#K(float)     char(float)&lt;br /&gt;
#8            player.bodyimg&lt;br /&gt;
              bodyimg&lt;br /&gt;
#8(float)     players[float].bodyimg&lt;br /&gt;
#c            player.chat&lt;br /&gt;
              chat&lt;br /&gt;
#c(float)     players[float].chat&lt;br /&gt;
#C0           player.colors[0]&lt;br /&gt;
              colors[0]&lt;br /&gt;
#C0(float)    players[float].colors[0]&lt;br /&gt;
#C1           player.colors[1]&lt;br /&gt;
              colors[1]&lt;br /&gt;
#C1(float)    players[float].colors[1]&lt;br /&gt;
#C2           player.colors[2]&lt;br /&gt;
              colors[2]&lt;br /&gt;
#C2(float)    players[float].colors[2]&lt;br /&gt;
#C3           player.colors[3]&lt;br /&gt;
              colors[3]&lt;br /&gt;
#C3(float)    players[float].colors[3]&lt;br /&gt;
#C4           player.colors[4]&lt;br /&gt;
              colors[4]&lt;br /&gt;
#C4(float)    players[float].colors[4]&lt;br /&gt;
#C5           player.colors[5]&lt;br /&gt;
              colors[5]&lt;br /&gt;
#C5(float)    players[float].colors[5]&lt;br /&gt;
#D            downloadfile()&lt;br /&gt;
#E            emoticonchar()&lt;br /&gt;
#e(float,float,oldstring)&lt;br /&gt;
              string.substring(float,float)&lt;br /&gt;
#g            player.guild&lt;br /&gt;
              guild&lt;br /&gt;
#g(float)     players[float].guild&lt;br /&gt;
#3            player.headimg&lt;br /&gt;
              headimg&lt;br /&gt;
#3(float)     players[float].headimg&lt;br /&gt;
#5            player.horseimg&lt;br /&gt;
              horseimg&lt;br /&gt;
#5(float)     players[float].horseimg&lt;br /&gt;
#k(float)     keyname(float)&lt;br /&gt;
#L            player.level&lt;br /&gt;
#I(oldstring,float)&lt;br /&gt;
              getstring(string)[float]&lt;br /&gt;
#n            player.nick&lt;br /&gt;
              nick&lt;br /&gt;
#n(float)     players[float].nick&lt;br /&gt;
#f            image&lt;br /&gt;
#f(float)     npcs[float].image&lt;br /&gt;
#F            level&lt;br /&gt;
#p(float)     params[float]&lt;br /&gt;
#P(float)     player.attr[float]&lt;br /&gt;
              attr[float]&lt;br /&gt;
#P(float_1,float_2)&lt;br /&gt;
              players[float_2].attr[float_1]&lt;br /&gt;
#P1           player.attr[1]&lt;br /&gt;
              attr[1]&lt;br /&gt;
#P1(float)    players[float].attr[1]&lt;br /&gt;
#P2           player.attr[2]&lt;br /&gt;
              attr[2]&lt;br /&gt;
#P2(float)    players[float].attr[2]&lt;br /&gt;
#P3           player.attr[3]&lt;br /&gt;
              attr[3]&lt;br /&gt;
#P3(float)    players[float].attr[3]&lt;br /&gt;
#P4           player.attr[4]&lt;br /&gt;
              attr[4]&lt;br /&gt;
#P4(float)    players[float].attr[4]&lt;br /&gt;
#P5           player.attr[5]&lt;br /&gt;
              attr[5]&lt;br /&gt;
#P5(float)    players[float].attr[5]&lt;br /&gt;
#P6           player.attr[6]&lt;br /&gt;
              attr[6]&lt;br /&gt;
#P6(float)    players[float].attr[6]&lt;br /&gt;
#P7           player.attr[7]&lt;br /&gt;
              attr[7]&lt;br /&gt;
#P7(float)    players[float].attr[7]&lt;br /&gt;
#P8           player.attr[8]&lt;br /&gt;
              attr[8]&lt;br /&gt;
#P8(float)    players[float].attr[8]&lt;br /&gt;
#P9           player.attr[9]&lt;br /&gt;
              attr[9]&lt;br /&gt;
#P9(float)    players[float].attr[9]&lt;br /&gt;
#R(oldstring) string.random()&lt;br /&gt;
#2            player.shieldimg&lt;br /&gt;
              shieldimg&lt;br /&gt;
#2(float)     players[float].shieldimg&lt;br /&gt;
#s(oldstring) getstring(string)&lt;br /&gt;
#1            player.swordimg&lt;br /&gt;
              swordimg&lt;br /&gt;
#1(float)     players[float].swordimg&lt;br /&gt;
#S            player.sword.script&lt;br /&gt;
#t(float)     tokens[float]&lt;br /&gt;
#T(oldstring) string.trim()&lt;br /&gt;
#v(float)     float&lt;br /&gt;
#W            player.weapon.image&lt;br /&gt;
#W(float)     weapons[float].image&lt;br /&gt;
#w            player.weapon.name&lt;br /&gt;
#w(float)     weapons[float].name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Compatibility note:&lt;br /&gt;
When you use the command setcharprop then the first parameter&lt;br /&gt;
is handled differently: instead of changing 'player.chat' it&lt;br /&gt;
is changing 'chat', the chat text of the npc. So 'setcharprop #c,hello'&lt;br /&gt;
would be translated into&lt;br /&gt;
chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
while 'setplayerprop #c,hello' is translated into&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
In the list above both possibilities are listed.&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript&amp;diff=5097</id>
		<title>Creation/Dev/GScript</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript&amp;diff=5097"/>
		<updated>2005-12-02T20:59:43Z</updated>

		<summary type="html">&lt;p&gt;Chad: I had it backwards!(NPC Weapons)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''GScript''' is [[Graal]]'s scripting language.&lt;br /&gt;
&lt;br /&gt;
Its syntax and some of its semantics might seem familiar to those who program in [[WikiPedia:C (Programming Language) | C]] or derived languages, although it lacks some of the expressivity of a real programming language and has special constructs that make programming [[Graal]] [[NPC]]s easier.&lt;br /&gt;
&lt;br /&gt;
GScript started as a very limited language and has since kept up with improvements to the game engine and can now be used for pretty sophisticated scripts that greatly customise the gaming experience.&lt;br /&gt;
&lt;br /&gt;
It is used, with minor differences, for [[Clientside]] tasks like [[GUI | GUI programming]], special effects with nifty 3d lighting and custom [[NPC Weapon|NPC Weapons]] or &amp;amp;quot;engines&amp;amp;quot;, and [[Serverside]] systems like player housing, complex baddies or pets.&lt;br /&gt;
&lt;br /&gt;
[[Old GScript]] has been replaced by a new version (dubbed GScript2 during development) that is rather advanced, in some way object oriented, and thanks to influence from [[Java]] and [[Torque]]'s scripting language, less brain-damaged in some aspects. No offense intended.&lt;br /&gt;
&lt;br /&gt;
GScript can be discussed in the [[GScript IRC channel]].&lt;br /&gt;
&lt;br /&gt;
[[Script Functions: Client]]&lt;br /&gt;
&lt;br /&gt;
[[Script Functions: NPC Server]]&lt;br /&gt;
&lt;br /&gt;
[[Script Functions: Graal 3D]]&lt;br /&gt;
&lt;br /&gt;
[[Graal v4 IRC|Graal IRC Scripting: Graal v4 IRC Scripting Reference]]&lt;br /&gt;
&lt;br /&gt;
[[Troubleshooting Graal v4 IRC|Graal IRC Scripting: Troubleshooting Scripting Reference]]&lt;br /&gt;
&lt;br /&gt;
[[Particle Engine|Graal v4 Particle Engine]]&lt;br /&gt;
&lt;br /&gt;
[[GS1 To GS2|GS1 To GS2: Guide for fixing scripts to work with the new engine]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Why scripts ===&lt;br /&gt;
&lt;br /&gt;
Scripts bring life into objects and make it easy to &lt;br /&gt;
customize the game. Instead of just placing a stone&lt;br /&gt;
into your world, you can make it so that the stone&lt;br /&gt;
can be lifted or kicked. Instead of being limited to&lt;br /&gt;
some fixed player movement you can rescript it&lt;br /&gt;
to let the player jump, strafe and duck. To let the &lt;br /&gt;
player inspect and organize his/her items you can&lt;br /&gt;
create some dialogs and display those by script,&lt;br /&gt;
e.g. when the player presses a special key.&lt;br /&gt;
&lt;br /&gt;
In Graal the scripting is done in 'Graal Script',&lt;br /&gt;
it's looking like Java/C++, but brings some &lt;br /&gt;
additional features for making things easier&lt;br /&gt;
for game creators, while on the other hand&lt;br /&gt;
running in a sandbox and limiting access to&lt;br /&gt;
game-related stuff only.&lt;br /&gt;
&lt;br /&gt;
Graal Script is almost fully compatible to &lt;br /&gt;
the 'old' Graal script used in Graal v1.0 - 3.0,&lt;br /&gt;
and is partially compatible to Torque script. &lt;br /&gt;
&lt;br /&gt;
=== NPCs and 'weapons' ===&lt;br /&gt;
&lt;br /&gt;
There are generally two types of objects in Graal&lt;br /&gt;
which have scripts: The first type are the &lt;br /&gt;
non-player-characters (NPCs). The name 'NPC' is&lt;br /&gt;
actually used for all visible objects in the game: &lt;br /&gt;
monsters, stones, bushes, houses, ships, plants etc.&lt;br /&gt;
Scripts for npcs are most of the time containing&lt;br /&gt;
code for moving the npc or for reacting to &lt;br /&gt;
activities of the player, e.g. giving money to&lt;br /&gt;
the player when he grabs the npc.&lt;br /&gt;
The other type of script-holding objects are the&lt;br /&gt;
'weapons'. Those are items in the inventory of&lt;br /&gt;
the player, not necessary being weapons. Most of&lt;br /&gt;
the time they are actually just scripts which&lt;br /&gt;
control the movement of the player, display weapon&lt;br /&gt;
graphics, or display menus.&lt;br /&gt;
&lt;br /&gt;
So there are objects in the game which have &lt;br /&gt;
their own script, and players which have a set&lt;br /&gt;
of scripts in their invisible backpack.&lt;br /&gt;
&lt;br /&gt;
=== Server-side and client-side ===&lt;br /&gt;
&lt;br /&gt;
Graal is an online game, and there are differences&lt;br /&gt;
to standard scripting in offline games.&lt;br /&gt;
In offline programs you have access to everything,&lt;br /&gt;
anytime. In online games everything is divided&lt;br /&gt;
into two parts: the server-side which controls&lt;br /&gt;
most things in the game, and the client-side which&lt;br /&gt;
displays the game to the player.&lt;br /&gt;
Since the client only displays things, it is not&lt;br /&gt;
possible to cheat by hacking the client. On client-side&lt;br /&gt;
you mainly have code for displaying special effects,&lt;br /&gt;
for displaying the GUI (windows, status bars, item menus),&lt;br /&gt;
playing sound effects and music. Also the player &lt;br /&gt;
movement is done on client-side.&lt;br /&gt;
On the server-side scripts are used to do the more&lt;br /&gt;
secure parts of the game engine,&lt;br /&gt;
and things that are the same for all players -&lt;br /&gt;
npcs are added, moved, npcs interact with players,&lt;br /&gt;
the stats of the players are calculated, the&lt;br /&gt;
communication between players is handled.&lt;br /&gt;
&lt;br /&gt;
All scripts for npcs and weapons can contain&lt;br /&gt;
server-side code and client-side code. The server-side&lt;br /&gt;
code is executed directly on the server, the&lt;br /&gt;
client-side code is sent to the client when he/she&lt;br /&gt;
logins and executed separately for each player on&lt;br /&gt;
their own computer. Usually the two parts of the script&lt;br /&gt;
are divided by line that only contains &amp;quot;//#CLIENTSIDE&amp;quot;,&lt;br /&gt;
like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// Server-side part which is setting the image&lt;br /&gt;
// of the npc when it is created&lt;br /&gt;
function onCreated() {&lt;br /&gt;
  setimg(&amp;quot;door.png&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
&lt;br /&gt;
// Here follows the client-side part,&lt;br /&gt;
// which plays a sound effect when the player&lt;br /&gt;
// touchs the npc&lt;br /&gt;
function onPlayerTouchsme() {&lt;br /&gt;
  play(&amp;quot;chest.wav&amp;quot;);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
&lt;br /&gt;
In general scripts are made for reacting to &lt;br /&gt;
events - when the npc is created then the script&lt;br /&gt;
initializes the attributes of the npc,&lt;br /&gt;
when the player says something then the npc is&lt;br /&gt;
moving to the player, when the player grabs the&lt;br /&gt;
npc then the npc is giving the player some money etc.&lt;br /&gt;
So the script is basicly a collection of actions&lt;br /&gt;
that are done when special events are happening.&lt;br /&gt;
Events can e.g. be the &amp;quot;created&amp;quot; event when the npc&lt;br /&gt;
is created, the &amp;quot;playertouchsme&amp;quot; event when the &lt;br /&gt;
player touchs the npc, or the &amp;quot;playerchats&amp;quot; event&lt;br /&gt;
when the player says something. To write code that reacts&lt;br /&gt;
to one of those event, you define an event&lt;br /&gt;
function like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function onEVENTNAME() {&lt;br /&gt;
  // actions&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the event is happening, then Graal executes&lt;br /&gt;
that scripting function and all commands you &lt;br /&gt;
have added there.&lt;br /&gt;
Sometimes the event gives some parameters to the &lt;br /&gt;
event function, then change your function to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function onEVENTNAME(parameter1, parameter2, ...) {&lt;br /&gt;
  // actions&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By accessing 'parameter1' etc. (you can name&lt;br /&gt;
them differently) you can react to the event more&lt;br /&gt;
exactly. &lt;br /&gt;
&lt;br /&gt;
Instead of reacting to events, the npcs and&lt;br /&gt;
weapons can also invoke new events. That way &lt;br /&gt;
you can let other npcs doing things. You also&lt;br /&gt;
need that if you want to coninuously doing things -&lt;br /&gt;
use timeout events for that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated() {&lt;br /&gt;
  setTimer(1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function onTimeout() {&lt;br /&gt;
  // actions&lt;br /&gt;
  setTimer(1);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the onCreated event function the script is&lt;br /&gt;
setting the timer to 1 second. When that second is&lt;br /&gt;
over, then the &amp;quot;timeout&amp;quot; event is invoked on the&lt;br /&gt;
npc and the onTimeout event function is executed.&lt;br /&gt;
Because it is setting the timer to 1 second&lt;br /&gt;
again, the onTimeout event will occur again after&lt;br /&gt;
one second, and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compatibility note:&lt;br /&gt;
In older Graal scripts you will also find the&lt;br /&gt;
deprecated way of receiving events:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;if (EVENTNAME) {&lt;br /&gt;
  // actions&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is an if-command outside of any brackets. If&lt;br /&gt;
Graal sees that you use such an if-command, then&lt;br /&gt;
it will execute the whole script so that the actions&lt;br /&gt;
you have written inside the if-command will be&lt;br /&gt;
executed too.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
=== Accessing variables ===&lt;br /&gt;
&lt;br /&gt;
Graal Script variables are 'variant', that means they are objects&lt;br /&gt;
that hold values of different types.&lt;br /&gt;
When you assign a value to the variable then it automatically&lt;br /&gt;
switches to the right type:&lt;br /&gt;
&lt;br /&gt;
Numeric (floating point):&lt;br /&gt;
  var = 1;&lt;br /&gt;
String (text):&lt;br /&gt;
  var = &amp;quot;hello&amp;quot;;&lt;br /&gt;
Object link:&lt;br /&gt;
  var = player;&lt;br /&gt;
Array (list of objects):&lt;br /&gt;
  var = {1,2,3};&lt;br /&gt;
&lt;br /&gt;
You can check the current type with the&lt;br /&gt;
type()-function - obj.type() returns&lt;br /&gt;
0,1,2,3 for numeric, string, object or array.&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Addition                  a + b&lt;br /&gt;
Substraction              a - b&lt;br /&gt;
Mulitplication            a * b&lt;br /&gt;
Division                  a / b&lt;br /&gt;
Modulus                   a % b&lt;br /&gt;
Power                     a ^ b&lt;br /&gt;
String Concationation     a @ b&lt;br /&gt;
    with space            a SPC b&lt;br /&gt;
    with newline          a NL b&lt;br /&gt;
    with tabulator        a TAB b&lt;br /&gt;
Bool-And                  a &amp;amp;&amp;amp; b&lt;br /&gt;
Bool-Or                   a || b&lt;br /&gt;
Bool-Not                  !a&lt;br /&gt;
Negative                  -a&lt;br /&gt;
Equal                     a == b&lt;br /&gt;
Not-Equal                 a != b&lt;br /&gt;
Less                      a &amp;lt; b&lt;br /&gt;
Greater                   a &amp;gt; b&lt;br /&gt;
Less-Equal                a &amp;lt;= b,  a =&amp;lt; b&lt;br /&gt;
Greater-Equal             a &amp;gt;= b,  a =&amp;gt; b&lt;br /&gt;
In-Range                  a in &amp;lt;b,c&amp;gt;, a in |b,c&amp;gt;, a in &amp;lt;b,c|, a in |b,c|&lt;br /&gt;
In-Array                  a in {b,c,...}, {a,b,...} in {c,d,...}&lt;br /&gt;
Bitwise-Or                a | b&lt;br /&gt;
Bitwise-And               a &amp;amp; b&lt;br /&gt;
Bitwise-Shift left        a &amp;lt;&amp;lt; b&lt;br /&gt;
Bitwise-Shift right       a &amp;gt;&amp;gt; b&lt;br /&gt;
Bitwise-Invert            ~a&lt;br /&gt;
Bitwise-Xor               a xor b (operator ^ already used for power)&lt;br /&gt;
Array-Constructor         {a,b,...}&lt;br /&gt;
Empty Array               new [count], new[countdim1][countdim2]...&lt;br /&gt;
Array Member              a[index]&lt;br /&gt;
Function call             a(), a(b,c,...)&lt;br /&gt;
Object Attribute          a.b, a.(b)&lt;br /&gt;
Post Increment            a++&lt;br /&gt;
Post Decrement            a--&lt;br /&gt;
Pre Increment             ++a&lt;br /&gt;
Pre Decrement             --a&lt;br /&gt;
Old String Function       #a&lt;br /&gt;
Conditional               a? b : c&lt;br /&gt;
Assignment                a = b, a := b&lt;br /&gt;
Additive Assignment       a += b&lt;br /&gt;
Substractive Assignment   a -= b&lt;br /&gt;
Multiplicative Assignment a *= b&lt;br /&gt;
Division Assignment       a /= b&lt;br /&gt;
Modulus Assignment        a %= b&lt;br /&gt;
Power Assignment          a ^= b&lt;br /&gt;
Bitwise-Or Assignment     a |= b&lt;br /&gt;
Bitwise-And Assignment    a &amp;amp;= b&lt;br /&gt;
Shift Left Assignment     a &amp;lt;&amp;lt;= b&lt;br /&gt;
Shift Right Assignment    a &amp;gt;&amp;gt;= b&lt;br /&gt;
String Append             a @= b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Standard object functions ===&lt;br /&gt;
&lt;br /&gt;
For a complete list of functions and attributes of objects&lt;br /&gt;
see docu_graalscriptfunctions.txt. The base type of all&lt;br /&gt;
objects is &amp;quot;TGraalVar&amp;quot;. You can also get the latest list by&lt;br /&gt;
calling the executale with &amp;quot;-listscriptfunctions&amp;quot; as &lt;br /&gt;
command-line parameter. &lt;br /&gt;
Here only some of the built-in functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
obj.type()  - gets the type of the var (float 0, string 1, object 2, array 3)&lt;br /&gt;
obj.length() - string length&lt;br /&gt;
obj.trim() - removes spaces from the front and back of a string&lt;br /&gt;
obj.lower() - converts a string to lower case&lt;br /&gt;
obj.upper() - converts a string to upper case&lt;br /&gt;
obj.tokenize([delimiters])&lt;br /&gt;
obj.charat(pos)&lt;br /&gt;
obj.pos(substring)&lt;br /&gt;
obj.starts(string)&lt;br /&gt;
obj.ends(string)&lt;br /&gt;
obj.substring(index[,length])&lt;br /&gt;
obj.size() - array length&lt;br /&gt;
obj.subarray(index[,length])&lt;br /&gt;
obj.addarray(obj2)&lt;br /&gt;
obj.insertarray(index,obj2)&lt;br /&gt;
obj.index(obj2) - position of obj2 in the array&lt;br /&gt;
obj.clear()&lt;br /&gt;
obj.add(obj2)&lt;br /&gt;
obj.delete(index)&lt;br /&gt;
obj.remove(obj2)&lt;br /&gt;
obj.replace(index,obj2)&lt;br /&gt;
obj.insert(index,obj2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Standard functions ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
format(format,parameters,...) - formats a &amp;quot;%s %d&amp;quot; string, inserts the parameters, and returns a string&lt;br /&gt;
int(a)&lt;br /&gt;
abs(a)&lt;br /&gt;
random(rangestart,rangeend)&lt;br /&gt;
sin(a)&lt;br /&gt;
cos(a)&lt;br /&gt;
arctan(a)&lt;br /&gt;
exp(a)&lt;br /&gt;
log(base,a)&lt;br /&gt;
min(a,b)&lt;br /&gt;
max(a,b)&lt;br /&gt;
getangle(delta x,delta y)&lt;br /&gt;
getdir(delta x,delta y) - returns 0 for up, 1 for left, 2 for down, 3 for right&lt;br /&gt;
vecx(direction)&lt;br /&gt;
vecy(direction)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
&lt;br /&gt;
=== GUI controls ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onAdd() when added to the parent&lt;br /&gt;
onRemove() when removed from the parent&lt;br /&gt;
onWake() when activated&lt;br /&gt;
onSleep() when deactivated&lt;br /&gt;
onResize(w,h)&lt;br /&gt;
onMove(x,y)&lt;br /&gt;
onMouseEnter(modifier,x,y,clickcount)&lt;br /&gt;
onMouseLeave(modifier,x,y,clickcount)&lt;br /&gt;
onMouseDown(modifier,x,y,clickcount)&lt;br /&gt;
onMouseUp(modifier,x,y,clickcount)&lt;br /&gt;
onMouseDragged(modifier,x,y,clickcount)&lt;br /&gt;
onMouseMove(modifier,x,y,clickcount)&lt;br /&gt;
onRightMouseDown(modifier,x,y,clickcount)&lt;br /&gt;
onRightMouseUp(modifier,x,y,clickcount)&lt;br /&gt;
onRightMouseDragged(modifier,x,y,clickcount)&lt;br /&gt;
onMouseWheelUp(modifier,x,y,clickcount)&lt;br /&gt;
onMouseWheelDown(modifier,x,y,clickcount)&lt;br /&gt;
onKeyDown(keycode,string)&lt;br /&gt;
onKeyUp(keycode,string)&lt;br /&gt;
onKeyRepeat(keycode,string)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiMLTextCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onReflow(w,h) when the text has changed&lt;br /&gt;
onURL(url) when clicked on url&lt;br /&gt;
onSelectTag(tagid) when clicked on an image&lt;br /&gt;
&lt;br /&gt;
Text-Tags:&lt;br /&gt;
The text of multi-line text controls can contain&lt;br /&gt;
a few HTML-tags and Torque-tags, you can use both&lt;br /&gt;
of those tag types to define colors and fonts&lt;br /&gt;
or to include images. Currently following tags&lt;br /&gt;
are available:&lt;br /&gt;
&lt;br /&gt;
HTML:&lt;br /&gt;
&amp;lt;a href=url&amp;gt; text &amp;lt;/a&amp;gt; - when the user clicks on 'text' then &lt;br /&gt;
  a web browser is opened for the specified url&lt;br /&gt;
&amp;lt;body bgcolor=colorname or #rrggbb&amp;gt; - sets the background color&lt;br /&gt;
&amp;lt;br&amp;gt; - line break&lt;br /&gt;
&amp;lt;center&amp;gt; text &amp;lt;/center&amp;gt; - centers the contained text&lt;br /&gt;
&amp;lt;font face=fontname size=textsize color=colorname or #rrggbb&amp;gt; text &amp;lt;/font&amp;gt;&lt;br /&gt;
  - draws text with a special font, size and color; you only&lt;br /&gt;
  need to define one of those 3 attributes&lt;br /&gt;
&amp;lt;ignorelinebreaks&amp;gt; &amp;lt;/ignorelinebreaks&amp;gt; - go into normal HTML mode where&lt;br /&gt;
  you need to insert &amp;lt;br&amp;gt; to do a linebreak&lt;br /&gt;
&amp;lt;img src=filename id=integer&amp;gt; - an image is displayed, you &lt;br /&gt;
  can also specify a tagid if you want to get onSelectTag-events&lt;br /&gt;
  for this image&lt;br /&gt;
&amp;lt;p align=left/center/right&amp;gt; text &amp;lt;/p&amp;gt; - sets the align of the &lt;br /&gt;
  contained text&lt;br /&gt;
&amp;lt;span style=&amp;quot;width=100; height=100;&amp;quot; id=integer&amp;gt; &amp;lt;/span&amp;gt; - for &lt;br /&gt;
  displaying a subpage, you can also specifiy an id for &lt;br /&gt;
  onSelectTag-events; instead of &amp;lt;span&amp;gt; you can also use &amp;lt;div&amp;gt; tags&lt;br /&gt;
&lt;br /&gt;
Torque:&lt;br /&gt;
&amp;lt;a:url&amp;gt; text &amp;lt;/a&amp;gt; - when the user clicks on 'text' then &lt;br /&gt;
  a web browser is opened for the specified url&lt;br /&gt;
&amp;lt;bitmap:filename&amp;gt; - an image is displayed&lt;br /&gt;
&amp;lt;color:rrggbb&amp;gt; - sets the color of the text (hexadecimal value)&lt;br /&gt;
&amp;lt;lmargin:pixels&amp;gt; - sets the left margin for the text&lt;br /&gt;
&amp;lt;lmargin%:percent&amp;gt; - sets the size of the left margin depending &lt;br /&gt;
  on the width of the whole control&lt;br /&gt;
&amp;lt;linkcolor:rrggbb&amp;gt; - sets the color of links (the &amp;lt;a&amp;gt;-tag)&lt;br /&gt;
&amp;lt;linkcolorhl:rrggbb&amp;gt; - sets the highlighted color, when&lt;br /&gt;
  the user moves the mouse over a link&lt;br /&gt;
&amp;lt;just:left/center/right&amp;gt; - sets the align of the following text&lt;br /&gt;
&amp;lt;rmargin:pixels&amp;gt; - sets the right margin for the text&lt;br /&gt;
&amp;lt;rmargin%:percent&amp;gt; - sets the size of the right margin depending &lt;br /&gt;
  on the width of the whole control&lt;br /&gt;
&amp;lt;sbreak&amp;gt; - line break&lt;br /&gt;
&amp;lt;spush&amp;gt; - switches to a new style (like &amp;lt;font&amp;gt;)&lt;br /&gt;
&amp;lt;spop&amp;gt; - switches back to the last saved style (like &amp;lt;/font&amp;gt;)&lt;br /&gt;
&amp;lt;tab:tab1,tab2,..&amp;gt; - sets the position of where tabulators should&lt;br /&gt;
  be displayed if you have text like 'Apple \t Egg \t Chicken'&lt;br /&gt;
&amp;lt;tag:id&amp;gt; - inserts an invisible tag which can be used&lt;br /&gt;
  for the scrollToTag(id) function (beside image-tags)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== GuiTextEditCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onTabComplete()&lt;br /&gt;
onAction(text) when return key pressed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiTextListCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onSelect(id,text) when row selected&lt;br /&gt;
onDblClick(id) when double-click on row or return key pressed&lt;br /&gt;
onDeleteKey(id) when delete key pressed&lt;br /&gt;
onIconResized(w,h) when setIconSize() called&lt;br /&gt;
onOpenMenu(0,index,text) when an item was right-clicked&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiPopUpMenuCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onSelect(id,text) when menu option choosen&lt;br /&gt;
onCancel() when menu is closed without action&lt;br /&gt;
onOpenMenu(0,index,text) when an item was right-clicked&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiMenuBar: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onMenuSelect(menuid,menutext)&lt;br /&gt;
onMenuItemSelect(menuid,menutext,itemid,itemtext)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiTreeViewCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onSelect(id,rightmouse) when row selected&lt;br /&gt;
onUnselect(id) when row de-selected&lt;br /&gt;
onInspect(id) when clicked on the name of an item&lt;br /&gt;
onOpenMenu(0,index,text) when an item was right-clicked&lt;br /&gt;
onContextMenu(&amp;quot;x y&amp;quot;,id) when clicked with right-mouse key on row&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Old script compatibility ==&lt;br /&gt;
&lt;br /&gt;
=== Removed functionality ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- toinventory&lt;br /&gt;
- followplayer&lt;br /&gt;
- playersays()&lt;br /&gt;
- setbackpal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Supported old scripting commands and their mapping to new script ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
addstring oldstring, oldstring;&lt;br /&gt;
                                addstring(string,string);&lt;br /&gt;
addtiledef oldstring, oldstring, float;&lt;br /&gt;
                                addtiledef(string,string,float);&lt;br /&gt;
addtiledef2 oldstring, oldstring, float, float;&lt;br /&gt;
                                addtiledef2(string,string,float,float);&lt;br /&gt;
attachplayertoobj float, float;&lt;br /&gt;
                                attachplayertoobj(float,float);&lt;br /&gt;
blockagain;&lt;br /&gt;
                                blockagain();&lt;br /&gt;
blockagainlocal;&lt;br /&gt;
                                blockagainlocal();&lt;br /&gt;
callnpc float, oldstring;&lt;br /&gt;
                                callnpc(float,string);&lt;br /&gt;
callweapon float, oldstring;&lt;br /&gt;
                                callweapon(float,string);&lt;br /&gt;
canbecarried;&lt;br /&gt;
                                canbecarried();&lt;br /&gt;
canbepulled;&lt;br /&gt;
                                canbepulled();&lt;br /&gt;
canbepushed;&lt;br /&gt;
                                canbepushed();&lt;br /&gt;
cannotbecarried;&lt;br /&gt;
                                cannotbecarried();&lt;br /&gt;
cannotbepulled;&lt;br /&gt;
                                cannotbepulled();&lt;br /&gt;
cannotbepushed;&lt;br /&gt;
                                cannotbepushed();&lt;br /&gt;
canwarp;&lt;br /&gt;
                                canwarp();&lt;br /&gt;
canwarp2;&lt;br /&gt;
                                canwarp2();&lt;br /&gt;
carryobject oldstring;&lt;br /&gt;
                                carryobject(string);&lt;br /&gt;
changeimgcolors float, float, float, float, float;&lt;br /&gt;
                                changeimgcolors(float,float,float,float,float);&lt;br /&gt;
changeimgmode float, float;&lt;br /&gt;
                                changeimgmode(float,float);&lt;br /&gt;
changeimgpart float, float, float, float, float;&lt;br /&gt;
                                changeimgpart(float,float,float,float,float);&lt;br /&gt;
changeimgvis float, float;&lt;br /&gt;
                                changeimgvis(float,float);&lt;br /&gt;
changeimgzoom float, float;&lt;br /&gt;
                                changeimgzoom(float,float);&lt;br /&gt;
deletestring oldstring, float;&lt;br /&gt;
                                deletestring(string,float);&lt;br /&gt;
destroy;&lt;br /&gt;
                                destroy();&lt;br /&gt;
detachplayer;&lt;br /&gt;
                                detachplayer();&lt;br /&gt;
disabledefmovement;&lt;br /&gt;
                                disabledefmovement();&lt;br /&gt;
disablemap;&lt;br /&gt;
                                disablemap();&lt;br /&gt;
disablepause;&lt;br /&gt;
                                disablepause();&lt;br /&gt;
disableselectweapons;&lt;br /&gt;
                                disableselectweapons();&lt;br /&gt;
disableweapons;&lt;br /&gt;
                                disableweapons();&lt;br /&gt;
dontblock;&lt;br /&gt;
                                dontblock();&lt;br /&gt;
dontblocklocal;&lt;br /&gt;
                                dontblocklocal();&lt;br /&gt;
drawaslight;&lt;br /&gt;
                                drawaslight();&lt;br /&gt;
drawoverplayer;&lt;br /&gt;
                                drawoverplayer();&lt;br /&gt;
drawunderplayer;&lt;br /&gt;
                                drawunderplayer();&lt;br /&gt;
enabledefmovement;&lt;br /&gt;
                                enabledefmovement();&lt;br /&gt;
enablefeatures float;&lt;br /&gt;
                                enablefeatures(float);&lt;br /&gt;
enablemap;&lt;br /&gt;
                                enablemap();&lt;br /&gt;
enablepause;&lt;br /&gt;
                                enablepause();&lt;br /&gt;
enableselectweapons;&lt;br /&gt;
                                enableselectweapons();&lt;br /&gt;
enableweapons;&lt;br /&gt;
                                enableweapons();&lt;br /&gt;
explodebomb float;&lt;br /&gt;
                                explodebomb(float);&lt;br /&gt;
followplayer;&lt;br /&gt;
                                followplayer();&lt;br /&gt;
freezeplayer float;&lt;br /&gt;
                                freezeplayer(float);&lt;br /&gt;
freezeplayer2;&lt;br /&gt;
                                freezeplayer2();&lt;br /&gt;
hide;&lt;br /&gt;
                                hide();&lt;br /&gt;
hideimg float;&lt;br /&gt;
                                hideimg(float);&lt;br /&gt;
hideimgs float, float;&lt;br /&gt;
                                hideimgs(float,float);&lt;br /&gt;
hidelocal;&lt;br /&gt;
                                hidelocal();&lt;br /&gt;
&lt;br /&gt;
hitcompu float, float, float, float;&lt;br /&gt;
                                hitcompu(float,float,float,float);&lt;br /&gt;
hitnpc float, float, float, float;&lt;br /&gt;
                                hitnpc(float,float,float,float);&lt;br /&gt;
hitobjects float, float, float;&lt;br /&gt;
                                hitobjects(float,float,float);&lt;br /&gt;
hideplayer float;&lt;br /&gt;
                                hideplayer(float);&lt;br /&gt;
hidesword float;&lt;br /&gt;
                                hidesword(float);&lt;br /&gt;
hitplayer float, float, float, float;&lt;br /&gt;
                                hitplayer(float,float,float,float);&lt;br /&gt;
hurt float;&lt;br /&gt;
                                hurt(float);&lt;br /&gt;
insertstring oldstring, float, oldstring;&lt;br /&gt;
                                insertstring(string,float,string);&lt;br /&gt;
join oldstring;&lt;br /&gt;
                                join(string);&lt;br /&gt;
lay oldstring;&lt;br /&gt;
                                lay(string);&lt;br /&gt;
lay2 oldstring, float, float;&lt;br /&gt;
                                lay2(string,float,float);&lt;br /&gt;
loadmap oldstring;&lt;br /&gt;
                                loadmap(string);&lt;br /&gt;
message oldstring;&lt;br /&gt;
                                message(string);&lt;br /&gt;
move float, float, float, float;&lt;br /&gt;
                                move(float,float,float,float);&lt;br /&gt;
noplayerkilling;&lt;br /&gt;
                                noplayerkilling();&lt;br /&gt;
openurl oldstring;&lt;br /&gt;
                                openurl(string);&lt;br /&gt;
openurl2 oldstring, float, float;&lt;br /&gt;
                                openurl2(string,float,float);&lt;br /&gt;
play oldstring;&lt;br /&gt;
                                play(string);&lt;br /&gt;
play2 oldstring, float, float, float;&lt;br /&gt;
                                play2(string,float,float,float);&lt;br /&gt;
playlooped oldstring;&lt;br /&gt;
                                playlooped(string);&lt;br /&gt;
putbomb float, float, float;&lt;br /&gt;
                                putbomb(float,float,float);&lt;br /&gt;
putcomp oldstring, float, float;&lt;br /&gt;
                                putcomp(string,float,float);&lt;br /&gt;
putexplosion float, float, float;&lt;br /&gt;
                                putexplosion(float,float,float);&lt;br /&gt;
putexplosion2 float, float, float, float;&lt;br /&gt;
                                putexplosion2(float,float,float,float);&lt;br /&gt;
puthorse oldstring, float, float;&lt;br /&gt;
                                puthorse(string,float,float);&lt;br /&gt;
putleaps float, float, float;&lt;br /&gt;
                                putleaps(float,float,float);&lt;br /&gt;
putnewcomp oldstring, float, float, oldstring, float;&lt;br /&gt;
                                putnewcomp(string,float,float,string,float);&lt;br /&gt;
putnpc oldstring, oldstring, float, float;&lt;br /&gt;
                                putnpc(string,string,float,float);&lt;br /&gt;
putnpc2 float, float, oldstring;&lt;br /&gt;
                                putnpc2(float,float,string);&lt;br /&gt;
reflectarrow float;&lt;br /&gt;
                                reflectarrow(float);&lt;br /&gt;
removearrow float;&lt;br /&gt;
                                removearrow(float);&lt;br /&gt;
removebomb float;&lt;br /&gt;
                                removebomb(float);&lt;br /&gt;
removecompus;&lt;br /&gt;
                                removecompus();&lt;br /&gt;
removeexplo float;&lt;br /&gt;
                                removeexplo(float);&lt;br /&gt;
removehorse float;&lt;br /&gt;
                                removehorse(float);&lt;br /&gt;
rmeoveitem float;&lt;br /&gt;
                                removeitem(float)&lt;br /&gt;
removestring oldstring, oldstring;&lt;br /&gt;
                                removestring(string,string);&lt;br /&gt;
removetiledefs oldstring;&lt;br /&gt;
                                removetiledefs(string);&lt;br /&gt;
replaceani oldstring, oldstring;&lt;br /&gt;
                                replaceani(string,string);&lt;br /&gt;
replacestring oldstring, float, oldstring;&lt;br /&gt;
                                replacestring(string,float,string);&lt;br /&gt;
resetfocus;&lt;br /&gt;
                                resetfocus();&lt;br /&gt;
savelog oldstring;&lt;br /&gt;
                                savelog(string);&lt;br /&gt;
savelog2 oldstring, oldstring;&lt;br /&gt;
                                savelog2(string,string);&lt;br /&gt;
say float;&lt;br /&gt;
                                say(float);&lt;br /&gt;
say2 oldstring;&lt;br /&gt;
                                say2(string);&lt;br /&gt;
sendrpgmessage oldstring;&lt;br /&gt;
                                sendrpgmessage(string);&lt;br /&gt;
sendpm oldstring;&lt;br /&gt;
                                sendpm(string);&lt;br /&gt;
sendtonc oldstring;&lt;br /&gt;
                                sendtonc(string);&lt;br /&gt;
sendtorc oldstring;&lt;br /&gt;
                                sendtorc(string);&lt;br /&gt;
serverwarp oldstring;&lt;br /&gt;
                                serverwarp(string);&lt;br /&gt;
set oldstring;&lt;br /&gt;
                                set(string);&lt;br /&gt;
setani oldstring, oldstring;&lt;br /&gt;
                                setani(string,string);&lt;br /&gt;
setarray float, float;&lt;br /&gt;
                                setarray(var,float);&lt;br /&gt;
setbeltcolor oldstring;&lt;br /&gt;
                                setbeltcolor(string);&lt;br /&gt;
setbow oldstring;&lt;br /&gt;
                                setbow(string);&lt;br /&gt;
setcharani oldstring, oldstring;&lt;br /&gt;
                                setcharani(string,string);&lt;br /&gt;
setchargender oldstring;&lt;br /&gt;
                                setchargender(string);&lt;br /&gt;
setcharprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setcoatcolor oldstring;&lt;br /&gt;
                                setcoatcolor(string);&lt;br /&gt;
setcoloreffect float, float, float, float;&lt;br /&gt;
                                setcoloreffect(float,float,float,float);&lt;br /&gt;
setcursor float;&lt;br /&gt;
                                setcursor(float);&lt;br /&gt;
setcurcor2 oldstring;&lt;br /&gt;
                                setcursor2(string);&lt;br /&gt;
seteffect float, float, float, float;&lt;br /&gt;
                                seteffect(float,float,float,float);&lt;br /&gt;
seteffectmode float;&lt;br /&gt;
                                seteffectmode(float);&lt;br /&gt;
setfocus float, float;&lt;br /&gt;
                                setfocus(float,float);&lt;br /&gt;
setgender oldstring;&lt;br /&gt;
                                setgender(string);&lt;br /&gt;
sethead oldstring;&lt;br /&gt;
                                sethead(string);&lt;br /&gt;
setlevel oldstring;&lt;br /&gt;
                                setlevel(string);&lt;br /&gt;
setlevel2 oldstring, float, float;&lt;br /&gt;
                                setlevel2(string,float,float);&lt;br /&gt;
setmap oldstring, oldstring, float, float;&lt;br /&gt;
                                setmap(string,string,float,float);&lt;br /&gt;
setminimap oldstring, oldstring, float, float;&lt;br /&gt;
                                setminimap(string,string,float,float);&lt;br /&gt;
setmusicvolume float, float;&lt;br /&gt;
                                setmusicvolume(float,float);&lt;br /&gt;
setimg oldstring;&lt;br /&gt;
                                setimg(string);&lt;br /&gt;
setimgpart oldstring, float, float, float, float;&lt;br /&gt;
                                setimgpart(string,float,float,float,float);&lt;br /&gt;
setletters oldstring;&lt;br /&gt;
                                setletters(string);&lt;br /&gt;
setplayerdir oldstring;&lt;br /&gt;
                                setplayerdir(string);&lt;br /&gt;
setplayerprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setpm oldstring;&lt;br /&gt;
                                setpm(string);&lt;br /&gt;
setshape float, float, float;&lt;br /&gt;
                                setshape(float,float,float);&lt;br /&gt;
setshape2 float, float, float;&lt;br /&gt;
                                setshape2(float,float,float);&lt;br /&gt;
setshield oldstring, float;&lt;br /&gt;
                                setshield(string,float);&lt;br /&gt;
setshoecolor oldstring;&lt;br /&gt;
                                setshoecolor(string);&lt;br /&gt;
setshootparams oldstring;&lt;br /&gt;
                                setshootparams(string);&lt;br /&gt;
setskincolor oldstring;&lt;br /&gt;
                                setskincolor(string);&lt;br /&gt;
setsleevecolor oldstring;&lt;br /&gt;
                                setsleevecolor(string);&lt;br /&gt;
setstring oldstring, oldstring;&lt;br /&gt;
                                setstring(string,string);&lt;br /&gt;
setsword oldstring, float;&lt;br /&gt;
                                setsword(string,float);&lt;br /&gt;
seturllevel oldstring;&lt;br /&gt;
                                seturllevel(string);&lt;br /&gt;
setz float, float, float, float, float, float, float, float;&lt;br /&gt;
                                setz(float,float,float,float,float,float,float,float);&lt;br /&gt;
setzoomeffect float;&lt;br /&gt;
                                setzoomeffect(float);&lt;br /&gt;
shoot float, float, float, float, float, float, oldstring, oldstring;&lt;br /&gt;
                                shoot(float,float,float,float,float,float,string,string);&lt;br /&gt;
shootarrow float;&lt;br /&gt;
                                shootarrow(float);&lt;br /&gt;
shootball;&lt;br /&gt;
                                shootball();&lt;br /&gt;
shootfireball float;&lt;br /&gt;
                                shootfireball(float);&lt;br /&gt;
shootfireblast float;&lt;br /&gt;
                                shootfireblast(float);&lt;br /&gt;
shootnuke float;&lt;br /&gt;
                                shootnuke(float);&lt;br /&gt;
show;&lt;br /&gt;
                                show();&lt;br /&gt;
showani float, float, float, float, oldstring;&lt;br /&gt;
                                showani(float,float,float,float,string);&lt;br /&gt;
showani2 float, float, float, float, float, oldstring;&lt;br /&gt;
                                showani2(float,float,float,float,float,string);&lt;br /&gt;
showcharacter;&lt;br /&gt;
                                showcharacter();&lt;br /&gt;
showfile oldstring;&lt;br /&gt;
                                showfile(string);&lt;br /&gt;
showimg float, oldstring, float, float;&lt;br /&gt;
                                showimg(float,string,float,float);&lt;br /&gt;
showimg2 float, oldstring, float, float, float;&lt;br /&gt;
                                showimg2(float,string,float,float,float);&lt;br /&gt;
showlocal;&lt;br /&gt;
                                showlocal();&lt;br /&gt;
&lt;br /&gt;
showpoly float, float;&lt;br /&gt;
                                showpoly(float,array);&lt;br /&gt;
showpoly2 float, float;&lt;br /&gt;
                                showpoly2(float,array);&lt;br /&gt;
showstats float;&lt;br /&gt;
                                showstats(float);&lt;br /&gt;
showtext float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext(float,float,float,string,string,string);&lt;br /&gt;
showtext2 float, float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext2(float,float,float,float,string,string,string);&lt;br /&gt;
sleep float;&lt;br /&gt;
                                sleep(float);&lt;br /&gt;
spyfire float, float;&lt;br /&gt;
                                spyfire(float,float);&lt;br /&gt;
stopmidi;&lt;br /&gt;
                                stopmidi();&lt;br /&gt;
stopsound oldstring;&lt;br /&gt;
                                stopsound(string);&lt;br /&gt;
take oldstring;&lt;br /&gt;
                                take(string);&lt;br /&gt;
take2 float;&lt;br /&gt;
                                take2(float);&lt;br /&gt;
takehorse float;&lt;br /&gt;
                                takehorse(float);&lt;br /&gt;
takeplayercarry;&lt;br /&gt;
                                takeplayercarry();&lt;br /&gt;
takeplayerhorse;&lt;br /&gt;
                                takeplayerhorse();&lt;br /&gt;
throwcarry;&lt;br /&gt;
                                throwcarry();&lt;br /&gt;
timereverywhere;&lt;br /&gt;
                                timereverywhere();&lt;br /&gt;
timershow;&lt;br /&gt;
                                timershow();&lt;br /&gt;
toinventory oldstring;&lt;br /&gt;
                                toinventory(string);&lt;br /&gt;
tokenize oldstring;&lt;br /&gt;
                                tokens = string.tokenize();&lt;br /&gt;
tokenize2 oldstring, oldstring;&lt;br /&gt;
                                tokens = string.tokenize(&amp;quot; ,&amp;quot; @ string);&lt;br /&gt;
toweapons oldstring;&lt;br /&gt;
                                toweapons(string);&lt;br /&gt;
triggeraction float, float, oldstring, oldstring;&lt;br /&gt;
                                triggeraction(float,float,string,string);&lt;br /&gt;
unfreezeplayer;&lt;br /&gt;
                                unfreezeplayer();&lt;br /&gt;
unset oldstring;&lt;br /&gt;
                                unset(string);&lt;br /&gt;
updateboard float, float, float, float;&lt;br /&gt;
                                updateboard(float,float,float,float);&lt;br /&gt;
updateterrain;&lt;br /&gt;
                                updateterrain();&lt;br /&gt;
wraptext float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext(float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
wraptext2 float, float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext2(float,float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Supported old string operations ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
These old string operators can be used in string parameters&lt;br /&gt;
for the old commands, also you can use them directly as operators, e.g.&lt;br /&gt;
#c = &amp;quot;hello&amp;quot;&lt;br /&gt;
is actually doing&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#a            player.account&lt;br /&gt;
#a(float)     players[float].account&lt;br /&gt;
#m            player.ani&lt;br /&gt;
              ani&lt;br /&gt;
#m(float)     players[float].ani&lt;br /&gt;
#K(float)     char(float)&lt;br /&gt;
#8            player.bodyimg&lt;br /&gt;
              bodyimg&lt;br /&gt;
#8(float)     players[float].bodyimg&lt;br /&gt;
#c            player.chat&lt;br /&gt;
              chat&lt;br /&gt;
#c(float)     players[float].chat&lt;br /&gt;
#C0           player.colors[0]&lt;br /&gt;
              colors[0]&lt;br /&gt;
#C0(float)    players[float].colors[0]&lt;br /&gt;
#C1           player.colors[1]&lt;br /&gt;
              colors[1]&lt;br /&gt;
#C1(float)    players[float].colors[1]&lt;br /&gt;
#C2           player.colors[2]&lt;br /&gt;
              colors[2]&lt;br /&gt;
#C2(float)    players[float].colors[2]&lt;br /&gt;
#C3           player.colors[3]&lt;br /&gt;
              colors[3]&lt;br /&gt;
#C3(float)    players[float].colors[3]&lt;br /&gt;
#C4           player.colors[4]&lt;br /&gt;
              colors[4]&lt;br /&gt;
#C4(float)    players[float].colors[4]&lt;br /&gt;
#C5           player.colors[5]&lt;br /&gt;
              colors[5]&lt;br /&gt;
#C5(float)    players[float].colors[5]&lt;br /&gt;
#D            downloadfile()&lt;br /&gt;
#E            emoticonchar()&lt;br /&gt;
#e(float,float,oldstring)&lt;br /&gt;
              string.substring(float,float)&lt;br /&gt;
#g            player.guild&lt;br /&gt;
              guild&lt;br /&gt;
#g(float)     players[float].guild&lt;br /&gt;
#3            player.headimg&lt;br /&gt;
              headimg&lt;br /&gt;
#3(float)     players[float].headimg&lt;br /&gt;
#5            player.horseimg&lt;br /&gt;
              horseimg&lt;br /&gt;
#5(float)     players[float].horseimg&lt;br /&gt;
#k(float)     keyname(float)&lt;br /&gt;
#L            player.level&lt;br /&gt;
#I(oldstring,float)&lt;br /&gt;
              getstring(string)[float]&lt;br /&gt;
#n            player.nick&lt;br /&gt;
              nick&lt;br /&gt;
#n(float)     players[float].nick&lt;br /&gt;
#f            image&lt;br /&gt;
#f(float)     npcs[float].image&lt;br /&gt;
#F            level&lt;br /&gt;
#p(float)     params[float]&lt;br /&gt;
#P(float)     player.attr[float]&lt;br /&gt;
              attr[float]&lt;br /&gt;
#P(float_1,float_2)&lt;br /&gt;
              players[float_2].attr[float_1]&lt;br /&gt;
#P1           player.attr[1]&lt;br /&gt;
              attr[1]&lt;br /&gt;
#P1(float)    players[float].attr[1]&lt;br /&gt;
#P2           player.attr[2]&lt;br /&gt;
              attr[2]&lt;br /&gt;
#P2(float)    players[float].attr[2]&lt;br /&gt;
#P3           player.attr[3]&lt;br /&gt;
              attr[3]&lt;br /&gt;
#P3(float)    players[float].attr[3]&lt;br /&gt;
#P4           player.attr[4]&lt;br /&gt;
              attr[4]&lt;br /&gt;
#P4(float)    players[float].attr[4]&lt;br /&gt;
#P5           player.attr[5]&lt;br /&gt;
              attr[5]&lt;br /&gt;
#P5(float)    players[float].attr[5]&lt;br /&gt;
#P6           player.attr[6]&lt;br /&gt;
              attr[6]&lt;br /&gt;
#P6(float)    players[float].attr[6]&lt;br /&gt;
#P7           player.attr[7]&lt;br /&gt;
              attr[7]&lt;br /&gt;
#P7(float)    players[float].attr[7]&lt;br /&gt;
#P8           player.attr[8]&lt;br /&gt;
              attr[8]&lt;br /&gt;
#P8(float)    players[float].attr[8]&lt;br /&gt;
#P9           player.attr[9]&lt;br /&gt;
              attr[9]&lt;br /&gt;
#P9(float)    players[float].attr[9]&lt;br /&gt;
#R(oldstring) string.random()&lt;br /&gt;
#2            player.shieldimg&lt;br /&gt;
              shieldimg&lt;br /&gt;
#2(float)     players[float].shieldimg&lt;br /&gt;
#s(oldstring) getstring(string)&lt;br /&gt;
#1            player.swordimg&lt;br /&gt;
              swordimg&lt;br /&gt;
#1(float)     players[float].swordimg&lt;br /&gt;
#S            player.sword.script&lt;br /&gt;
#t(float)     tokens[float]&lt;br /&gt;
#T(oldstring) string.trim()&lt;br /&gt;
#v(float)     float&lt;br /&gt;
#W            player.weapon.image&lt;br /&gt;
#W(float)     weapons[float].image&lt;br /&gt;
#w            player.weapon.name&lt;br /&gt;
#w(float)     weapons[float].name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Compatibility note:&lt;br /&gt;
When you use the command setcharprop then the first parameter&lt;br /&gt;
is handled differently: instead of changing 'player.chat' it&lt;br /&gt;
is changing 'chat', the chat text of the npc. So 'setcharprop #c,hello'&lt;br /&gt;
would be translated into&lt;br /&gt;
chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
while 'setplayerprop #c,hello' is translated into&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
In the list above both possibilities are listed.&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript&amp;diff=5096</id>
		<title>Creation/Dev/GScript</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript&amp;diff=5096"/>
		<updated>2005-12-02T20:58:52Z</updated>

		<summary type="html">&lt;p&gt;Chad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''GScript''' is [[Graal]]'s scripting language.&lt;br /&gt;
&lt;br /&gt;
Its syntax and some of its semantics might seem familiar to those who program in [[WikiPedia:C (Programming Language) | C]] or derived languages, although it lacks some of the expressivity of a real programming language and has special constructs that make programming [[Graal]] [[NPC]]s easier.&lt;br /&gt;
&lt;br /&gt;
GScript started as a very limited language and has since kept up with improvements to the game engine and can now be used for pretty sophisticated scripts that greatly customise the gaming experience.&lt;br /&gt;
&lt;br /&gt;
It is used, with minor differences, for [[Clientside]] tasks like [[GUI | GUI programming]], special effects with nifty 3d lighting and custom [[NPC Weapons|NPC Weapon]] or &amp;amp;quot;engines&amp;amp;quot;, and [[Serverside]] systems like player housing, complex baddies or pets.&lt;br /&gt;
&lt;br /&gt;
[[Old GScript]] has been replaced by a new version (dubbed GScript2 during development) that is rather advanced, in some way object oriented, and thanks to influence from [[Java]] and [[Torque]]'s scripting language, less brain-damaged in some aspects. No offense intended.&lt;br /&gt;
&lt;br /&gt;
GScript can be discussed in the [[GScript IRC channel]].&lt;br /&gt;
&lt;br /&gt;
[[Script Functions: Client]]&lt;br /&gt;
&lt;br /&gt;
[[Script Functions: NPC Server]]&lt;br /&gt;
&lt;br /&gt;
[[Script Functions: Graal 3D]]&lt;br /&gt;
&lt;br /&gt;
[[Graal v4 IRC|Graal IRC Scripting: Graal v4 IRC Scripting Reference]]&lt;br /&gt;
&lt;br /&gt;
[[Troubleshooting Graal v4 IRC|Graal IRC Scripting: Troubleshooting Scripting Reference]]&lt;br /&gt;
&lt;br /&gt;
[[Particle Engine|Graal v4 Particle Engine]]&lt;br /&gt;
&lt;br /&gt;
[[GS1 To GS2|GS1 To GS2: Guide for fixing scripts to work with the new engine]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Why scripts ===&lt;br /&gt;
&lt;br /&gt;
Scripts bring life into objects and make it easy to &lt;br /&gt;
customize the game. Instead of just placing a stone&lt;br /&gt;
into your world, you can make it so that the stone&lt;br /&gt;
can be lifted or kicked. Instead of being limited to&lt;br /&gt;
some fixed player movement you can rescript it&lt;br /&gt;
to let the player jump, strafe and duck. To let the &lt;br /&gt;
player inspect and organize his/her items you can&lt;br /&gt;
create some dialogs and display those by script,&lt;br /&gt;
e.g. when the player presses a special key.&lt;br /&gt;
&lt;br /&gt;
In Graal the scripting is done in 'Graal Script',&lt;br /&gt;
it's looking like Java/C++, but brings some &lt;br /&gt;
additional features for making things easier&lt;br /&gt;
for game creators, while on the other hand&lt;br /&gt;
running in a sandbox and limiting access to&lt;br /&gt;
game-related stuff only.&lt;br /&gt;
&lt;br /&gt;
Graal Script is almost fully compatible to &lt;br /&gt;
the 'old' Graal script used in Graal v1.0 - 3.0,&lt;br /&gt;
and is partially compatible to Torque script. &lt;br /&gt;
&lt;br /&gt;
=== NPCs and 'weapons' ===&lt;br /&gt;
&lt;br /&gt;
There are generally two types of objects in Graal&lt;br /&gt;
which have scripts: The first type are the &lt;br /&gt;
non-player-characters (NPCs). The name 'NPC' is&lt;br /&gt;
actually used for all visible objects in the game: &lt;br /&gt;
monsters, stones, bushes, houses, ships, plants etc.&lt;br /&gt;
Scripts for npcs are most of the time containing&lt;br /&gt;
code for moving the npc or for reacting to &lt;br /&gt;
activities of the player, e.g. giving money to&lt;br /&gt;
the player when he grabs the npc.&lt;br /&gt;
The other type of script-holding objects are the&lt;br /&gt;
'weapons'. Those are items in the inventory of&lt;br /&gt;
the player, not necessary being weapons. Most of&lt;br /&gt;
the time they are actually just scripts which&lt;br /&gt;
control the movement of the player, display weapon&lt;br /&gt;
graphics, or display menus.&lt;br /&gt;
&lt;br /&gt;
So there are objects in the game which have &lt;br /&gt;
their own script, and players which have a set&lt;br /&gt;
of scripts in their invisible backpack.&lt;br /&gt;
&lt;br /&gt;
=== Server-side and client-side ===&lt;br /&gt;
&lt;br /&gt;
Graal is an online game, and there are differences&lt;br /&gt;
to standard scripting in offline games.&lt;br /&gt;
In offline programs you have access to everything,&lt;br /&gt;
anytime. In online games everything is divided&lt;br /&gt;
into two parts: the server-side which controls&lt;br /&gt;
most things in the game, and the client-side which&lt;br /&gt;
displays the game to the player.&lt;br /&gt;
Since the client only displays things, it is not&lt;br /&gt;
possible to cheat by hacking the client. On client-side&lt;br /&gt;
you mainly have code for displaying special effects,&lt;br /&gt;
for displaying the GUI (windows, status bars, item menus),&lt;br /&gt;
playing sound effects and music. Also the player &lt;br /&gt;
movement is done on client-side.&lt;br /&gt;
On the server-side scripts are used to do the more&lt;br /&gt;
secure parts of the game engine,&lt;br /&gt;
and things that are the same for all players -&lt;br /&gt;
npcs are added, moved, npcs interact with players,&lt;br /&gt;
the stats of the players are calculated, the&lt;br /&gt;
communication between players is handled.&lt;br /&gt;
&lt;br /&gt;
All scripts for npcs and weapons can contain&lt;br /&gt;
server-side code and client-side code. The server-side&lt;br /&gt;
code is executed directly on the server, the&lt;br /&gt;
client-side code is sent to the client when he/she&lt;br /&gt;
logins and executed separately for each player on&lt;br /&gt;
their own computer. Usually the two parts of the script&lt;br /&gt;
are divided by line that only contains &amp;quot;//#CLIENTSIDE&amp;quot;,&lt;br /&gt;
like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// Server-side part which is setting the image&lt;br /&gt;
// of the npc when it is created&lt;br /&gt;
function onCreated() {&lt;br /&gt;
  setimg(&amp;quot;door.png&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
&lt;br /&gt;
// Here follows the client-side part,&lt;br /&gt;
// which plays a sound effect when the player&lt;br /&gt;
// touchs the npc&lt;br /&gt;
function onPlayerTouchsme() {&lt;br /&gt;
  play(&amp;quot;chest.wav&amp;quot;);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
&lt;br /&gt;
In general scripts are made for reacting to &lt;br /&gt;
events - when the npc is created then the script&lt;br /&gt;
initializes the attributes of the npc,&lt;br /&gt;
when the player says something then the npc is&lt;br /&gt;
moving to the player, when the player grabs the&lt;br /&gt;
npc then the npc is giving the player some money etc.&lt;br /&gt;
So the script is basicly a collection of actions&lt;br /&gt;
that are done when special events are happening.&lt;br /&gt;
Events can e.g. be the &amp;quot;created&amp;quot; event when the npc&lt;br /&gt;
is created, the &amp;quot;playertouchsme&amp;quot; event when the &lt;br /&gt;
player touchs the npc, or the &amp;quot;playerchats&amp;quot; event&lt;br /&gt;
when the player says something. To write code that reacts&lt;br /&gt;
to one of those event, you define an event&lt;br /&gt;
function like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function onEVENTNAME() {&lt;br /&gt;
  // actions&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the event is happening, then Graal executes&lt;br /&gt;
that scripting function and all commands you &lt;br /&gt;
have added there.&lt;br /&gt;
Sometimes the event gives some parameters to the &lt;br /&gt;
event function, then change your function to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function onEVENTNAME(parameter1, parameter2, ...) {&lt;br /&gt;
  // actions&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By accessing 'parameter1' etc. (you can name&lt;br /&gt;
them differently) you can react to the event more&lt;br /&gt;
exactly. &lt;br /&gt;
&lt;br /&gt;
Instead of reacting to events, the npcs and&lt;br /&gt;
weapons can also invoke new events. That way &lt;br /&gt;
you can let other npcs doing things. You also&lt;br /&gt;
need that if you want to coninuously doing things -&lt;br /&gt;
use timeout events for that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated() {&lt;br /&gt;
  setTimer(1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function onTimeout() {&lt;br /&gt;
  // actions&lt;br /&gt;
  setTimer(1);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the onCreated event function the script is&lt;br /&gt;
setting the timer to 1 second. When that second is&lt;br /&gt;
over, then the &amp;quot;timeout&amp;quot; event is invoked on the&lt;br /&gt;
npc and the onTimeout event function is executed.&lt;br /&gt;
Because it is setting the timer to 1 second&lt;br /&gt;
again, the onTimeout event will occur again after&lt;br /&gt;
one second, and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compatibility note:&lt;br /&gt;
In older Graal scripts you will also find the&lt;br /&gt;
deprecated way of receiving events:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;if (EVENTNAME) {&lt;br /&gt;
  // actions&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is an if-command outside of any brackets. If&lt;br /&gt;
Graal sees that you use such an if-command, then&lt;br /&gt;
it will execute the whole script so that the actions&lt;br /&gt;
you have written inside the if-command will be&lt;br /&gt;
executed too.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
=== Accessing variables ===&lt;br /&gt;
&lt;br /&gt;
Graal Script variables are 'variant', that means they are objects&lt;br /&gt;
that hold values of different types.&lt;br /&gt;
When you assign a value to the variable then it automatically&lt;br /&gt;
switches to the right type:&lt;br /&gt;
&lt;br /&gt;
Numeric (floating point):&lt;br /&gt;
  var = 1;&lt;br /&gt;
String (text):&lt;br /&gt;
  var = &amp;quot;hello&amp;quot;;&lt;br /&gt;
Object link:&lt;br /&gt;
  var = player;&lt;br /&gt;
Array (list of objects):&lt;br /&gt;
  var = {1,2,3};&lt;br /&gt;
&lt;br /&gt;
You can check the current type with the&lt;br /&gt;
type()-function - obj.type() returns&lt;br /&gt;
0,1,2,3 for numeric, string, object or array.&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Addition                  a + b&lt;br /&gt;
Substraction              a - b&lt;br /&gt;
Mulitplication            a * b&lt;br /&gt;
Division                  a / b&lt;br /&gt;
Modulus                   a % b&lt;br /&gt;
Power                     a ^ b&lt;br /&gt;
String Concationation     a @ b&lt;br /&gt;
    with space            a SPC b&lt;br /&gt;
    with newline          a NL b&lt;br /&gt;
    with tabulator        a TAB b&lt;br /&gt;
Bool-And                  a &amp;amp;&amp;amp; b&lt;br /&gt;
Bool-Or                   a || b&lt;br /&gt;
Bool-Not                  !a&lt;br /&gt;
Negative                  -a&lt;br /&gt;
Equal                     a == b&lt;br /&gt;
Not-Equal                 a != b&lt;br /&gt;
Less                      a &amp;lt; b&lt;br /&gt;
Greater                   a &amp;gt; b&lt;br /&gt;
Less-Equal                a &amp;lt;= b,  a =&amp;lt; b&lt;br /&gt;
Greater-Equal             a &amp;gt;= b,  a =&amp;gt; b&lt;br /&gt;
In-Range                  a in &amp;lt;b,c&amp;gt;, a in |b,c&amp;gt;, a in &amp;lt;b,c|, a in |b,c|&lt;br /&gt;
In-Array                  a in {b,c,...}, {a,b,...} in {c,d,...}&lt;br /&gt;
Bitwise-Or                a | b&lt;br /&gt;
Bitwise-And               a &amp;amp; b&lt;br /&gt;
Bitwise-Shift left        a &amp;lt;&amp;lt; b&lt;br /&gt;
Bitwise-Shift right       a &amp;gt;&amp;gt; b&lt;br /&gt;
Bitwise-Invert            ~a&lt;br /&gt;
Bitwise-Xor               a xor b (operator ^ already used for power)&lt;br /&gt;
Array-Constructor         {a,b,...}&lt;br /&gt;
Empty Array               new [count], new[countdim1][countdim2]...&lt;br /&gt;
Array Member              a[index]&lt;br /&gt;
Function call             a(), a(b,c,...)&lt;br /&gt;
Object Attribute          a.b, a.(b)&lt;br /&gt;
Post Increment            a++&lt;br /&gt;
Post Decrement            a--&lt;br /&gt;
Pre Increment             ++a&lt;br /&gt;
Pre Decrement             --a&lt;br /&gt;
Old String Function       #a&lt;br /&gt;
Conditional               a? b : c&lt;br /&gt;
Assignment                a = b, a := b&lt;br /&gt;
Additive Assignment       a += b&lt;br /&gt;
Substractive Assignment   a -= b&lt;br /&gt;
Multiplicative Assignment a *= b&lt;br /&gt;
Division Assignment       a /= b&lt;br /&gt;
Modulus Assignment        a %= b&lt;br /&gt;
Power Assignment          a ^= b&lt;br /&gt;
Bitwise-Or Assignment     a |= b&lt;br /&gt;
Bitwise-And Assignment    a &amp;amp;= b&lt;br /&gt;
Shift Left Assignment     a &amp;lt;&amp;lt;= b&lt;br /&gt;
Shift Right Assignment    a &amp;gt;&amp;gt;= b&lt;br /&gt;
String Append             a @= b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Standard object functions ===&lt;br /&gt;
&lt;br /&gt;
For a complete list of functions and attributes of objects&lt;br /&gt;
see docu_graalscriptfunctions.txt. The base type of all&lt;br /&gt;
objects is &amp;quot;TGraalVar&amp;quot;. You can also get the latest list by&lt;br /&gt;
calling the executale with &amp;quot;-listscriptfunctions&amp;quot; as &lt;br /&gt;
command-line parameter. &lt;br /&gt;
Here only some of the built-in functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
obj.type()  - gets the type of the var (float 0, string 1, object 2, array 3)&lt;br /&gt;
obj.length() - string length&lt;br /&gt;
obj.trim() - removes spaces from the front and back of a string&lt;br /&gt;
obj.lower() - converts a string to lower case&lt;br /&gt;
obj.upper() - converts a string to upper case&lt;br /&gt;
obj.tokenize([delimiters])&lt;br /&gt;
obj.charat(pos)&lt;br /&gt;
obj.pos(substring)&lt;br /&gt;
obj.starts(string)&lt;br /&gt;
obj.ends(string)&lt;br /&gt;
obj.substring(index[,length])&lt;br /&gt;
obj.size() - array length&lt;br /&gt;
obj.subarray(index[,length])&lt;br /&gt;
obj.addarray(obj2)&lt;br /&gt;
obj.insertarray(index,obj2)&lt;br /&gt;
obj.index(obj2) - position of obj2 in the array&lt;br /&gt;
obj.clear()&lt;br /&gt;
obj.add(obj2)&lt;br /&gt;
obj.delete(index)&lt;br /&gt;
obj.remove(obj2)&lt;br /&gt;
obj.replace(index,obj2)&lt;br /&gt;
obj.insert(index,obj2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Standard functions ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
format(format,parameters,...) - formats a &amp;quot;%s %d&amp;quot; string, inserts the parameters, and returns a string&lt;br /&gt;
int(a)&lt;br /&gt;
abs(a)&lt;br /&gt;
random(rangestart,rangeend)&lt;br /&gt;
sin(a)&lt;br /&gt;
cos(a)&lt;br /&gt;
arctan(a)&lt;br /&gt;
exp(a)&lt;br /&gt;
log(base,a)&lt;br /&gt;
min(a,b)&lt;br /&gt;
max(a,b)&lt;br /&gt;
getangle(delta x,delta y)&lt;br /&gt;
getdir(delta x,delta y) - returns 0 for up, 1 for left, 2 for down, 3 for right&lt;br /&gt;
vecx(direction)&lt;br /&gt;
vecy(direction)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
&lt;br /&gt;
=== GUI controls ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onAdd() when added to the parent&lt;br /&gt;
onRemove() when removed from the parent&lt;br /&gt;
onWake() when activated&lt;br /&gt;
onSleep() when deactivated&lt;br /&gt;
onResize(w,h)&lt;br /&gt;
onMove(x,y)&lt;br /&gt;
onMouseEnter(modifier,x,y,clickcount)&lt;br /&gt;
onMouseLeave(modifier,x,y,clickcount)&lt;br /&gt;
onMouseDown(modifier,x,y,clickcount)&lt;br /&gt;
onMouseUp(modifier,x,y,clickcount)&lt;br /&gt;
onMouseDragged(modifier,x,y,clickcount)&lt;br /&gt;
onMouseMove(modifier,x,y,clickcount)&lt;br /&gt;
onRightMouseDown(modifier,x,y,clickcount)&lt;br /&gt;
onRightMouseUp(modifier,x,y,clickcount)&lt;br /&gt;
onRightMouseDragged(modifier,x,y,clickcount)&lt;br /&gt;
onMouseWheelUp(modifier,x,y,clickcount)&lt;br /&gt;
onMouseWheelDown(modifier,x,y,clickcount)&lt;br /&gt;
onKeyDown(keycode,string)&lt;br /&gt;
onKeyUp(keycode,string)&lt;br /&gt;
onKeyRepeat(keycode,string)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiMLTextCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onReflow(w,h) when the text has changed&lt;br /&gt;
onURL(url) when clicked on url&lt;br /&gt;
onSelectTag(tagid) when clicked on an image&lt;br /&gt;
&lt;br /&gt;
Text-Tags:&lt;br /&gt;
The text of multi-line text controls can contain&lt;br /&gt;
a few HTML-tags and Torque-tags, you can use both&lt;br /&gt;
of those tag types to define colors and fonts&lt;br /&gt;
or to include images. Currently following tags&lt;br /&gt;
are available:&lt;br /&gt;
&lt;br /&gt;
HTML:&lt;br /&gt;
&amp;lt;a href=url&amp;gt; text &amp;lt;/a&amp;gt; - when the user clicks on 'text' then &lt;br /&gt;
  a web browser is opened for the specified url&lt;br /&gt;
&amp;lt;body bgcolor=colorname or #rrggbb&amp;gt; - sets the background color&lt;br /&gt;
&amp;lt;br&amp;gt; - line break&lt;br /&gt;
&amp;lt;center&amp;gt; text &amp;lt;/center&amp;gt; - centers the contained text&lt;br /&gt;
&amp;lt;font face=fontname size=textsize color=colorname or #rrggbb&amp;gt; text &amp;lt;/font&amp;gt;&lt;br /&gt;
  - draws text with a special font, size and color; you only&lt;br /&gt;
  need to define one of those 3 attributes&lt;br /&gt;
&amp;lt;ignorelinebreaks&amp;gt; &amp;lt;/ignorelinebreaks&amp;gt; - go into normal HTML mode where&lt;br /&gt;
  you need to insert &amp;lt;br&amp;gt; to do a linebreak&lt;br /&gt;
&amp;lt;img src=filename id=integer&amp;gt; - an image is displayed, you &lt;br /&gt;
  can also specify a tagid if you want to get onSelectTag-events&lt;br /&gt;
  for this image&lt;br /&gt;
&amp;lt;p align=left/center/right&amp;gt; text &amp;lt;/p&amp;gt; - sets the align of the &lt;br /&gt;
  contained text&lt;br /&gt;
&amp;lt;span style=&amp;quot;width=100; height=100;&amp;quot; id=integer&amp;gt; &amp;lt;/span&amp;gt; - for &lt;br /&gt;
  displaying a subpage, you can also specifiy an id for &lt;br /&gt;
  onSelectTag-events; instead of &amp;lt;span&amp;gt; you can also use &amp;lt;div&amp;gt; tags&lt;br /&gt;
&lt;br /&gt;
Torque:&lt;br /&gt;
&amp;lt;a:url&amp;gt; text &amp;lt;/a&amp;gt; - when the user clicks on 'text' then &lt;br /&gt;
  a web browser is opened for the specified url&lt;br /&gt;
&amp;lt;bitmap:filename&amp;gt; - an image is displayed&lt;br /&gt;
&amp;lt;color:rrggbb&amp;gt; - sets the color of the text (hexadecimal value)&lt;br /&gt;
&amp;lt;lmargin:pixels&amp;gt; - sets the left margin for the text&lt;br /&gt;
&amp;lt;lmargin%:percent&amp;gt; - sets the size of the left margin depending &lt;br /&gt;
  on the width of the whole control&lt;br /&gt;
&amp;lt;linkcolor:rrggbb&amp;gt; - sets the color of links (the &amp;lt;a&amp;gt;-tag)&lt;br /&gt;
&amp;lt;linkcolorhl:rrggbb&amp;gt; - sets the highlighted color, when&lt;br /&gt;
  the user moves the mouse over a link&lt;br /&gt;
&amp;lt;just:left/center/right&amp;gt; - sets the align of the following text&lt;br /&gt;
&amp;lt;rmargin:pixels&amp;gt; - sets the right margin for the text&lt;br /&gt;
&amp;lt;rmargin%:percent&amp;gt; - sets the size of the right margin depending &lt;br /&gt;
  on the width of the whole control&lt;br /&gt;
&amp;lt;sbreak&amp;gt; - line break&lt;br /&gt;
&amp;lt;spush&amp;gt; - switches to a new style (like &amp;lt;font&amp;gt;)&lt;br /&gt;
&amp;lt;spop&amp;gt; - switches back to the last saved style (like &amp;lt;/font&amp;gt;)&lt;br /&gt;
&amp;lt;tab:tab1,tab2,..&amp;gt; - sets the position of where tabulators should&lt;br /&gt;
  be displayed if you have text like 'Apple \t Egg \t Chicken'&lt;br /&gt;
&amp;lt;tag:id&amp;gt; - inserts an invisible tag which can be used&lt;br /&gt;
  for the scrollToTag(id) function (beside image-tags)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== GuiTextEditCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onTabComplete()&lt;br /&gt;
onAction(text) when return key pressed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiTextListCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onSelect(id,text) when row selected&lt;br /&gt;
onDblClick(id) when double-click on row or return key pressed&lt;br /&gt;
onDeleteKey(id) when delete key pressed&lt;br /&gt;
onIconResized(w,h) when setIconSize() called&lt;br /&gt;
onOpenMenu(0,index,text) when an item was right-clicked&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiPopUpMenuCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onSelect(id,text) when menu option choosen&lt;br /&gt;
onCancel() when menu is closed without action&lt;br /&gt;
onOpenMenu(0,index,text) when an item was right-clicked&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiMenuBar: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onMenuSelect(menuid,menutext)&lt;br /&gt;
onMenuItemSelect(menuid,menutext,itemid,itemtext)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== GuiTreeViewCtrl: ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onSelect(id,rightmouse) when row selected&lt;br /&gt;
onUnselect(id) when row de-selected&lt;br /&gt;
onInspect(id) when clicked on the name of an item&lt;br /&gt;
onOpenMenu(0,index,text) when an item was right-clicked&lt;br /&gt;
onContextMenu(&amp;quot;x y&amp;quot;,id) when clicked with right-mouse key on row&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Old script compatibility ==&lt;br /&gt;
&lt;br /&gt;
=== Removed functionality ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- toinventory&lt;br /&gt;
- followplayer&lt;br /&gt;
- playersays()&lt;br /&gt;
- setbackpal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Supported old scripting commands and their mapping to new script ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
addstring oldstring, oldstring;&lt;br /&gt;
                                addstring(string,string);&lt;br /&gt;
addtiledef oldstring, oldstring, float;&lt;br /&gt;
                                addtiledef(string,string,float);&lt;br /&gt;
addtiledef2 oldstring, oldstring, float, float;&lt;br /&gt;
                                addtiledef2(string,string,float,float);&lt;br /&gt;
attachplayertoobj float, float;&lt;br /&gt;
                                attachplayertoobj(float,float);&lt;br /&gt;
blockagain;&lt;br /&gt;
                                blockagain();&lt;br /&gt;
blockagainlocal;&lt;br /&gt;
                                blockagainlocal();&lt;br /&gt;
callnpc float, oldstring;&lt;br /&gt;
                                callnpc(float,string);&lt;br /&gt;
callweapon float, oldstring;&lt;br /&gt;
                                callweapon(float,string);&lt;br /&gt;
canbecarried;&lt;br /&gt;
                                canbecarried();&lt;br /&gt;
canbepulled;&lt;br /&gt;
                                canbepulled();&lt;br /&gt;
canbepushed;&lt;br /&gt;
                                canbepushed();&lt;br /&gt;
cannotbecarried;&lt;br /&gt;
                                cannotbecarried();&lt;br /&gt;
cannotbepulled;&lt;br /&gt;
                                cannotbepulled();&lt;br /&gt;
cannotbepushed;&lt;br /&gt;
                                cannotbepushed();&lt;br /&gt;
canwarp;&lt;br /&gt;
                                canwarp();&lt;br /&gt;
canwarp2;&lt;br /&gt;
                                canwarp2();&lt;br /&gt;
carryobject oldstring;&lt;br /&gt;
                                carryobject(string);&lt;br /&gt;
changeimgcolors float, float, float, float, float;&lt;br /&gt;
                                changeimgcolors(float,float,float,float,float);&lt;br /&gt;
changeimgmode float, float;&lt;br /&gt;
                                changeimgmode(float,float);&lt;br /&gt;
changeimgpart float, float, float, float, float;&lt;br /&gt;
                                changeimgpart(float,float,float,float,float);&lt;br /&gt;
changeimgvis float, float;&lt;br /&gt;
                                changeimgvis(float,float);&lt;br /&gt;
changeimgzoom float, float;&lt;br /&gt;
                                changeimgzoom(float,float);&lt;br /&gt;
deletestring oldstring, float;&lt;br /&gt;
                                deletestring(string,float);&lt;br /&gt;
destroy;&lt;br /&gt;
                                destroy();&lt;br /&gt;
detachplayer;&lt;br /&gt;
                                detachplayer();&lt;br /&gt;
disabledefmovement;&lt;br /&gt;
                                disabledefmovement();&lt;br /&gt;
disablemap;&lt;br /&gt;
                                disablemap();&lt;br /&gt;
disablepause;&lt;br /&gt;
                                disablepause();&lt;br /&gt;
disableselectweapons;&lt;br /&gt;
                                disableselectweapons();&lt;br /&gt;
disableweapons;&lt;br /&gt;
                                disableweapons();&lt;br /&gt;
dontblock;&lt;br /&gt;
                                dontblock();&lt;br /&gt;
dontblocklocal;&lt;br /&gt;
                                dontblocklocal();&lt;br /&gt;
drawaslight;&lt;br /&gt;
                                drawaslight();&lt;br /&gt;
drawoverplayer;&lt;br /&gt;
                                drawoverplayer();&lt;br /&gt;
drawunderplayer;&lt;br /&gt;
                                drawunderplayer();&lt;br /&gt;
enabledefmovement;&lt;br /&gt;
                                enabledefmovement();&lt;br /&gt;
enablefeatures float;&lt;br /&gt;
                                enablefeatures(float);&lt;br /&gt;
enablemap;&lt;br /&gt;
                                enablemap();&lt;br /&gt;
enablepause;&lt;br /&gt;
                                enablepause();&lt;br /&gt;
enableselectweapons;&lt;br /&gt;
                                enableselectweapons();&lt;br /&gt;
enableweapons;&lt;br /&gt;
                                enableweapons();&lt;br /&gt;
explodebomb float;&lt;br /&gt;
                                explodebomb(float);&lt;br /&gt;
followplayer;&lt;br /&gt;
                                followplayer();&lt;br /&gt;
freezeplayer float;&lt;br /&gt;
                                freezeplayer(float);&lt;br /&gt;
freezeplayer2;&lt;br /&gt;
                                freezeplayer2();&lt;br /&gt;
hide;&lt;br /&gt;
                                hide();&lt;br /&gt;
hideimg float;&lt;br /&gt;
                                hideimg(float);&lt;br /&gt;
hideimgs float, float;&lt;br /&gt;
                                hideimgs(float,float);&lt;br /&gt;
hidelocal;&lt;br /&gt;
                                hidelocal();&lt;br /&gt;
&lt;br /&gt;
hitcompu float, float, float, float;&lt;br /&gt;
                                hitcompu(float,float,float,float);&lt;br /&gt;
hitnpc float, float, float, float;&lt;br /&gt;
                                hitnpc(float,float,float,float);&lt;br /&gt;
hitobjects float, float, float;&lt;br /&gt;
                                hitobjects(float,float,float);&lt;br /&gt;
hideplayer float;&lt;br /&gt;
                                hideplayer(float);&lt;br /&gt;
hidesword float;&lt;br /&gt;
                                hidesword(float);&lt;br /&gt;
hitplayer float, float, float, float;&lt;br /&gt;
                                hitplayer(float,float,float,float);&lt;br /&gt;
hurt float;&lt;br /&gt;
                                hurt(float);&lt;br /&gt;
insertstring oldstring, float, oldstring;&lt;br /&gt;
                                insertstring(string,float,string);&lt;br /&gt;
join oldstring;&lt;br /&gt;
                                join(string);&lt;br /&gt;
lay oldstring;&lt;br /&gt;
                                lay(string);&lt;br /&gt;
lay2 oldstring, float, float;&lt;br /&gt;
                                lay2(string,float,float);&lt;br /&gt;
loadmap oldstring;&lt;br /&gt;
                                loadmap(string);&lt;br /&gt;
message oldstring;&lt;br /&gt;
                                message(string);&lt;br /&gt;
move float, float, float, float;&lt;br /&gt;
                                move(float,float,float,float);&lt;br /&gt;
noplayerkilling;&lt;br /&gt;
                                noplayerkilling();&lt;br /&gt;
openurl oldstring;&lt;br /&gt;
                                openurl(string);&lt;br /&gt;
openurl2 oldstring, float, float;&lt;br /&gt;
                                openurl2(string,float,float);&lt;br /&gt;
play oldstring;&lt;br /&gt;
                                play(string);&lt;br /&gt;
play2 oldstring, float, float, float;&lt;br /&gt;
                                play2(string,float,float,float);&lt;br /&gt;
playlooped oldstring;&lt;br /&gt;
                                playlooped(string);&lt;br /&gt;
putbomb float, float, float;&lt;br /&gt;
                                putbomb(float,float,float);&lt;br /&gt;
putcomp oldstring, float, float;&lt;br /&gt;
                                putcomp(string,float,float);&lt;br /&gt;
putexplosion float, float, float;&lt;br /&gt;
                                putexplosion(float,float,float);&lt;br /&gt;
putexplosion2 float, float, float, float;&lt;br /&gt;
                                putexplosion2(float,float,float,float);&lt;br /&gt;
puthorse oldstring, float, float;&lt;br /&gt;
                                puthorse(string,float,float);&lt;br /&gt;
putleaps float, float, float;&lt;br /&gt;
                                putleaps(float,float,float);&lt;br /&gt;
putnewcomp oldstring, float, float, oldstring, float;&lt;br /&gt;
                                putnewcomp(string,float,float,string,float);&lt;br /&gt;
putnpc oldstring, oldstring, float, float;&lt;br /&gt;
                                putnpc(string,string,float,float);&lt;br /&gt;
putnpc2 float, float, oldstring;&lt;br /&gt;
                                putnpc2(float,float,string);&lt;br /&gt;
reflectarrow float;&lt;br /&gt;
                                reflectarrow(float);&lt;br /&gt;
removearrow float;&lt;br /&gt;
                                removearrow(float);&lt;br /&gt;
removebomb float;&lt;br /&gt;
                                removebomb(float);&lt;br /&gt;
removecompus;&lt;br /&gt;
                                removecompus();&lt;br /&gt;
removeexplo float;&lt;br /&gt;
                                removeexplo(float);&lt;br /&gt;
removehorse float;&lt;br /&gt;
                                removehorse(float);&lt;br /&gt;
rmeoveitem float;&lt;br /&gt;
                                removeitem(float)&lt;br /&gt;
removestring oldstring, oldstring;&lt;br /&gt;
                                removestring(string,string);&lt;br /&gt;
removetiledefs oldstring;&lt;br /&gt;
                                removetiledefs(string);&lt;br /&gt;
replaceani oldstring, oldstring;&lt;br /&gt;
                                replaceani(string,string);&lt;br /&gt;
replacestring oldstring, float, oldstring;&lt;br /&gt;
                                replacestring(string,float,string);&lt;br /&gt;
resetfocus;&lt;br /&gt;
                                resetfocus();&lt;br /&gt;
savelog oldstring;&lt;br /&gt;
                                savelog(string);&lt;br /&gt;
savelog2 oldstring, oldstring;&lt;br /&gt;
                                savelog2(string,string);&lt;br /&gt;
say float;&lt;br /&gt;
                                say(float);&lt;br /&gt;
say2 oldstring;&lt;br /&gt;
                                say2(string);&lt;br /&gt;
sendrpgmessage oldstring;&lt;br /&gt;
                                sendrpgmessage(string);&lt;br /&gt;
sendpm oldstring;&lt;br /&gt;
                                sendpm(string);&lt;br /&gt;
sendtonc oldstring;&lt;br /&gt;
                                sendtonc(string);&lt;br /&gt;
sendtorc oldstring;&lt;br /&gt;
                                sendtorc(string);&lt;br /&gt;
serverwarp oldstring;&lt;br /&gt;
                                serverwarp(string);&lt;br /&gt;
set oldstring;&lt;br /&gt;
                                set(string);&lt;br /&gt;
setani oldstring, oldstring;&lt;br /&gt;
                                setani(string,string);&lt;br /&gt;
setarray float, float;&lt;br /&gt;
                                setarray(var,float);&lt;br /&gt;
setbeltcolor oldstring;&lt;br /&gt;
                                setbeltcolor(string);&lt;br /&gt;
setbow oldstring;&lt;br /&gt;
                                setbow(string);&lt;br /&gt;
setcharani oldstring, oldstring;&lt;br /&gt;
                                setcharani(string,string);&lt;br /&gt;
setchargender oldstring;&lt;br /&gt;
                                setchargender(string);&lt;br /&gt;
setcharprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setcoatcolor oldstring;&lt;br /&gt;
                                setcoatcolor(string);&lt;br /&gt;
setcoloreffect float, float, float, float;&lt;br /&gt;
                                setcoloreffect(float,float,float,float);&lt;br /&gt;
setcursor float;&lt;br /&gt;
                                setcursor(float);&lt;br /&gt;
setcurcor2 oldstring;&lt;br /&gt;
                                setcursor2(string);&lt;br /&gt;
seteffect float, float, float, float;&lt;br /&gt;
                                seteffect(float,float,float,float);&lt;br /&gt;
seteffectmode float;&lt;br /&gt;
                                seteffectmode(float);&lt;br /&gt;
setfocus float, float;&lt;br /&gt;
                                setfocus(float,float);&lt;br /&gt;
setgender oldstring;&lt;br /&gt;
                                setgender(string);&lt;br /&gt;
sethead oldstring;&lt;br /&gt;
                                sethead(string);&lt;br /&gt;
setlevel oldstring;&lt;br /&gt;
                                setlevel(string);&lt;br /&gt;
setlevel2 oldstring, float, float;&lt;br /&gt;
                                setlevel2(string,float,float);&lt;br /&gt;
setmap oldstring, oldstring, float, float;&lt;br /&gt;
                                setmap(string,string,float,float);&lt;br /&gt;
setminimap oldstring, oldstring, float, float;&lt;br /&gt;
                                setminimap(string,string,float,float);&lt;br /&gt;
setmusicvolume float, float;&lt;br /&gt;
                                setmusicvolume(float,float);&lt;br /&gt;
setimg oldstring;&lt;br /&gt;
                                setimg(string);&lt;br /&gt;
setimgpart oldstring, float, float, float, float;&lt;br /&gt;
                                setimgpart(string,float,float,float,float);&lt;br /&gt;
setletters oldstring;&lt;br /&gt;
                                setletters(string);&lt;br /&gt;
setplayerdir oldstring;&lt;br /&gt;
                                setplayerdir(string);&lt;br /&gt;
setplayerprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setpm oldstring;&lt;br /&gt;
                                setpm(string);&lt;br /&gt;
setshape float, float, float;&lt;br /&gt;
                                setshape(float,float,float);&lt;br /&gt;
setshape2 float, float, float;&lt;br /&gt;
                                setshape2(float,float,float);&lt;br /&gt;
setshield oldstring, float;&lt;br /&gt;
                                setshield(string,float);&lt;br /&gt;
setshoecolor oldstring;&lt;br /&gt;
                                setshoecolor(string);&lt;br /&gt;
setshootparams oldstring;&lt;br /&gt;
                                setshootparams(string);&lt;br /&gt;
setskincolor oldstring;&lt;br /&gt;
                                setskincolor(string);&lt;br /&gt;
setsleevecolor oldstring;&lt;br /&gt;
                                setsleevecolor(string);&lt;br /&gt;
setstring oldstring, oldstring;&lt;br /&gt;
                                setstring(string,string);&lt;br /&gt;
setsword oldstring, float;&lt;br /&gt;
                                setsword(string,float);&lt;br /&gt;
seturllevel oldstring;&lt;br /&gt;
                                seturllevel(string);&lt;br /&gt;
setz float, float, float, float, float, float, float, float;&lt;br /&gt;
                                setz(float,float,float,float,float,float,float,float);&lt;br /&gt;
setzoomeffect float;&lt;br /&gt;
                                setzoomeffect(float);&lt;br /&gt;
shoot float, float, float, float, float, float, oldstring, oldstring;&lt;br /&gt;
                                shoot(float,float,float,float,float,float,string,string);&lt;br /&gt;
shootarrow float;&lt;br /&gt;
                                shootarrow(float);&lt;br /&gt;
shootball;&lt;br /&gt;
                                shootball();&lt;br /&gt;
shootfireball float;&lt;br /&gt;
                                shootfireball(float);&lt;br /&gt;
shootfireblast float;&lt;br /&gt;
                                shootfireblast(float);&lt;br /&gt;
shootnuke float;&lt;br /&gt;
                                shootnuke(float);&lt;br /&gt;
show;&lt;br /&gt;
                                show();&lt;br /&gt;
showani float, float, float, float, oldstring;&lt;br /&gt;
                                showani(float,float,float,float,string);&lt;br /&gt;
showani2 float, float, float, float, float, oldstring;&lt;br /&gt;
                                showani2(float,float,float,float,float,string);&lt;br /&gt;
showcharacter;&lt;br /&gt;
                                showcharacter();&lt;br /&gt;
showfile oldstring;&lt;br /&gt;
                                showfile(string);&lt;br /&gt;
showimg float, oldstring, float, float;&lt;br /&gt;
                                showimg(float,string,float,float);&lt;br /&gt;
showimg2 float, oldstring, float, float, float;&lt;br /&gt;
                                showimg2(float,string,float,float,float);&lt;br /&gt;
showlocal;&lt;br /&gt;
                                showlocal();&lt;br /&gt;
&lt;br /&gt;
showpoly float, float;&lt;br /&gt;
                                showpoly(float,array);&lt;br /&gt;
showpoly2 float, float;&lt;br /&gt;
                                showpoly2(float,array);&lt;br /&gt;
showstats float;&lt;br /&gt;
                                showstats(float);&lt;br /&gt;
showtext float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext(float,float,float,string,string,string);&lt;br /&gt;
showtext2 float, float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext2(float,float,float,float,string,string,string);&lt;br /&gt;
sleep float;&lt;br /&gt;
                                sleep(float);&lt;br /&gt;
spyfire float, float;&lt;br /&gt;
                                spyfire(float,float);&lt;br /&gt;
stopmidi;&lt;br /&gt;
                                stopmidi();&lt;br /&gt;
stopsound oldstring;&lt;br /&gt;
                                stopsound(string);&lt;br /&gt;
take oldstring;&lt;br /&gt;
                                take(string);&lt;br /&gt;
take2 float;&lt;br /&gt;
                                take2(float);&lt;br /&gt;
takehorse float;&lt;br /&gt;
                                takehorse(float);&lt;br /&gt;
takeplayercarry;&lt;br /&gt;
                                takeplayercarry();&lt;br /&gt;
takeplayerhorse;&lt;br /&gt;
                                takeplayerhorse();&lt;br /&gt;
throwcarry;&lt;br /&gt;
                                throwcarry();&lt;br /&gt;
timereverywhere;&lt;br /&gt;
                                timereverywhere();&lt;br /&gt;
timershow;&lt;br /&gt;
                                timershow();&lt;br /&gt;
toinventory oldstring;&lt;br /&gt;
                                toinventory(string);&lt;br /&gt;
tokenize oldstring;&lt;br /&gt;
                                tokens = string.tokenize();&lt;br /&gt;
tokenize2 oldstring, oldstring;&lt;br /&gt;
                                tokens = string.tokenize(&amp;quot; ,&amp;quot; @ string);&lt;br /&gt;
toweapons oldstring;&lt;br /&gt;
                                toweapons(string);&lt;br /&gt;
triggeraction float, float, oldstring, oldstring;&lt;br /&gt;
                                triggeraction(float,float,string,string);&lt;br /&gt;
unfreezeplayer;&lt;br /&gt;
                                unfreezeplayer();&lt;br /&gt;
unset oldstring;&lt;br /&gt;
                                unset(string);&lt;br /&gt;
updateboard float, float, float, float;&lt;br /&gt;
                                updateboard(float,float,float,float);&lt;br /&gt;
updateterrain;&lt;br /&gt;
                                updateterrain();&lt;br /&gt;
wraptext float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext(float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
wraptext2 float, float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext2(float,float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Supported old string operations ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
These old string operators can be used in string parameters&lt;br /&gt;
for the old commands, also you can use them directly as operators, e.g.&lt;br /&gt;
#c = &amp;quot;hello&amp;quot;&lt;br /&gt;
is actually doing&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#a            player.account&lt;br /&gt;
#a(float)     players[float].account&lt;br /&gt;
#m            player.ani&lt;br /&gt;
              ani&lt;br /&gt;
#m(float)     players[float].ani&lt;br /&gt;
#K(float)     char(float)&lt;br /&gt;
#8            player.bodyimg&lt;br /&gt;
              bodyimg&lt;br /&gt;
#8(float)     players[float].bodyimg&lt;br /&gt;
#c            player.chat&lt;br /&gt;
              chat&lt;br /&gt;
#c(float)     players[float].chat&lt;br /&gt;
#C0           player.colors[0]&lt;br /&gt;
              colors[0]&lt;br /&gt;
#C0(float)    players[float].colors[0]&lt;br /&gt;
#C1           player.colors[1]&lt;br /&gt;
              colors[1]&lt;br /&gt;
#C1(float)    players[float].colors[1]&lt;br /&gt;
#C2           player.colors[2]&lt;br /&gt;
              colors[2]&lt;br /&gt;
#C2(float)    players[float].colors[2]&lt;br /&gt;
#C3           player.colors[3]&lt;br /&gt;
              colors[3]&lt;br /&gt;
#C3(float)    players[float].colors[3]&lt;br /&gt;
#C4           player.colors[4]&lt;br /&gt;
              colors[4]&lt;br /&gt;
#C4(float)    players[float].colors[4]&lt;br /&gt;
#C5           player.colors[5]&lt;br /&gt;
              colors[5]&lt;br /&gt;
#C5(float)    players[float].colors[5]&lt;br /&gt;
#D            downloadfile()&lt;br /&gt;
#E            emoticonchar()&lt;br /&gt;
#e(float,float,oldstring)&lt;br /&gt;
              string.substring(float,float)&lt;br /&gt;
#g            player.guild&lt;br /&gt;
              guild&lt;br /&gt;
#g(float)     players[float].guild&lt;br /&gt;
#3            player.headimg&lt;br /&gt;
              headimg&lt;br /&gt;
#3(float)     players[float].headimg&lt;br /&gt;
#5            player.horseimg&lt;br /&gt;
              horseimg&lt;br /&gt;
#5(float)     players[float].horseimg&lt;br /&gt;
#k(float)     keyname(float)&lt;br /&gt;
#L            player.level&lt;br /&gt;
#I(oldstring,float)&lt;br /&gt;
              getstring(string)[float]&lt;br /&gt;
#n            player.nick&lt;br /&gt;
              nick&lt;br /&gt;
#n(float)     players[float].nick&lt;br /&gt;
#f            image&lt;br /&gt;
#f(float)     npcs[float].image&lt;br /&gt;
#F            level&lt;br /&gt;
#p(float)     params[float]&lt;br /&gt;
#P(float)     player.attr[float]&lt;br /&gt;
              attr[float]&lt;br /&gt;
#P(float_1,float_2)&lt;br /&gt;
              players[float_2].attr[float_1]&lt;br /&gt;
#P1           player.attr[1]&lt;br /&gt;
              attr[1]&lt;br /&gt;
#P1(float)    players[float].attr[1]&lt;br /&gt;
#P2           player.attr[2]&lt;br /&gt;
              attr[2]&lt;br /&gt;
#P2(float)    players[float].attr[2]&lt;br /&gt;
#P3           player.attr[3]&lt;br /&gt;
              attr[3]&lt;br /&gt;
#P3(float)    players[float].attr[3]&lt;br /&gt;
#P4           player.attr[4]&lt;br /&gt;
              attr[4]&lt;br /&gt;
#P4(float)    players[float].attr[4]&lt;br /&gt;
#P5           player.attr[5]&lt;br /&gt;
              attr[5]&lt;br /&gt;
#P5(float)    players[float].attr[5]&lt;br /&gt;
#P6           player.attr[6]&lt;br /&gt;
              attr[6]&lt;br /&gt;
#P6(float)    players[float].attr[6]&lt;br /&gt;
#P7           player.attr[7]&lt;br /&gt;
              attr[7]&lt;br /&gt;
#P7(float)    players[float].attr[7]&lt;br /&gt;
#P8           player.attr[8]&lt;br /&gt;
              attr[8]&lt;br /&gt;
#P8(float)    players[float].attr[8]&lt;br /&gt;
#P9           player.attr[9]&lt;br /&gt;
              attr[9]&lt;br /&gt;
#P9(float)    players[float].attr[9]&lt;br /&gt;
#R(oldstring) string.random()&lt;br /&gt;
#2            player.shieldimg&lt;br /&gt;
              shieldimg&lt;br /&gt;
#2(float)     players[float].shieldimg&lt;br /&gt;
#s(oldstring) getstring(string)&lt;br /&gt;
#1            player.swordimg&lt;br /&gt;
              swordimg&lt;br /&gt;
#1(float)     players[float].swordimg&lt;br /&gt;
#S            player.sword.script&lt;br /&gt;
#t(float)     tokens[float]&lt;br /&gt;
#T(oldstring) string.trim()&lt;br /&gt;
#v(float)     float&lt;br /&gt;
#W            player.weapon.image&lt;br /&gt;
#W(float)     weapons[float].image&lt;br /&gt;
#w            player.weapon.name&lt;br /&gt;
#w(float)     weapons[float].name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Compatibility note:&lt;br /&gt;
When you use the command setcharprop then the first parameter&lt;br /&gt;
is handled differently: instead of changing 'player.chat' it&lt;br /&gt;
is changing 'chat', the chat text of the npc. So 'setcharprop #c,hello'&lt;br /&gt;
would be translated into&lt;br /&gt;
chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
while 'setplayerprop #c,hello' is translated into&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
In the list above both possibilities are listed.&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/Old_GScript&amp;diff=5095</id>
		<title>Creation/Dev/Old GScript</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/Old_GScript&amp;diff=5095"/>
		<updated>2005-12-02T20:46:20Z</updated>

		<summary type="html">&lt;p&gt;Chad: Still needs some work, but it's here now&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=User:Lance&amp;diff=4994</id>
		<title>User:Lance</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=User:Lance&amp;diff=4994"/>
		<updated>2005-11-11T04:45:24Z</updated>

		<summary type="html">&lt;p&gt;Chad: roll back&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Player}}&lt;br /&gt;
&lt;br /&gt;
Lance is a medium-time [[Graal]] [[Player]] and [[Graal administration|staff]] member.&lt;br /&gt;
&lt;br /&gt;
== Community ==&lt;br /&gt;
&lt;br /&gt;
Lance is an avid member of [[GScript IRC channel|#gscript]], in which he is a mid-level channel operator.&lt;br /&gt;
&lt;br /&gt;
== Development Areas ==&lt;br /&gt;
&lt;br /&gt;
Lance considers himself fairly decent at [[NPC scripting]]. He dabbles in the other development areas only by necessity.&lt;br /&gt;
&lt;br /&gt;
== Staff Positions ==&lt;br /&gt;
&lt;br /&gt;
Lance is a leading member of the [[GST]] and one of the few original members remaining.&lt;br /&gt;
&lt;br /&gt;
In addition to that, Lance manages [[Graal2001]], though it is suffering a lack of staff lately.&lt;br /&gt;
&lt;br /&gt;
Lance also moderates the [[GCC:NPC scripting]] and [[GCC:Graal2001]] forums at the [[Graal Communication Center]].&lt;br /&gt;
&lt;br /&gt;
== Graal Accounts ==&lt;br /&gt;
&lt;br /&gt;
Lance, Tseng, Tseng2&lt;br /&gt;
&lt;br /&gt;
There are rumors that Lance has other, secret accounts, but he will assure you that these rumors are wholly unfounded.&lt;br /&gt;
&lt;br /&gt;
== Contact ==&lt;br /&gt;
&lt;br /&gt;
Lance can be reached by email at [mailto:lance@graalonline.com] or by [[GCC:PM|forum PM]].&lt;br /&gt;
&lt;br /&gt;
Also, he can often be found at [irc://irc.freenode.org/gscript].&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Main_Page&amp;diff=4993</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Main_Page&amp;diff=4993"/>
		<updated>2005-11-11T04:44:40Z</updated>

		<summary type="html">&lt;p&gt;Chad: yay for idiots&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[GScript IRC channel|#gscript]] community hopes that this site can provide a comprehensive and up to date resource of documentation of [[Graal]]'s various features, which would be impossible without the great interactivity of a [[Wikipedia:Wiki|Wiki]]. Currently, the focus is mainly on technical aspects ([[GScript]], [[Graal4]]) due to the technical nature of the community's interest, but the intent is to eventually provide guides to established playerworlds, various Graal-related communities and information on [[GraalOnline]] procedures.&lt;br /&gt;
&lt;br /&gt;
The most well known and largest Wiki is most definitely the [http://www.wikipedia.org Wikipedia], and the first [[Wiki:WikiWikiWeb]] is part of Ward Cunningham's [http://c2.com/ Portland Pattern Repository]. Hopefully the obvious success of both, and the independence and open-mindedness of this Wiki, will encourage [[Graalian]]s to similar greatness.&lt;br /&gt;
&lt;br /&gt;
If you're new here, why not take a look at the [[Special:Allpages|master page listing]] or a [[Special:Randompage|random page]] to get you started? If you want to contribute to some work currently in progress, you might want to have a look at the [[Special:Recentchanges|recently changed]] pages as well. If you find a page that can be improved, you are invited to do so! You can also just use the Search function to find pages about topics that interest you, or start a new one if you cannot find one.&lt;br /&gt;
&lt;br /&gt;
Also an interesting article could be [[List of Events]], which contains all the happenings and events on Graal. Feel free to update if if something happens.&lt;br /&gt;
&lt;br /&gt;
If you need help, consider joining the [[GScript IRC channel|#gscript]] channel [irc://irc.freenode.org/gscript] and asking for advice.&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Main_Page&amp;diff=4599</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Main_Page&amp;diff=4599"/>
		<updated>2005-09-17T17:03:57Z</updated>

		<summary type="html">&lt;p&gt;Chad: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[GScript IRC channel|#gscript]] community hopes that this site can provide a comprehensive and up to date resource of documentation of [[Graal]]'s various features, which would be impossible without the great interactivity of a [[Wikipedia:Wiki|Wiki]]. Currently, the focus is mainly on technical aspects ([[GScript]], [[Graal4]]) due to the technical nature of the community's interest, but the intent is to eventually provide guides to established playerworlds, various Graal-related communities and information on [[GraalOnline]] procedures.&lt;br /&gt;
&lt;br /&gt;
The most well known and largest Wiki is most definitely the [http://www.wikipedia.org Wikipedia], and the first [[Wiki:WikiWikiWeb]] is part of Ward Cunningham's [http://c2.com/ Portland Pattern Repository]. Hopefully the obvious success of both, and the independence and open-mindedness of this Wiki, will encourage [[Graalian]]s to similar greatness.&lt;br /&gt;
&lt;br /&gt;
If you're new here, why not take a look at the [[Special:Allpages|master page listing]] or a [[Special:Randompage|random page]] to get you started? If you want to contribute to some work currently in progress, you might want to have a look at the [[Special:Recentchanges|recently changed]] pages as well. If you find a page that can be improved, you are invited to do so! You can also just use the Search function to find pages about topics that interest you, or start a new one if you cannot find one.&lt;br /&gt;
&lt;br /&gt;
If you need help, consider joining the [[GScript IRC channel|#gscript]] channel [irc://irc.freenode.org/gscript] and asking for advice.&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Graphic&amp;diff=3965</id>
		<title>Graphic</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Graphic&amp;diff=3965"/>
		<updated>2005-09-11T02:00:53Z</updated>

		<summary type="html">&lt;p&gt;Chad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Graphics are things that talented people make for games, sites, almost anything to do with technology.  [[Graal]] uses [http://en.wikipedia.org/wiki/Raster_graphics Raster] image formats such as JPEG, GIF, and [[PNG]] formats.  The GIF and JPEG are currently being replaced by PNG as per Stefan's request.  [http://en.wikipedia.org/wiki/Vector_graphics Vector] graphics are not implemented in Graal's engine and no plans are known if they will be implemented, however the [[GScript]] command showpoly(index,array) is sufficient for most applications of vector graphics.&lt;br /&gt;
{{stub}}&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=User:Chad&amp;diff=3945</id>
		<title>User:Chad</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=User:Chad&amp;diff=3945"/>
		<updated>2005-09-11T01:58:57Z</updated>

		<summary type="html">&lt;p&gt;Chad: /* Development areas */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{player}}&lt;br /&gt;
==Community role==&lt;br /&gt;
Chad has mostly played a back seat role in the actual game community of [[Graal]].  He played Classic during the years of 2000-2001, but began to spend much more time on the [[Graal Communication Center]].  Recently, he has divulged himself from the forums and hangs around the [[GScript IRC channel]] whenever online. &amp;lt;br /&amp;gt;&lt;br /&gt;
Guilds: #gscript, VIP&lt;br /&gt;
&lt;br /&gt;
==Development areas==&lt;br /&gt;
Being fairly adept at math and physics, Chad has spent a good deal of time applying such topics in [[GScript]].  For one reason or another, he still prefers to script offline, but has quit using the .graal format as of late 2004.  He has dabbled in [[Graphic|graphics]] and [[Level|level]] design, but found little interest in such areas.  Because of his enjoyment and ease of adapting to thinking like a programmer, he has decided to try for a career in game development.&lt;br /&gt;
&lt;br /&gt;
==Staff positions==&lt;br /&gt;
Chad does not like to work for servers, but because of his friendly nature he has helped out a little on a few projects, although he will cite different motives for these positions. &lt;br /&gt;
&lt;br /&gt;
==Accounts==&lt;br /&gt;
Dach - main account (supposed to be &amp;quot;Chad&amp;quot; spelled backwards, but typos happen) &amp;lt;br /&amp;gt;&lt;br /&gt;
NewbieChad - made for fun, but was upgraded at one point for some reason and is now used for testing (when applicable)&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
email - LyleBarbatuous@gmail.com &amp;lt;br /&amp;gt;&lt;br /&gt;
AIM - michaelangelo36 (Chad has been known to block people without warning) &amp;lt;br /&amp;gt;&lt;br /&gt;
LJ - http://www.livejournal.com/users/chadisgod/&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Zelda_Online&amp;diff=3841</id>
		<title>Zelda Online</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Zelda_Online&amp;diff=3841"/>
		<updated>2005-09-11T01:50:10Z</updated>

		<summary type="html">&lt;p&gt;Chad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The original name of what is now known as [[Graal]]. Changed due to legal difficulties. &amp;lt;br /&amp;gt;&lt;br /&gt;
It was then a browser based application programmed in Java.&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Graphic&amp;diff=2718</id>
		<title>Graphic</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Graphic&amp;diff=2718"/>
		<updated>2005-09-11T01:45:21Z</updated>

		<summary type="html">&lt;p&gt;Chad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Graphics are things that talented people make for games, sites, almost anything to do with technology.  [[Graal]] uses [http://en.wikipedia.org/wiki/Raster_graphics Raster] image formats such as JPEG, GIF, and PNG formats.  The GIF and JPEG are currently being replaced by PNG as per Stefan's request.  [http://en.wikipedia.org/wiki/Vector_graphics Vector] graphics are not implemented in Graal's engine and no plans are known if they will be implemented, however the [[GScript]] command showpoly(index,array) is sufficient for most applications of vector graphics.&lt;br /&gt;
{{stub}}&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Graphic&amp;diff=2715</id>
		<title>Graphic</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Graphic&amp;diff=2715"/>
		<updated>2005-09-11T01:42:54Z</updated>

		<summary type="html">&lt;p&gt;Chad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Graphics are things that talented people make for games, sites, almost anything to do with technology.  [[Graal]] uses [http://en.wikipedia.org/wiki/Raster_graphics Raster] image formats such as JPEG, GIF, and PNG formats.  The GIF and JPEG are currently being replaced by PNG as per Stefan's request.  [http://en.wikipedia.org/wiki/Vector_graphics Vector] graphics are not implemented in Graal's engine and no plans are known if they will be implemented, however the [[GScript]] command showpoly(index,array) is sufficient for most applications of vector graphics.&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Graphic&amp;diff=2714</id>
		<title>Graphic</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Graphic&amp;diff=2714"/>
		<updated>2005-09-11T01:38:30Z</updated>

		<summary type="html">&lt;p&gt;Chad: made it into a real entry&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Graphics are things that talented people make for games, sites, almost anything to do with technology.  Graal uses Raster graphics such as JPEG, GIF, and PNG formats.  The GIF and JPEG are currently being replaced by PNG as per Stefan's request.  Vector graphics are not implemented in Graal's engine and no plans are known if they will be implemented, however the command showpoly(index,array) will sufficiently accomplish most uses of vector graphics.&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Graal4&amp;diff=3911</id>
		<title>Graal4</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Graal4&amp;diff=3911"/>
		<updated>2005-08-28T16:59:23Z</updated>

		<summary type="html">&lt;p&gt;Chad: last edit didn't make sense&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Graal4''' is the newest version of the [[Graal]] game client. It is currently only available to those with a [[VIP account|VIP account]].&lt;br /&gt;
&lt;br /&gt;
Graal4 is a cross between [[Graal2]] and [[Graal3]]. It also contains some new features such as the [[Global Playerlist]], the [[Particle Engine]] and [[Graal v4 IRC|in-game IRC-like chat]].&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Graal4&amp;diff=2588</id>
		<title>Graal4</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Graal4&amp;diff=2588"/>
		<updated>2005-08-28T16:58:22Z</updated>

		<summary type="html">&lt;p&gt;Chad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Graal4''' is the newest version of the [[Graal]] game client. It is currently only available to a select group of [[VIP account|VIPs]].&lt;br /&gt;
&lt;br /&gt;
Graal4 is a cross between [[Graal2]] and [[Graal3]]. It also contains some new features such as the [[Global Playerlist]], the [[Particle Engine]] and [[Graal v4 IRC|in-game IRC-like chat]].&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=User:Chad&amp;diff=2717</id>
		<title>User:Chad</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=User:Chad&amp;diff=2717"/>
		<updated>2005-07-24T00:52:11Z</updated>

		<summary type="html">&lt;p&gt;Chad: /* Contact */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{player}}&lt;br /&gt;
==Community role==&lt;br /&gt;
Chad has mostly played a back seat role in the actual game community of [[Graal]].  He played Classic during the years of 2000-2001, but began to spend much more time on the [[Graal Communication Center]].  Recently, he has divulged himself from the forums and hangs around the [[GScript IRC channel]] whenever online. &amp;lt;br /&amp;gt;&lt;br /&gt;
Guilds: #gscript, VIP&lt;br /&gt;
&lt;br /&gt;
==Development areas==&lt;br /&gt;
Being fairly adept at math and physics, Chad has spent a good deal of time applying such topics in [[GScript]].  For one reason or another, he still prefers to script offline, but has quit using the .graal format as of late 2004.  He has dabbled in graphics and level design, but found little interest in such areas.  Because of his enjoyment and ease of adapting to thinking like a programmer, he has decided to try for a career in game development.&lt;br /&gt;
&lt;br /&gt;
==Staff positions==&lt;br /&gt;
Chad does not like to work for servers, but because of his friendly nature he has helped out a little on a few projects, although he will cite different motives for these positions. &lt;br /&gt;
&lt;br /&gt;
==Accounts==&lt;br /&gt;
Dach - main account (supposed to be &amp;quot;Chad&amp;quot; spelled backwards, but typos happen) &amp;lt;br /&amp;gt;&lt;br /&gt;
NewbieChad - made for fun, but was upgraded at one point for some reason and is now used for testing (when applicable)&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
email - LyleBarbatuous@gmail.com &amp;lt;br /&amp;gt;&lt;br /&gt;
AIM - michaelangelo36 (Chad has been known to block people without warning) &amp;lt;br /&amp;gt;&lt;br /&gt;
LJ - http://www.livejournal.com/users/chadisgod/&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=User:Chad&amp;diff=2380</id>
		<title>User:Chad</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=User:Chad&amp;diff=2380"/>
		<updated>2005-07-24T00:51:47Z</updated>

		<summary type="html">&lt;p&gt;Chad: /* Contact */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{player}}&lt;br /&gt;
==Community role==&lt;br /&gt;
Chad has mostly played a back seat role in the actual game community of [[Graal]].  He played Classic during the years of 2000-2001, but began to spend much more time on the [[Graal Communication Center]].  Recently, he has divulged himself from the forums and hangs around the [[GScript IRC channel]] whenever online. &amp;lt;br /&amp;gt;&lt;br /&gt;
Guilds: #gscript, VIP&lt;br /&gt;
&lt;br /&gt;
==Development areas==&lt;br /&gt;
Being fairly adept at math and physics, Chad has spent a good deal of time applying such topics in [[GScript]].  For one reason or another, he still prefers to script offline, but has quit using the .graal format as of late 2004.  He has dabbled in graphics and level design, but found little interest in such areas.  Because of his enjoyment and ease of adapting to thinking like a programmer, he has decided to try for a career in game development.&lt;br /&gt;
&lt;br /&gt;
==Staff positions==&lt;br /&gt;
Chad does not like to work for servers, but because of his friendly nature he has helped out a little on a few projects, although he will cite different motives for these positions. &lt;br /&gt;
&lt;br /&gt;
==Accounts==&lt;br /&gt;
Dach - main account (supposed to be &amp;quot;Chad&amp;quot; spelled backwards, but typos happen) &amp;lt;br /&amp;gt;&lt;br /&gt;
NewbieChad - made for fun, but was upgraded at one point for some reason and is now used for testing (when applicable)&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
email - LyleBarbatuous@gmail.com &amp;lt;br /&amp;gt;&lt;br /&gt;
AIM - michaelangelo36 (Chad has been known to block people without warning)&lt;br /&gt;
LJ - http://www.livejournal.com/users/chadisgod/&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=User:Chad&amp;diff=2379</id>
		<title>User:Chad</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=User:Chad&amp;diff=2379"/>
		<updated>2005-07-16T03:45:21Z</updated>

		<summary type="html">&lt;p&gt;Chad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{player}}&lt;br /&gt;
==Community role==&lt;br /&gt;
Chad has mostly played a back seat role in the actual game community of [[Graal]].  He played Classic during the years of 2000-2001, but began to spend much more time on the [[Graal Communication Center]].  Recently, he has divulged himself from the forums and hangs around the [[GScript IRC channel]] whenever online. &amp;lt;br /&amp;gt;&lt;br /&gt;
Guilds: #gscript, VIP&lt;br /&gt;
&lt;br /&gt;
==Development areas==&lt;br /&gt;
Being fairly adept at math and physics, Chad has spent a good deal of time applying such topics in [[GScript]].  For one reason or another, he still prefers to script offline, but has quit using the .graal format as of late 2004.  He has dabbled in graphics and level design, but found little interest in such areas.  Because of his enjoyment and ease of adapting to thinking like a programmer, he has decided to try for a career in game development.&lt;br /&gt;
&lt;br /&gt;
==Staff positions==&lt;br /&gt;
Chad does not like to work for servers, but because of his friendly nature he has helped out a little on a few projects, although he will cite different motives for these positions. &lt;br /&gt;
&lt;br /&gt;
==Accounts==&lt;br /&gt;
Dach - main account (supposed to be &amp;quot;Chad&amp;quot; spelled backwards, but typos happen) &amp;lt;br /&amp;gt;&lt;br /&gt;
NewbieChad - made for fun, but was upgraded at one point for some reason and is now used for testing (when applicable)&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
email - LyleBarbatuous@gmail.com &amp;lt;br /&amp;gt;&lt;br /&gt;
AIM - michaelangelo36 (Chad has been known to block people without warning)&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=User:Chad&amp;diff=2313</id>
		<title>User:Chad</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=User:Chad&amp;diff=2313"/>
		<updated>2005-07-16T03:08:18Z</updated>

		<summary type="html">&lt;p&gt;Chad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{player}}&lt;br /&gt;
==Community role==&lt;br /&gt;
Chad has mostly played a back seat role in the actual game community of [[Graal]].  He played Classic during the years of 2000-2001, but began to spend much more time as a member of the forums' community.  Recently, he has divulged himself from the forums and hangs around the [[GScript IRC channel]] whenever online. &amp;lt;br /&amp;gt;&lt;br /&gt;
Guilds: #gscript, VIP&lt;br /&gt;
&lt;br /&gt;
==Development areas==&lt;br /&gt;
Being fairly adept at math and physics, Chad has spent a good deal of time applying such topics in [[GScript]].  For one reason or another, he still prefers to script offline, but has quit using the .graal format as of late 2004.  He has dabbled in graphics and level design, but found little interest in such areas.  Because of his enjoyment and ease of adapting to thinking like a programmer, he has decided to try for a career in game development.&lt;br /&gt;
&lt;br /&gt;
==Staff positions==&lt;br /&gt;
Chad does not like to work for servers, but because of his friendly nature he has helped out a little on a few projects, although he will cite different motives for these positions. &lt;br /&gt;
&lt;br /&gt;
==Accounts==&lt;br /&gt;
Dach - main account (supposed to be &amp;quot;Chad&amp;quot; spelled backwards, but typos happen) &amp;lt;br /&amp;gt;&lt;br /&gt;
NewbieChad - made for fun, but was upgraded at one point for some reason and is now used for testing (when applicable)&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
email - LyleBarbatuous@gmail.com &amp;lt;br /&amp;gt;&lt;br /&gt;
AIM - michaelangelo36 (Chad has been known to block people without warning)&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=User:Chad&amp;diff=2312</id>
		<title>User:Chad</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=User:Chad&amp;diff=2312"/>
		<updated>2005-07-16T03:07:11Z</updated>

		<summary type="html">&lt;p&gt;Chad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{player}}&lt;br /&gt;
==Community role==&lt;br /&gt;
Chad has mostly played a back seat role in the actual game community of [[Graal]].  He played Classic during the years of 2000-2001, but began to spend much more time as a member of the forums' community.  Recently, he has divulged himself from the forums and hangs around the [[GScript IRC channel]] whenever online. &amp;lt;br /&amp;gt;&lt;br /&gt;
Guilds: #gscript, VIP&lt;br /&gt;
&lt;br /&gt;
==Development areas==&lt;br /&gt;
Being fairly adept at math and physics, Chad has spent a good deal of time applying such topics in [[gscript]].  For one reason or another, he still prefers to script offline, but has quit using the .graal format as of late 2004.  He has dabbled in graphics and level design, but found little interest in such areas.  Because of his enjoyment and ease of adapting to thinking like a programmer, he has decided to try for a career in game development.&lt;br /&gt;
&lt;br /&gt;
==Staff positions==&lt;br /&gt;
Chad does not like to work for servers, but because of his friendly nature he has helped out a little on a few projects, although he will cite different motives for these positions. &lt;br /&gt;
&lt;br /&gt;
==Accounts==&lt;br /&gt;
Dach - main account (supposed to be &amp;quot;Chad&amp;quot; spelled backwards, but typos happen) &amp;lt;br /&amp;gt;&lt;br /&gt;
NewbieChad - made for fun, but was upgraded at one point for some reason and is now used for testing (when applicable)&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
email - LyleBarbatuous@gmail.com &amp;lt;br /&amp;gt;&lt;br /&gt;
AIM - michaelangelo36 (Chad has been known to block people without warning)&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=User:Chad&amp;diff=2311</id>
		<title>User:Chad</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=User:Chad&amp;diff=2311"/>
		<updated>2005-07-16T02:40:24Z</updated>

		<summary type="html">&lt;p&gt;Chad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{player}}&lt;br /&gt;
==Community role==&lt;br /&gt;
Chad has mostly played a back seat role in the actual game community of Graal.  He played Classic during the years of 2000-2001, but began to spend much more time as a member of the forums' community.  Recently, he has divulged himself from the forums and hangs around the #gscript channel whenever online. &amp;lt;br /&amp;gt;&lt;br /&gt;
Guilds: #gscript, VIP&lt;br /&gt;
&lt;br /&gt;
==Development areas==&lt;br /&gt;
Being fairly adept at math and physics, Chad has spent a good deal of time applying such topics in gscript.  He has dabbled in graphics and level design, but found little interest in such areas.  Because of his enjoyment and ease of adapting to thinking like a programmer, he has decided to try for a career in game development.&lt;br /&gt;
&lt;br /&gt;
==Staff positions==&lt;br /&gt;
Chad does not like to work for servers, but because of his friendly nature he has helped out a little on a few projects, although he will cite different motives for these positions.&lt;br /&gt;
&lt;br /&gt;
==Accounts==&lt;br /&gt;
Dach - main account (supposed to be &amp;quot;Chad&amp;quot; spelled backwards, but typos happen) &amp;lt;br /&amp;gt;&lt;br /&gt;
NewbieChad - made for fun, but was upgraded at one point for some reason and is now used for testing (when applicable)&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
email - LyleBarbatuous@gmail.com &amp;lt;br /&amp;gt;&lt;br /&gt;
AIM - michaelangelo36 (Chad has been known to block people without warning)&lt;/div&gt;</summary>
		<author><name>Chad</name></author>
	</entry>
</feed>