You are on page 1of 12

Commands

For Program Execution


set flagname;
unset flagname;
if ( flag) operation;
else operation;
for (init-op; flag; incr-op) operation;
while ( flag) operation;
break
continue
function funcname() { operations; }
return
sleep seconds;
setarray var,size;
setstring varname,value;
timereverywhere;
addstring list,text;
insertstring list,index,text;
replacestring list,index,text;
removestring list,text;
deletestring list,index;

Usage
sets a flag to true
sets a flag to false
the operation will only be executed wenn flag is true
executes an operation wenn flag was false
executes <init-op>, while flag is true <operation;incr-op>
repeats the operation while flag is true
ends a loop and continues with the script that follows to the loop
jumps to the beginning of the loop (next loop round)
defines a function, can be called with funcname()
ends the function immediatelly and returns to the function caller
pauses the script execution for the specified time
initializes var as an array of the specified size
creates a string variable varname with the given value
allows timeouts on this machine even if the player didnt entered the level first
adds a string to a string list (saved as flag)
inserts a string into a string list at the specified index
replaces the string at position 'index' with 'text'
removes all occurences of a string
deletes string list entry at position 'index'

Simple NPC Manipulation


setimg filename;
setimgpart filename,x,y,width,height;
hide;
show;
dontblock;
blockagain;
drawoverplayer;
drawunderplayer;
drawaslight;
seteffectmode mode;
canbecarried;
cannotbecarried;
canbepushed;
cannotbepushed;
canbepulled;
cannotbepulled;

Effect
changes the npcs image
changes the npcs image and only displays the rectangle (x,y,width,height) of it
hides the npc
shows an hidden npc
lets the npc dont block the player anymore
turns off the three previous flags
draws the npc over the player
draws the npc under the player
draws the npc above day/night
changes the way the npc's image is drawn (0 - as light 1 - as transparency 2 - holes)
the npc can now be lifted and carried by the player
turns off the previous flag
the npc can now be pushed by the player
turns off the previous flag
the npc can now be pulled by the player
turns off the previous flag

Complex NPC Commands


move dx,dy,time,options;
say signindex;
say2 text;
lay itemname;
lay2 itemname,x,y;
take itemname;
take2 index;
message text;
timershow;
showcharacter;
setcharprop messagecode,string;
setcharani ganifile;
setchargender gender;
triggeraction x,y,action,params;
putnpc imgname,scriptname,x,y;
putnpc2 x,y,{script}
callnpc index,eventflag;
callweapon index,eventflag;
destroy;
carryobject carryobjectname;

Effect
moves the npc, options: cachtype(0,1,2)+blockcheck(4)+eventwhendone(8)+applydir(16)
displays signs
displays text as sign
lays an item
lays an item to the specified position
takes an item if available
takes the item with the specified index
displays a text message over the npc
lets the npcs timeout be shown
displays a player character instead of the npc image
sets string properties of the character
sets the animation for the npc
sets the gender of the npc (male/female)
triggers a if (action<action>)... on the objects on (x,y)
creates a npc, scriptname is the name of a textfile containing the npc script
creates a npc at given x,y with set {script}
calls the script of another npc (not immediatelly)
calls the script of a weapon (used together with the variable selectedweapon)
deletes the npc
the character carries an object

throwcarry;
followplayer;
toinventory flag;
toweapons weaponname;
setcoloreffect red,green,blue,alpha;
setzoomeffect zoomfactor;
showimg index,filename,x,y;
showimg index,@font@style@text,x,y;
showimg2 index,filename,x,y,z;
showani index,filename,x,y;
showani2 index,filename,x,y,z;
showpoly index,{x1,y1,...,xn,yn};
showpoly2 index,{x1,y1,z1,...,xn,yn,zn};
showtext index,x,y,font,style,text;
showtext2 index,x,y,z,font,style,text;
hideimg index;
hideimgs start-index,end-index;
changeimgpart index,x,y,width,height;
changeimgvis index,drawingheight;
changeimgcolors index,red,green,blue,alpha;
changeimgzoom index,zoomfactor;
changeimgmode index,mode;
shootarrow direction;
shootfireball direction;
shootfireblast direction;
shootnuke direction;
shootball;
spyfire length,power;
hitplayer index,halfhearts,fromx,fromy;
hitnpc index,halfhearts,fromx,fromy;
hitobjects power,x,y;
hidelocal;
showlocal;
dontblocklocal;
blockagainlocal;
takehorse index;
triggeraction x,y,action,params;
tokenize str;
tokenize2 delims,str;
setshape type,width,height;
setshape2 width,height,{tiletypes..};
wraptext linelength,delimeters,text;
wraptext2 width,zoom,delimiters,text;
setshootparams param1,param2;
shoot x,y,z,angle,zangle,powergani,aniparams;

throws the carried object


lets the npc follow the player; the action script keeps running; set x/y to leave the player
puts the npc into the players inventory until the flag is unset
adds this npc to the players weapon list
sets the color / alpha blending effect of the npc (default 1,1,1,1)
sets the zoom factor (default 1)
shows an image at the given position
displays text like an image, can change with changeimgcolors etc.
shows an image at the given 3D position
shows an ani (graal animation shop file *.gani) at the given position
shows an ani (graal animation shop file *.gani) at the given 3D position
draws a polygon at the given position
draw a polygon at the given 3D position
displays a text message at given location
displays a text message at given 3D location
removes the image with the specified index
removes all the images from start-index through and including end-index
changes the visible part of the showimg
changes the drawing height of the showimg (0,1,2,3,4)
sets color / alpha blending for the showimg (default 1,1,1,1)
sets zoom factor for the the showimg (default 1)
changes the drawing mode of the image (0 - as light 1 - transparency 2 - holes)
shoots an arrow
shoots a firewall
shoots a fireblast
shoots an nukeshot
shoots a ball directly to the player
blasts fire from the player's x and y in the player's dir with length and power ( 1 - normal 3 - jolt)
hurts a player
hurts an npc (changes hearts, hurtdx, hurtdy)
hurts all players/npcs/baddies on that position
hides the npc (only for the current player)
shows an hidden npc (only for the current player)
lets the npc dont block the player anymore (only for the current player)
turns off the three block flags (only for the current player)
takes the horse with the specified index (only works in combination with showcharacter )
invokes an action on an object at x, y.
divides str into words (tokens) which can be read with #t(index)
divides str into tokens, using delims as additional delimiters
sets the shape of the npc: type=1 means rectangle (width,height in pixels)
sets the shape of the npc to a rectangle of tiles
this tokenizes a block of text by linelength the results of which can be read as #t(0,...,tokenscount-1)
tokenizes a block of text by width and zoom the results of which can be read as #t(0,...,tokenscount-1
sets the parameters for the next shoot command, which will be #p2 and #p3 after action projectile.
this shoots an ani from given x,y,z location with given power; upon collision, actionprojectile is calle

Player Manipulation
setlevel filename;
setlevel2 filename,x,y;
seturllevel URL;
setbody filename;
sethead filename;
setsword imgname,power;
setshield imgname,power;
setani ganifile;
setplayerdir direction;
setgender gender;
setskincolor colorname;
setcoatcolor colorname;
setsleevecolor colorname;
setshoecolor colorname;
setbeltcolor colorname;

Effect
warps the player (URLs not supported)
warps the player to the specified level and position
warps the player to an URL (without the leading http://!)
sets the body image for the player
sets the head image for the player
changes the players sword (-20 power 20)
changes the players shield (0 power 10)
sets the animation for the player
sets the player looking direction
sets the gender of the player (male/female)
changes the player skin
changes the player coat
changes the player sleeves
changes the player shoes
changes the player belt

setplayerprop messagecode,string;
takeplayercarry;
takeplayerhorse;
disableweapons;
enableweapons;
freezeplayer seconds;
unfreezeplayer;
hideplayer seconds;
hidesword seconds;
hurt halfhearts;
disabledefmovement;
enabledefmovement;
disableselectweapons;
enableselectweapons;
disablepause;
enablepause;
disablemap;
enablemap;
enablefeatures flag;
replaceani ani,newani;
attachplayertoobj type,id;
detachplayer;

sets string properties of the player (except the nickname&guildcode)


removes the object carried by the player
removes the players horse
disables the players sword+bombs+darts
enables the player weapons
the player cant move for the given time
cancels freezeplayer instantly
hides the player for the specified time
hides the players sword for the specified time
hurts the player
disables the normal player movement
enables it again
disables the weapon select screen
enables it again
disables the player's pause feature
enables the pause feature again
disables the player's map feature
enables the player's map feature
enables only the features specified
replaces a default animation
attachs the player to an npc (type=0)
detachs the player from the npc

Level and Game Manipulation


updateboard x,y,width,height;
putobject objectname,x,y;
putbomb power,x,y;
putexplosion radius,x,y;
putexplosion2 power,radius,x,y;
putleaps leaptype,x,y;
puthorse imgname,x,y;
setbackpal filename;
setletters filename;
setmap imgname,levelnamesfile,x,y;
setminimap imgname,levelnamesfile,x,y;
seteffect red,green,blue,alpha;
setfocus x,y;
resetfocus;
noplayerkilling;
removebomb index;
removearrow index;
removeitem index;
removeexplo index;
removehorse index;
explodebomb index;
reflectarrow index;
addtiledef image,levelstart,type;
addtiledef2 image,levelstart,x,y;
removetiledefs levelstart;
loadmap string;
updateterrain;
showstats bitflag;

Effect
makes level board modifies visible
puts an object onto the board
puts a bomb on the board
puts an explosion on the board
puts an explosion on the board (power=1 -> normal, 3 -> jolt bomb)
procduces an object explosion (0-bush,1-swamp,2-stone,3-sign,4-ball,5-water)
puts a horse (or boat) on the board
the background gets the color palette of the specified image
signs will be displayed using the specified image instead of letters.png
changes the map, the player will be placed on (x,y)
changes the minimap, the player will be placed on (x,y)
sets the day/night effect (default 0,0,0,0)
sets the level focus to the given x,y
resets the focus to the player
disables hurting with sword/npc weapons
removes the bomb with the specified index
removes the arrow with the specified index
removes the item with the specified index
removes the explosion with the specified index
removes the horse with the specified index
explodes the bomb with the specified index
reflects the arrow with the specified index (like a mirror shield)
specifys the tiles images for all levels that start with 'levelstart' (0-standard type,1-new order)
replaces parts of the tiles image
removes all tile definitions from all levels which file begins with levelstart
loads terrain map (*.gmap) the level names must start with string & *.gmap file must start with strin
updates changes done to a level that is part of a *.gmap
shows/hides parts of the stats bar 1-ASD,2-icons,4-rupees,8-bombs,
16-arrows,32-hearts,64-ap,128-mp,256-minimap,512-inv,1024-player

Baddy Manipulation
putcomp baddyname,x,y;
putnewcomp baddyname,x,y,imgname,power;
hitcompu index,decrpower,fromx,fromy;
removecompus;

Effect
puts a new baddy on the board
puts a baddy on the board (with the specified image and power)
hurts a baddy
removes all baddies

File Operation
play filename;

Effect
plays a sound/music file or whatever can be played with Windows Media Player

play2 filename,x,y,volume;
playlooped filename;
stopsound filename;
stopmidi;
setmusicvolume left,right;
openurl URL;
openurl2 URL,width,height;
showfile filename;

plays a sound/music at x,y with the specified volume (1=default volume)


plays a sound file (*.wav) looped
stops playing a sound file (*.wav)
stops playing the currently running midi file
changes the volume for music (0..1)
opens the given URL in the default web browser (without the leading http://!)
opens the given URL in a webbrower window of the specified size (url without http://!)
opens the file with the program associated with the file extension

In Game Flags
Player Flags
canspin
carrying
carriesblackstone
carriesbush
carriessign
carriesstone
carriesvase
hasweapon( name )
weaponsenabled
isleader
isonmap
isfocused
issparringzone
lighteffectsenabled
nopkzone
playeronline
playerchats
playerpaused
playermap
playerdies
playerendsreading
playerenters
playerhurt
playerisfemale
playerismale
playerlaysitem
playeronhorse
playerreading
playerswimming
playertouchsme
playertouchsother
playerattached

True When
the player has spin power (for sword)
the player carries something
the player carries a blackstone
the player carries a bush
the player carries a sign
the player carries a stone
the player carries a vase
the player has the weapon specified with name
the player weapons are enabled
the player entered the level first (of all players in the same room)
the player is on an outside level
the player is currently focused on
the player is in a sparring level
the player can see light effects
the player is in a level where you cant hurt other players
the game is in online mode
the player says something
the player is currently paused
the player is viewing the map
the player died
the player finished reading
the player enters the room
the player has been hurt
the player is female
the player is male (specified in headsconfig.txt)
somebody layed an item
the player rides on a horse (or boat)
the player is reading a sign
the player is swimming
the player touches the npc
the player touches another npc
the player is attached to this npc

NPC Flags
timeout
visible
followsplayer
washit
waspelt
wasshot
wasthrown
exploded
peltwithblackstone
peltwithbush
peltwithnpc
peltwithsign
peltwithstone
peltwithvase
shotbybaddy
shotbyplayer

True When
the npcs timeout counter runs to 0
the npc is visible
the npc currently follows the player
the npc was slayed with a sword or axe
the npc was pelt
the npc was shot with arrows
the npc was carried and then thrown
the npc was exploded by a bomb
the npc was pelt with a blackstone
the npc was pelt with a bush
the npc was pelt with another npc
the npc was pelt with a sign
the npc was pelt with a stone
the npc was pelt with a vase
the npc was shot by a computer opponent
the npc was shot by the player

Weapon Flags

True When

weaponfired
firedonhorse
isweapon
actionprojectile
actionprojectile2

this npc is used as weapon, D (or joybutton1) is pressed


this npc weapon is fired while riding on horse
this npc is a weapon
the projectile shot with "shoot" has struck a player or npc
the projectile shot with "shoot" has struck the ground

Level Flags
compsdead
compusdied
onwall( x, y )
onwall2( x,y,w,h )
onwater( x, y )

True When
there is no living baddy
all baddies died
the specified point is blocked
the specified field is blocked
the specified field is water

String Flags
startswith( partstr, str )
strcontains( str, partstr )
strequals( str1, str2 )

True When
str starts with partstr
str contains partstr
str1=str2 (both strings can contain message codes)

Mouse Flags
leftmousebutton
rightmousebutton
middlemousebutton
mousedown
mouseup
mousewheel
actionleftmouse
actionrightmouse
actionmiddlemouse
actiondoublemouse

True When
the left mouse button has been pushed
the right mouse button has been pushed
the middle mouse button has been pushed
the mouse button is currently pushed down
the mouse button was just released
the mouse wheel has moved
the npc was clicked with the left mouse button
the npc was clicked with the right mouse button
the npc was clicked with the middle mouse button
the npc was double clicked

Keyboard Flags
keypressed
keydown( key )
keydown2( keycode,true )

True When
after any standard key has been pushed #p(0) is keycode #p(1) is character
the specified key is pressed (0..10: up,left,down,right,S,A,D,M,tab,Q,P)
checks if a key has been pressed

Variables
NPC's Own Variables
x
y
timeout
rupees
bombs
darts
hearts
glovepower
swordpower
shieldpower
dir
sprite
ap
hurtdx
hurtdy
save[ 0 ],..,save[ 9 ]

Value
the npcs horizontal position
the npcs vertical position (top=0)
the npcs timeout counter (seconds)
the npcs rupees count
the npcs bombs count
the npcs darts count
the npcs hearts count
the npcs glove power (1-glove1,2-glove2)
the npcs sword power (1-normal sword,2-axe,3-lizardsword,4-golden sword)
the npcs shield power (1-normal sword,2-mirror shield,3-lizard shield)
the direction of the character
the sprite of the character
the alignment points of the character
will be set when the player uses the sword/npc weapon on the npc
(x/y difference, >=-1, <=1)
built-in variables that work in online mode (integer values >=0, <=220)

Level NPC Variables


npcscount
npcs[ index ].id

Value
the npcs count
the server id of the npc

npcs[ index ].x


npcs[i index ].y
npcs[ index ].width
npcs[ index ].height
npcs[ index ].timeout
npcs[ index ].rupees
npcs[ index ].bombs
npcs[ index ].darts
npcs[ index ].hearts
npcs[ index ].glovepower
npcs[ index ].swordpower
npcs[ index ].shieldpower
npcs[ index ].dir
npcs[ index ].sprite
npcs[ index ].ap
npcs[ index ].hurtdx
npcs[ index ].hurtdy
actionplayer
anistep
npcs[ index ].save[ 0 ],..,save[ 9 ]

an horsess horizontal position


an horsess vertical position
the width of the npc (in fields)
the height of the npc (in fields)
the timeout counter of the npc
the rupees count of the npc
the bombs count of the npc
the darts count of the npc
the hearts count of the npc
the glove power of the npc
the sword power of the npc
the shield power of the npc
the direction of the npc (if its a showcharacter)
the sprite of the npc (if its a showcharacter)
the alignment of the npc (if its a showcharacter)
will be set when the player hurts the npc (or
(hitplayer/hitpnc is called) -> push away difference
the index of the player that triggered an action on the npc
the current animation frame of the npc's *.gani
built-in variables that work in online mode (integer values >=0, <=220)

Player Variables
playerscount
players[ index ].x
players[ index ].y
players[ index ].freezetime
players[ index ].rupees
players[ index ].bombs
players[ index ].darts
players[ index ].mp
players[ index ].ap
players[ index ].hearts
players[ index ].fullhearts
players[ index ].dir
players[ index ].glovepower
players[ index ].swordpower
players[ index ].shieldpower
players[ index ].headset
players[ index ].sprite
players[ index ].anistep
players[ index ].id
players[ index ].saysnumber
players[ index ].id
players[ index ].attachid
players[ index ].attachtype
playerhurtdpower
playerhurtdx
playerhurtdy
selectedweapon
weaponscount

Value
the player count
a players horizontal position
a players vertical position
a player's remaining freezetime
a players rupees count
a players bombs count
a players darts count
a players magic points (0..100)
a players alignment points (0..100)
a players hearts count
a players max hearts count
a players direction (0-up,1-left,2-down,3-right)
a players glove power (2-glove1,3-glove2)
a players sword power (1-normal sword,2-axe,3-lizardsword,4-golden sword)
a players sield power (1-normal sword,2-mirror shield,3-lizard shield)
a players head sprites set (head+playerheadset+.gif)
a players sprites set (0..40)
current frame of the player's ani
a players id (=-1 for npc characters)
the (index+1)th player says that number
a players id (=-1 for npc characters)
the player is attached to the npc with that id (<=0-> not attached)
the type of object the player is attached to
how much power the player lost when hurt last
the horizontal hurting movement of the player
the vertical hurting movement of the player
the index of the selected weapon of the player
count of weapons/items the player has

Baddy Variables
compuscount
compus[ index ].x
compus[ index ].y
compus[ index ].type
compus[ index ].dir
compus[ index ].headdir
compus[ index ].power
compus[ index ].mode

Value
the baddy count
a baddys horizontal position
a baddys vertical position
a baddys type (0..9, see the baddy names list)
a baddys body direction (0..3)
a baddys head direction (0..3)
a baddys power
a baddys mode

Bomb Variables

Value

bombscount
bombs[ index ].x
bombs[ index ].y
bombs[ index ].power
bombs[ index ].time

the bombs count


a bombs horizontal position
a bombs vertical position
the bombs power (1,2,3)
the time left till explosion (3 .. 0)

Arrow Variables
arrowscount
arrows[ index ].x
arrows[ index ].y
arrows[ index ].dx
arrows[ index ].dy
arrows[ index ].dir
arrows[ index ].type
arrows[ index ].from

Value
the arrows count (arrows + balls)
an arrows horizontal position
an arrows vertical position
the horizontal speed per tick (0.05secs)
the vertical speed per tick (0.05secs)
the flying direction (0,1,2,3)
the shottype (-1 -> ball, 0..3 -> arrow with power 1..4)
the shooter (0 -> baddy, 1 -> current player)

Item Variables
itemscount
items[ index ].x
items[ index ].y
items[ index ].type
items[ index ].time

Value
the items count
an items horizontal position
an items vertical position
the item type (0..24)
the time left till the item disappears (8.2 .. 0)

Explosion Variables
exploscount
explos[ index ].x
explos[ index ].y
explos[ index ].power
explos[ index ].time
explos[ index ].dir

Value
the explosions count (putexplosion produces 9 explosions of size 2x2!)
an explosions horizontal position
an explosions vertical position
the power of the bomb which produced this explosion
the time left till the explosion disappears
the direction from the bomb which produced the explosion

Horse Variables
horsescount
horses[ index ].x
horses[ index ].y
horses[ index ].dir
horses[ index ].bushes
horses[ index ].bombs
horses[ index ].bombpower
horses[ index ].type

Value
the horses count
an horsess horizontal position
an horsess vertical position
the direction of the horse
bushes eaten by the horse
bombs count in the horses mouth
the power of the bombs on the horses mouth
the horse type (0 -> riding horse, 1 - boat)

Sign Variables
signscount
signs[ index ].x
signs[ index ].y

Value
the signs count
a signs horizontal position
a signs vertical position

Mouse Variables
mousex
mousey
mousebuttons
mousescreenx
mousescreeny
mousewheeldelta

Value
x position of the mouse in the level. (in tiles)
y position of the mouse in the level. (in tiles)
sum of mouse buttons being pressed (1=left 2=middle 3=right)
x position of the mouse on the game screen. (in pixels)
y position of the mouse on the game screen. (in pixels)
movement of the mouse wheel in the last .05 seconds.

Level Variables
levelorgx
levelorgy
onmapx( level )
onmapy( level )
groundsheight( x, y )
waterhieght( x, y )
gravity

Value
level origin (x), can be different to 0,0 if the player is attached to an npc
level origin (y)
x-position of the level on the current map
y-position of the level on the current map
the height of the ground at x,y
the depth of the water at x,y
the rate at which shot projectiles fall

timevar
screenheight
screenwidth
musicpos
musiclen
focusx
focusy

a server-wide time variable which is increased by 1 all 5 seconds


screen height
screen width (for the current player)
the location of the currently playing music track
the length of the currently playing music track
the x cord in focus
the y cord in focus

String Variables
arraylen( var )
sarraylen( list )
indexof( partstr, str )
lindexof( str, list )
strlen( str )
strtofloat( str )
tokenscount

Value
the size of an array
the size of a string list
position of where partstr appears in str (-1 -> not in str)
position of where the string appears in the string list
the length of the string
the value of str as number
count of tokens produced with tokenize

File Variables

Value

imgwidth( filename )
imgheight( filename )
graalversion
downloadsize
downloadpos

width in pixels of given image file


height in pixels of given image file
current Graal version
size of file being downloaded
location of downloaded file

Functions
Mathmatical Functions
abs( var )
arctan( var )
cos( a )
getangle( dx,dy )
int( var )
random( a, b )
sin( a )
min( a,b )
max( a,b )
log( base,x )

Output
the absolute value
the arcus tangens of var; (some maths: a = arctan( sin(a) / cos(a) ))
the cosinus of a; a is an angle in the radiant system (0...3.14)
the angle of vector (dx,dy) to the x coordinate (0...2*3.14)
the integer value of a variable (truncates the floating point part)
a random floating point value, a<= value < b
the sinus of a; a is an angle in the radiant system (0...3.14)
finds the minimum between a and b
finds the maximum between a and b
finds the log of x with given base

Test Functions
testbomb( x, y )
testcompu( x, y )
testexplo( x, y )
testhorse( x, y )
testitem( x, y )
testnpc(x, y )
testplayer( x, y )
testsign( x, y )
tiletype( x, y )

Output
the index of the bomb on position (x,y)
the index of the baddy on position (x,y)
the index of the explosion on position (x,y)
the index of the horse on position (x,y)
the index of the item on position (x,y)
the index of the npc on position (x,y)
the index of the player on position (x,y)
the index of the sign on position (x,y)
the type of tile that is at x,y

Conversion Functions
ascii( index )
board[ index ]
tiles[ x,y ]
getz( x,y )
screenx( x,y )
screeny( x,y )
worldx( x,y )
worldy( x,y )

Output
the ascii code of a character
the level board (index = 0..64*64-1)
the index of the tiles at x,y
the z value of the specfied x,y cord
converts level cordinates to points on the screen
converts level cordinates to points on the screen
converts screen cordinates to points on the level
converts screen cordinates to points on the level

vecx( dir )
vecy( dir )
textwidth( zoom,font,style,text )
textheight( zoom,font,style,text )

vertical movement vector (0,-1,0,1)


horizontal movement vector (-1,0,1,0)
calculates the width of given text based upon style zoom and font
calculates the height of given text based upon style zoom and font

Strings
Player Message Codse
#a
#n, #n( index )
#g, #g( index )
#c, #c( index )
#m, #m( index )
#W, #W( index )
#w,#w( index )
#1, #1( index )
#2, #2( index )
#3, #3( index )
#5, #5( index )
#6, #6( index )
#8, #8( index )
#C0, #C0( index )
#C1, #C1( index )
#C2, #C2( index )
#C3, #C3( index )
#C4, #C4( index )

Signifigance
the account name of the player
the nick name of the player (index=-1 -> npc character, 0 -> current player)
the guild name of the player
the current chat text of the player
the animation of the player
the filename of the weapon icon
the name of the current npc weapon of the player
the sword image filename of the player
the shield image filename of the player
the head image filename of the player
the image filename of the players horse
the image filename of the npc that is carried by the player
the body image filename of the player
the skin color
the coat color
the sleeves color
the shoes color
the belt color

NPC Message Codes


#L
#f
#P1, #P1( index )
#P2 - P30, #P2 - P30( index )
#p( index )

Signifigance
the current level filename
the image filename of the npc
the gani attribute 1 (hat)
the gani attribute 2
action parameter of the specified index

String Message Codes


#e(startindex,length,string)
#I(list, index )
#s(var)
#t( index )
#T(string)
#R( string1,...,stringn )
#v(var)

Signifigance
extracts a substring out of string (length=-1 -> till the end)
gets a string of a string list
the value of the string variable var
token of the specified index, produced with tokenize
trims the string (removes spaces at the beginning and end)
randomly selects one of the strings
the value of var as string

Sign Message Codes


#b
#i(imgname), #i(imgname,x,y,w,h)

Signifigance
line break (for say2)
displays an image or a part of an image when used in a sign

Keyboard Message Codes


#K( keyindex )
#k( index )

Signifigance
the name of the specified key
the description of the specified key (in local language / key assignments)

Other Message Codes


#D( filename )

Signifigance
file currently being downloaded

Misc Information
Special Symbols
!
&&
||
==
+

Meaning
not
and
or
equals
addition

*
/
%
^
=
a += b
a -= b
a *= b
a /= b
a ++
a -in
this.

substraction
multiplication
division
mod; a%b = a - int(a/b)*b;
power; a^0.5 = squareroot(a)
assigment
a = a+b
a = a-b
a = a*b
a = a/b
a = a+1
a = a-1
tests if an array/range contains a variable (e.g. 2 in {1,2,3}; x,y in |0,64|)
variables that start with this. are only accessible for the npc itself

Player Sprites
0
1-8
9-13
14-18
19-22
23
24
25-32
33
34-36
37
38
39
40

Description
no movement, or not a default animation
walking
sword slaying
pushing
pulling
lifting
no movement, carrying something
walking, carrying something
shooting
riding
sitting
sleeping
hurted (can only be set on showcharacter-npcs)
dead (can only be set on showcharacter-npcs)

Directions
up
left
down
right
(you can also use normal variables with values between 0 and 3)
Baddy Names
graysoldier
bluesoldier
redsoldier
shootingsoldier
swampsoldier
frog
octopus
goldenwarrior
lizardon
dragon
Baddy Modes
0
1
2
3
4
5
6
7
8
9

Description
walking
looking
hunting
hurted
bumped
dying
shooting (swampsoldier)
jumping (frog)
shooting (spider)
dead

Enable Features
1
2
4
8
0x10
0x20
0x40
0x80
0x100
0x200
0x400
0x800
0x1000
0x2000
0x4000
0x8000
allfeatures

For Use With the enablfeatures Command


M key (map)
P key (pause)
Q key (weapon select)
R key (show ratings)
S+A key combination for dropping items
S+D key combination for switching weapons
TAB key (if disabled then you cannot switch to the chat field with TAB)
display of chat text
display of the hearts over player heads
display of nicknames
toall/PM-icons on the minimap
right-click on players opens their profile
emoticons (disable it if you want to do other stuff with control+keys)
Alt+5 for making snapshots
Alt+8/9 for zooming
the logframe where savelog stuff is added
all of the features

Itemname
greenrupee
bluerupee
redrupee
bombs
darts
heart
glove1
bow
bomb
shield
sword
fullheart
superbomb
battleaxe
goldensword
mirrorshield
glove2
lizardshield
lizardsword
goldrupee
fireball
fireblast
nukeshot
joltbomb
spinattack

Item Index
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

Tile Types
0
2
3
4
5
6
7
8
9
11
12
20
21
22

For Use With tiletype(x,y)


nonblocking
hurting underground
chair
bed upper side
bed lower side
swamp
lava swamp
near water
near lava
water
lava
throw-through (fences)
jumping stone
blocking tile

Colors
white
yellow
orange
pink
red
darkred
lightgreen
green
darkgreen
lightblue
blue
darkblue
brown
cynober
purple
darkpurple
lightgray
gray
black
transparent
Carry Objects
bush
sign
vase
stone
blackstone
bomb
hotbomb
superbomb
joltbomb
hotjoltbomb
none

You might also like