Creation/Dev/Script/Clientside Functions: Difference between revisions

From Graal Bible
No edit summary
m (→‎Functions: trace)
 
(47 intermediate revisions by 10 users not shown)
Line 1: Line 1:
'''http://www.antiunixmad.com/'''
[[Category:Scripting Reference]]
{| border="0" cellpadding="2" width="50%"
|[R]
| denotes it is read-only.
|-
|[3D]
| denotes it is a Graal3D function.
|-
|[opengl]
| denotes it is functional only in opengl mode.
|}


'''[[Viper]]'s [[Graal]] Issues.'''


Hello everyone, as of late, many people have been attacking me on the issues and matters, trying to lie about things, bend the truth, and downright spin to make me and others of my cause look bad, in this text document i will discuss and lay to rest the issues that matter.


I have been involved [[Graal]] for over three years now, and i used to really like [[Graal]] and its admins alot, then slowly after about a year [[Graal]] and its admins went in a bad downward spiral, i still stuck with [[Graal]] in hopes [[Graal]] would pull itself out of this hole and [[Unixmad]] would go back to the right path, this however did not happen, instead [[Unixmad]] and even [[Stefan]] went fouler and lower than i could have imageined, First with fireing [[Pachuka]] and [[Fuitad]], two of the BEST [[Graal]] admins ever in my view for no other reason than disagreeing with his future plans, then if just fireing them was not bad enough, he threatend to sue them and kill they're families, this was so wrong and bad [[Fuitad]] even said he would punch [[Unixmad]] in the face for saying that if he met him in real life, but that was just the beginning of the downward spiral [[Unixmad]] foolishly invoked onto [[Graal]], he then blatantly STOLE a domain name [[Graal]].net from Owl Shimy which costed over 30$ US Dollars, and never gave it back to him and never paid him for the cost of the domain, he also threatend to sue Owl Shimy and kill his family although it was [[Unixmad]] which stole the domain from Owl Shimy, then around [[Graal]]1.3.1 he blocked off [[GServer]]s officially and threatend to sue anyone that ran the former [[GServer]]s, although they were released as "Freeware" and actually used to encourage people to use the [[GServer]]s, this was a blatant attempt to monopolise , threaten, and intemidate that players that actually helped [[Graal]] and supported him, he then made claims he copyrighted "[[Graal]]" and would contact so called "Lawres" about anyone that used the name "[[Graal]]" or had "[[Graal]] Files" on there websites, although [[Graal]] was distributed as "Freeware" or "Shareware" and had no official software copyrights related to it, and that the name "[[Graal]]" was actually the name of a holy sacred golden cup used in some religion, and in that he has commited blasphemy against whatever religion has the so called "Holy [[Graal]]", then later on [[Unixmad]] fired SuperNick, because of his country and his origion and called him an American Asian slut, this was the first sign of racism on the part of [[Unixmad]], towards [[Graal]]1.4.1 [[Unixmad]] was secretly unwrapping his sadistic plans, he then started claiming credit and claiming to own the copyrights to [[Graal]], although [[Unixmad]] has done nothing but host some stupid weak as servers, and yet [[Stefan]] Knorr has done all the real work for [[Graal]], and was the one to make ZeldaOnline , [[Graal]]Online in the first place and has written every bit of codeing for the [[Graal]] Client , [[GServer]], RC, ect, yet [[Unixmad]] the worthless pile of trash that he is steals all credit for [[Graal]], then in February 2001, [[Unixmad]] and Antago release [[Graal]]2001 and the start of the "Pay to Play" system, now i have no problem with the fact that it is pay to play, the issue is when you PAY for something you actually expect to get the worth while of your money in this product, but instead they got a shittily made level generated land that was 99% empty, the NPCs were and are laggy as hell, and there were no quests, and there is only two shitty things today for hearts that suck so much i refuse to even call them quests, and to add to that about 40% of everyone that paid and gave [[Unixmad]] there credit card number NEVER got the accounts they paid 27$ or more for, and those that did clearly got chumped out by a cheap peice of crap that aint worth paying for, it sucked so badly that most people played on [[Graal]] Classic still, even those that foolishly paid for pay to play accounts, and in an attempt to "FORCE" people to pay for a shitty product they do not want against they're will [[Unixmad]] hired "Tyhm" to deface and ruin [[Graal]]Classic in an attempt to make it buggier and less fun than even [[Graal]]2001, about this time i was disgusted with [[Unixmad]] and most of the other admins and decided to downright turn against [[Graal]] and for the most part stop playing the peice of crap in general. People starting getting angry, complaining, asking for help, and asking for refunds, of coarse [[Unixmad]] gave noone a cash refund, and simply deleted and banned "PAID ACCOUNTS" of those who complained, asked for help, or asked for a refund these are PAYING CUSTOMERS, they have the rights of basic service that they PAID for, [[Unixmad]] promises pay to play players a quality product and customer service, but instead gives them a grade F product and ripps off his customers and delete they're accounts that they PAID HIM money for, his excuse? Credit card fraud, when infact at least 90% of the people he bans for credit card fraud pay legitamately with there OWN credit cards or pay via paypal by check, and yet [[Unixmad]] has stolen and used others credit card numbers to buy things for himself on several occassions, he also claims he needs pay to play money to keep [[Graal]] alive and running, yet there has been evidence that he makes at least 90% profit out of the monies he gets, and that he uses illegal porn ad banners and illegal cookie style web tracking and giveing email adresses of the players and even phone numbers of every player to spam and telemarketting companies without there permission, he even keeps personal player info, includeing email, adress, and phone number on unsecure servers which have already been leaked out, such info about people should not be on a public webserver accessable to the internet in anyway, then after all that [[Unixmad]] starts banning african american people, asians, koreans, and or people with images of people of that race from the [[Graal]]2001 forums and [[Graal]] itself, yet again they are paying customers and this is another sickening act of racism on the part of [[Unixmad]] and [[Graal]]Online, and then even more disgusting is what [[Stefan]] posts on the [[Graal]]2001 forums, he makes several anti american, racist, pro terrorist, pro nazi, and pro taliban comments on that post and goes on and on several pages bashing americans, this post was offense, obcene, and disgusting to many people includeing myself . If all that does not make you sick to your stomache or dislike [[Unixmad]] yet, i am far from done, then [[Unixmad]] proceeds to illegally DDOS webservers of mafukie and make threats to him over the phone, and has phone assaulted me over 40 times a day between midnight and 5am, and has made threats to sue dozens of people, kill there families, and shut down innocent websites and servers, while hosting illegal stuff and doing illegal things himself with the use of his own wanadoo.fr servers, stuff which includes child porn, bestiality porn, DVD Piracy, DDOS Attacks, theft of copyrighted materials from gameing companies such as nintendo, Credit Card fraud, theft, spamming, phone harrassment, useage of illegal pirated corperate softwares, all this just to start the list of what [[Unixmad]]', [[Stefan]], and they're servers are doing 24/7 for nearly 4 years now , anyone that likes [[Unixmad]] or thinks he is a good person even after all this is clearly a fool, everything in this document is the truth and why i hate [[Unixmad]] so much, if you like [[Unixmad]] after all these sickening things he does, then you are no better than a KKK or Neo Nazi member and should go kill yourselfs, i do not tolerate facists, racists, or nazis, they are all bad people, and [[Unixmad]] is one of the worst of the worst, and no person with any morales could tolerate or support such a person like Stephane Portha or [[Stefan]] Knorr. The people that spin, lie and bend the truth in support of [[Unixmad]] will always exist, but i will always reveal the truth about [[Unixmad]], and EVERYTHING said in this document is true, despite what any assclowns try and say about this, and this supriseingly enough is only 1% of the bad things [[Unixmad]] has done, how some people even tolerate, none the less support such a bad person is beyond me... I fight against bad people like [[Unixmad]], why? Because unlike many others in this world i actually care about other people, and i will do everything in my power to stop [[Unixmad]] from hurting [[Graal]] or its innocent players, many say i want to destroy and kill [[Graal]], this is NOT true, i used to love [[Graal]], i only wish to stop [[Unixmad]]'s evil sadistic illegal actions and restore [[Graal]] to the great game it used to be when it was "for the players, by the players" , but if i have to destroy [[Graal]]Online in exchange to stop [[Unixmad]]'s tyranny, it will be regreteable, but sometimes some sacrifices have to be made for the greater good, lets just hope that [[Unixmad]] drops dead and that sacrifice never has to be made... I love [[Graal]] and lots of its players, and i wish to someday restore it to the grandness it once had, but bad people like [[Unixmad]] must be gotten rid of if that is to be achieved...
==Variables==
{| border="1" cellpadding="2" width="100%"
| '''Variable'''
|width="100px"|'''Type'''
| '''Notes'''
|-
| allfeatures
| ''integer [R]''
|
|-
| allplayerscount
| ''integer [R]''
| Returns the count of all players on your playerlist, including IRC bots.
|-
| allrenderobjecttypes
| ''integer [R]''
|
|-
| allstats
| ''integer [R]''
| Used with showstats() in order to show all stats.
|-
| canspin
| ''boolean [R]''
| Returns true of false if the player has spin attack.
|-
| carriesblackstone
| ''boolean [R]''
| Returns whether the player is carrying a black stone.
|-
| carriesbush
| ''boolean [R]''
| Returns whether the player is carrying a bush.
|-
| carriesnpc
| ''boolean [R]''
| Returns whether the player is carrying an NPC
|-
| carriessign
| ''boolean [R]''
| Returns whether the player is carrying a sign.
|-
| carriesstone
| ''boolean [R]''
| Returns whether the player is carrying a stone.
|-
| carriesvase
| ''boolean [R]''
| Returns whether the player is carrying a vase.
|-
| downloadfile
| ''string [R]''
| Returns the currently downloaded file.
|-
| downloadpos
| ''integer [R]''
| Returns the position of the currently downloaded file.
|-
| downloadsize
| ''integer [R]''
| Returns the size of the currently downloaded file.
|-
| editingmission
| ''boolean''
|
|-
| emoticonchar
| ''string [R]''
|
|-
| focusx
| ''float [R]''
| Position of the camera in tile units.
|-
| focusy
| ''float [R]''
| Position of the camera in tile units.
|-
| ghostsnear
| ''boolean [R]''
| If a ghost(observer) is in the same level as the player.
|-
| graalplugincookie
| ''string [R]''
|
|-
| graalversion
| ''float [R]''
| Version of Graal the player is using.
|-
| gravity
| ''float''
| The gravity value that effects how fast projectiles fall. It universally effects all projectiles.
|-
| installedlanguages
| ''string [R]''
|
|-
| isapplicationactive
| ''boolean [R]''
| Is Graal window active?
|-
| iscarrying
| ''boolean [R]''
| Returns true of false if the player is carrying something.
|-
| isfocused
| ''boolean [R]''
|
|-
| isgraal3d
| ''boolean [R]''
|
|-
| isgraalplugin
| ''boolean [R]''
|
|-
| isleader
| ''boolean [R]''
| Player was the first to enter the level.
|-
| isonmap
| ''boolean [R]''
| Player is on a map.
|-
| isopengl
| ''boolean [R]''
| Graal is in opengl mode.
|-
| isrecordingvideo
| ''boolean [R]''
| Player is currently recording(alt+6) Graal.
|-
| jpegquality
| ''integer''
|
|-
| isgraalplugin
| ''boolean [R]''
|
|-
| lastdownloadfile
| ''string [R]''
| The last file downloaded.
|-
| leftmousebutton
| ''boolean [R]''
| If the left mouse button is pressed.
|-
| leftmousebuttonglobal
| ''boolean [R]''
| If the left mouse button is pressed. Returns whether mouse is in focus of GUIs or not.
|-
| levelorgx
| ''float [R]''
|
|-
| levelorgy
| ''float [R]''
|
|-
| lighteffectsenabled
| ''boolean''
| Whether the player has their lights enabled via options.
|-
| middlemousebutton
| ''boolean [R]''
| If the middle mouse button is pressed
|-
| middlemousebuttonglobal
| ''boolean [R]''
| If the middle mouse button is pressed. Returns whether mouse is in focus of GUIs or not.
|-
| mousebuttons
| ''integer [R]''
|
|-
| mousebuttonsglobal
| ''integer [R]''
|
|-
| mousepitch
| ''float [R] [3D]''
|
|-
| mousescreenx
| ''integer''
| Position of the mouse in the Graal screen, in pixel units on the x-axis.
|-
| mousescreeny
| ''integer''
| Position of the mouse in the Graal screen, in pixel units on the y-axis.
|-
| mousewheeldelta
| ''integer [R]''
| How much the mouse wheel has been scrolled.
|-
| mousex
| ''float''
| Position of the mouse in the level, in tile units, on the x-axis.
|-
| mousey
| ''float''
| Position of the mouse in the level, in tile units, on the y-axis
|-
| mouseyaw
| ''float [R] [3D]''
|
|-
| musiclen
| ''integer [R]''
| Length of current playing '''MP3'''
|-
| musicpos
| ''integer [R]''
| Position of current playing '''MP3'''
|-
| particleeffectsenabled
| ''boolean''
| If player has particles enabled in their options.
|-
| rightmousebutton
| ''boolean [R]''
| If the right mouse button is pressed
|-
| rightmousebuttonglobal
| ''boolean [R]''
| If the right mouse button is pressed. Returns whether mouse is in focus of GUIs or not.
|-
| screenheight
| ''integer [R]''
| Height of the Graal screen in pixel units.
|-
| screenwidth
| ''integer [R]''
| Width of the Graal screen in pixel units.
|-
| scriptedcontrols
| ''boolean [R]''
|
|-
| scriptedplayerlist
| ''boolean [R]''
| Whether the player has the scripted playerlist enabled.
|-
| scriptlogwritetoreadonly
| ''boolean''
|
|-
| selectedlistplayers
| ''object''
| An object of all players selected on the playerlist.
|-
| selectedsword
| ''integer''
|
|-
| selectedweapon
| ''integer''
| Index of the currently selected weapon.
|-
| servername
| ''string [R]''
| Name of the server.
|-
| serverstartconnect
| ''string''
|
|-
| serverstartparams
| ''string''
|
|-
| shotbybaddy
| ''boolean [R]''
| If the player is shot by a baddy(default) arrow.
|-
| shotbyplayer
| ''boolean [R]''
| If the player is shot by another players arrow.
|-
| showterraingrid
| ''boolean''
|
|-
| spritesimage
| ''string''
| Filename of the currently set sprite image.
|-
| statusimage
| ''string''
| Filename of the currently set state image.
|-
| timevar
| ''integer [R].''
|
|-
| timevar2
| ''float [R]''
|
|-
| timevar3
| ''float [R] [3D]''
| Synchronized time which works on both server and client-side, precision is milliseconds.
|-
| wasshooted
| ''boolean [R]''
| If the player is shot by a default arrow.
|-
| waterheight
| ''float''
|
|-
| weapons
| ''object [R]''
| all the players weapons, this includes login inherited weapons.
|-
| weaponsenabled
| ''boolean''
| If the players weapons are enabled via disableweapons()/enableweapons().
|-
| weathereffectsenabled
| ''boolean''
| If weather is enabled in the players options.
|-
| worldclockstopped
| ''boolean''
|
|-
| worldhour
| ''integer''
|
|-
| worldminute
| ''float''
|
|-
| worldminutesofday
| ''float''
|
|-
| worldrealsecondsperday
| ''float''
|
|-
|}
 
 
 
=Functions=
{| border="1" cellpadding="2" width="100%"
| '''Function'''
|width="100px"|'''Type'''
| '''Notes'''
|-
| addcontrol(object)
|
| adds 'object' to the parent control.
|-
| addmaterialmapping(string, string)
| [3D]
| returns boolean.
|-
| addtiledef(string image, string prefix, int format)
|
| Adds a tileset definition with the supplied tileset image, level prefix and tileset format (0=pics1, 1=new world, 5=terrain).
|-
| addtiledef2(string image, string prefix, int x, int y)
|
| Overlays an image on the tileset with the supplied tileset image and level prefix. Parameters 'x' and 'y' represent the x and y position on the tileset of where to place the new image.
|-
| aindexof(float, array)
|
| Returns integer - the position of 'float' in the array.
|-
| arccos(float)
|
| Returns float - the arc cosine of 'float'.
|-
| arcsin(float)
|
| Returns float - the arc sine of 'float'.
|-
| attachplayertoobj(integer1, integer2)
|
| Attaches the player to the object with the matching ID where integer1 is the object type (currently only NPCs - 0) and integer2 is the ID of the desired object.
|-
| base64decode(string)
|
| Returns string - Decodes a base64 string.
|-
| base64encode(string)
|
| Returns string - Encodes string in to several characters of a 64 printable character set (A-Z, a-z, 0-9, + and /, while "=" is a special suffix code)
|-
| boxcontains(string, string)
|
| returns boolean.
|-
| boxcontainsvector(string, string)
|
| returns boolean
|-
| boxintersect(string, string)
|
| returns string
|-
| boxoverlaps(string, string)
|
| returns boolean
|-
| boxscale(string, string)
|
| returns string
|-
| callnpc(int index, string function)
|
| Calls a function from an NPC where 'index' is the NPC's index and 'function' is the function name.
|-
| callweapon(int index, string function)
|
| Calls a function from a weapon where 'index' is the weapon's index and 'function' is the function name.
|-
| castray({x,y,x}, {x,y,z}, string type)
| [3D]
| returns object - specify the start and end of the ray, and the object types (e.g. "staticts,terrain,interior")
|-
| checksum(string)
|
| returns float
|-
| contains(string2, string1)
|
| returns boolean - True if string1 is contained within string2.
|-
| copystrings(string, string)
|
|
|-
| cursoroff()
| [opengl]
| Disables the visible mouse cursor.
|-
| cursoron()
| [opengl]
| Enables the visible mouse cursor.
|-
| degtorad(float)
|
| returns float - Converts angle measurements of degrees to radians
|-
| detachplayer()
|
| Detaches a player from an attached object.
|-
| disabledefmovement()
|
| Disables the default movement system and controls(including weapons, sword, grab. Does not include Q-menu, pause, map...).
|-
| disablemap()
|
| Disables the default map (M).
|-
| disablepause()
|
| Disables the default pause (P).
|-
| disableselectweapons()
|
| Disables the default Q-menu (Q).
|-
| disableweapons()
|
| Disables the default sword (S) and weapons (D).
|-
| [[Creation/Dev/Output_Methods#echo.28.29|echo(string)]]
|
| echos 'string' to the debug window(F2).
|-
| enabledefmovement()
|
| Enables the default movement system.
|-
| [[Creation/Dev/Script/Functions/enablefeatures(int)|enablefeatures(int)]]
|
|
|-
| enablemap()
|
| Enables the default map system(M).
|-
| enablepause()
|
| Enables the default pause system(P).
|-
| enableselectweapons()
|
| Enables the default Q-menu(Q).
|-
| enableweapons()
|
| Enables the default sword(S) and weapons(D).
|-
| escapestring(string)
|
| returns string - adds \\ in front of ", ' and \\, and removes non-printable characters
|-
| explodebomb(integer)
|
| explodes the bomb with the id of 'integer'.
|-
| extractfilebase(string)
|
| returns string
|-
| extractfileext(string)
|
| Takes in a file name, and returns its extension.
|-
| extractfilepath(string)
|
| returns string
|-
| fileexists(string)
|
| returns boolean of whether the file 'str' exists in the players Graal/ directory(does not search subfolders).
|-
| filesize(string)
|
| Returns the size(int) of the file 'string' in the players Graal/ directory(does not search subfolders).
|-
| fileupdate(string)
|
| returns boolean
|-
| findani(string)
|
| returns object
|-
| findfiles(string, integer)
|
| returns object
|-
| findlevel(string)
|
| returns object
|-
| findnearestplayer(float1, float2)
|
| Returns the closest player's object relevant to float1 and float2.
|-
| findnearestplayers(float, float)
|
| Returns the closest players' object relevant to float1 and float2.
|-
| findnpcbyid(integer)
|
| Returns the NPC object with the ID of 'int'.
|-
| findpathinarray(obj1, obj2, obj3, obj4, obj5, int, int, int)
|
| Returns object - Simple path-finding: Obj1 being tiles that allow walking, Obj2 being tiles that don't allow walking, Obj3; tiles that shouldn't be allowed to walked on, Obj4; tiles that are able to be walked on, Obj5; tiles where we may stop. Integers are relevant to the startx, starty and maximum path length. - Arrays for allowed/non-allowed tiles are only checked if they aren't null.
|-
| findplayer(string)
|
| Returns the player object with the account equal to string.
|-
| findplayerbycommunityname(string)
|
| Returns the player object with the community name equal to string.
|-
| findplayerbyid(integer)
|
| Returns the player object with the ID equal to integer.
|-
| findweapon(string)
|
| Returns the weapon object with the name equal to string.
|-
| [[Creation/Dev/Output_Methods#format.28.29_function|format(string, string, ...)]]
|
| See [[Creation/Dev/Output_Methods#format.28.29_function|format()]].
|-
| [[Creation/Dev/Output_Methods#format2.28.29_function|format2(string, array)]]
|
| Like format(), except that this expects the format string and an array of variables instead of passing the variables as separate parameters.
|-
| freefileresources(string)
|
|
|-
| freezeplayer(float)
|
| Freezes the player for the number of seconds specified by float.
|-
| get3dobjectat(float, float, boolean)
| [3D]
| Gets the 3d object at the specified screen position, third parameter true if it should do box collision.
|-
| get3dobjectatmouse(boolean)
| [3D]
| Gets the 3d object at the mouse.  Parameter true if it should do box collision.
|-
| get3dobjectbyray(string, string)
| [3D]
| returns object
|-
| get3dobjectsbybox(string, string)
| [3D]
| 1st parameter defines the box {minx,miny,minz, maxx,maxy,maxz}.  Second parameter specifies the type of object to find (e.g. "staticts,terrain,interior")
|-
| get3dscreenposition(string, boolean)
| [3D]
| returns string
|-
| getanglesfromvector({x, y, z})
|
| Returns an array that contains the angles the 3D vector {x, y, z} makes with the X-Y and X-Z axes.
|-
| getascii(string)
|
| Returns the [http://www.asciitable.com/ ascii] code for string.
|-
| getbasepackage()
|
| returns object
|-
| getboxcenter(string)
|
| Returns an array containing the center of a 3D box specified by string ({x0,y0,z0,x1,y1,z1,...}).
|-
| getdesktopresolution()
|
| returns string
|-
| getdisplaydevicelist()
|
| returns string
|-
| getdownloadedupdatepackagesize()
|
| Returns the size of the downloaded update package.
|-
| getdownloadingpackage()
|
| Returns a reference to current update package being downloaded.
|-
| getdownloadingpackagescount()
|
| Returns a count of the number of update packages to download.
|-
| getdropz(string)
|
| returns float
|-
| getExtension(string)
|
| This function is the same as extractFileExt().  Takes in a file name, and returns its extension.
|-
| getfilemodtime(string)
|
| Returns a timestamp of when the file was last modified (in unix time compatible to timevar2). This function accepts both exact file path and plain file name.
|-
| gethttprequest(string, integer, string)
|
| returns object (This function is the same as requestHttp())
|-
| getimgheight(string)
|
| Returns the height (in pixels) of the filename indicated by string.
|-
| getimgpixel(string, integer, integer)
|
| returns object
|-
| getimgwidth(string)
|
| Returns the width(in pixels) of the filename indicated by string.
|-
| getkeycode(string)
|
| Returns the keycode of the key indicated by string. The keycode returned can be used in keydown2().
|-
| getloginaccountname()
|
| Presumably used for the login server.  Use player.account instead.
|-
| getmapx(string)
|
| Gets the x coordinate location in the gmap of the level indicated by string.  The top-left level starts at (0, 0).
|-
| getmapy(string)
|
| Gets the y coordinate location in the gmap of the level indicated by string.  The top-left level starts at (0, 0).
|-
| getmusicfilename()
|
| Returns the filename of the music currently playing.
|-
| getmusicstatus()
|
| Returns the status of the music currently playing.
|-
| getmusictags()
|
| Returns the tags of the music currently playing.  This function can be used to retrieve the title and artist info of the music.
|-
| getnearestplayer(float, float)
|
| Deprecated.  Use findnearestplayer() instead.
|-
| getnearestplayers(float, float)
|
| Deprecated.  Use findnearestplayers() instead.
|-
| getpackagesdownloadcomplete()
|
| Returns 'true' if the package downloads are complete.
|-
| getpackagesdownloaded()
|
| Returns 'true' if the most recent packages are already downloaded.
|-
| getplatform()
|
| Returns the platform that the player is using.  (i.e. windows, mac, or linux)
|-
| getresolutionlist(string)
|
| returns string
|-
| getservername()
|
| Returns the name of the server the player is currently connected to.
|-
| getstringkeys(string)
|
| Returns an array of the variables that begins with the supplied string.
|-
| getterraintexture(float, float)
|
| returns string
|-
| getterraintextureindex(float, float)
|
| returns integer
|-
| gettextheight(float zoom, string style, string font)
|
| returns integer - The height in pixels of the text with the given zoom, style and font.
|-
| gettextwidth(float zoom, string style, string font, string text)
|
| returns integer - The width of the text with the given zoom, style, font and text.
|-
| gettileset()
|
| returns string - the current main tileset (pics1.png, picso.png etc.)
|-
| gettilesettype()
|
| returns integer - the current tileset type (pics1.png:0, picso.png:5 etc.)
|-
| gettotalupdatepackagesize()
|
| returns integer - The total size of the update packages.
|-
| getupdatepackage(string name)
|
| returns object - A reference to the update package with the given name.
|-
| getvectorfromangles(float, float)
|
| returns string
|-
| getz(float, float)
|
| returns float
|-
| graalcontrolhasfocus(bool)
|
| returns boolean - Whether or not the graal control has focus.  Parameter says if it should also check if the chat bar has the focus
|-
| hideplayer(float time)
|
| Hides player for the specified amount of time.
|-
| hidesword(float time)
|
| Hides the player's sword for the specified amount of time.
|-
| hitnpc(int index, float halfhearts, float fromx, float fromy)
|
| Hit's npc with specified index causing the specified amount of halfhearts in damage. It also knocks back the npc based on the from X and Y coordinate passed to it.
|-
| hitobjects(float power, float x, float y)
|
| Hurts all the npcs with the specified power on the position passed to it.
|-
| hitplayer(int index, float halfhearts, float fromx, float fromy)
|
| Hit's player with specified index causing the specified amount of halfhearts in damage. It also knocks back the player based on the from X and Y coordinate passed to it. Use 0 as the index to hit your own player.
|-
| isadminguild(str guildname)
|
| returns boolean - If the passed guildname is an admin guild or not.
|-
| isclassloaded(str classname)
|
| returns boolean - If the passed classname is loaded for the client.
|-
| iscursoron()
|
| returns boolean - If the cursor is on or not.
|-
| isdevicefullscreenonly(str device)
|
| returns boolean - If the device is full screen only or not.
|-
| isdownloading(str filename)
|
| returns boolean - If a file is currently downloaded or requested from the server.
|-
| isdownloadingfiles()
|
| returns boolean - checks if Graal is currently downloading or requesting files from the server.
|-
| isfullscreenmode()
|
| returns boolean - checks if Graal is currently in fullscreen mode.
|-
| isimgrectangletransparent(str, int, int, int, int)
|
| returns boolean
|-
| ismusicplaying()
|
| returns boolean
|-
| isobject(str)
|
| returns boolean
|-
| issoundplaying(str)
|
| returns boolean
|-
| keydown(int)
|
| returns boolean
|-
| keydown2(int, bool)
|
| returns boolean
|-
| keydown2global(int, bool)
|
| returns boolean
|-
| keydownglobal(int)
|
| returns boolean
|-
| keyname(int)
|
| returns string
|-
| lay2(str, float, float)
|
|
|-
| lightscene()
|
| returns boolean
|-
| loadclass(str)
|
|
|-
| loadmap(str)
|
|
|-
| loadtranslation(str)
|
|
|-
| lowercase(str)
|
| returns string
|-
| ltmfs(bool)
|
|
|-
| ltmmax(float, float)
|
|
|-
| ltmmin(float, float)
|
|
|-
| makescreenshot2(str, int, float, float, float, int, int)
|
|
|-
| matrixcreate(str, str)
|
| returns string
|-
| matrixcreatefromeuler(str)
|
| returns string
|-
| matrixmulpoint(str, str)
|
| returns string
|-
| matrixmultiply(str, str)
|
| returns string
|-
| matrixmulvector(str, str)
|
| returns string
|-
| md5(str)
|
| returns string
|-
| noplayerkilling()
|
|
|-
| onwall(float, float)
|
| returns boolean
|-
| onwall2(float, float, float, float)
|
| returns boolean
|-
| onwater(float, float)
|
| returns boolean
|-
| onwater2(float, float, float, float)
|
| returns boolean
|-
| opengraalurl(str)
|
|
|-
| openurl(str)
|
|
|-
| openurl2(str, int, int)
|
|
|-
| play(str)
|
|
|-
| play2(str, float, float, float)
|
|
|-
| play3d(str, bool, str, str)
|
|
|-
| playlooped(str)
|
|
|-
| playlooped2(str, float, float, float)
|
|
|-
| popdialog()
|
|
|-
| pushdialog(obj)
|
|
|-
| putleaps(int, float, float)
|
|
|-
| radtodeg(float)
|
| returns float
|-
| randomstring(str)
|
| returns string
|-
| removetiledefs(str)
|
|
|-
| replaceani(str, str)
|
|
|-
| requestfiledeletion(str)
|
|
|-
| requestfilerename(str, str)
|
|
|-
| requestfilesmove(str, str)
|
|
|-
| requesthttp(str, int, str)
|
| returns object
|-
| requesttext(str, str)
|
|
|-
| requesturl(str)
|
| returns object
|-
| resetfocus()
|
|
|-
| rotationadd(str, str)
|
| returns string
|-
| rotationaddeuler(str, str)
|
| returns string
|-
| rotationfromeuler(str)
|
| returns string
|-
| rotationsub(str, str)
|
| returns string
|-
| rotationtoeuler(str)
|
| returns string
|-
| rungarbagecollector()
|
|
|-
| savelog(str)
|
|
|-
| say(int)
|
|
|-
| say2(str)
|
|
|-
| screenx(float, float)
|
| returns integer
|-
| screeny(float, float)
|
| returns integer
|-
| selectfilefordownload(str)
|
| opens the select
|-
| selectfileforupload()
|
| opens the select
|-
| [[Creation/Dev/Output_Methods#sendrpgmessage.28.29|sendrpgmessage(str)]]
|
|
|-
| sendtext(str, str, params...)
|
|
|-
| [[Creation/Dev/Output_Methods#sendtorc.28.29|sendtorc(str)]]
|
|
|-
| serverwarp(str)
|
|
|-
| setani(str, str)
|
|
|-
| setbeltcolor(str)
|
|
|-
| setcoatcolor(str)
|
|
|-
| setcontentcontrol(obj)
|
|
|-
| setcursor2(str)
|
|
|-
| seteffect(float, float, float, float)
|
|
|-
| setfocus(float, float)
|
|
|-
| setfogcolors(obj)
|
|
|-
| setgender(str)
|
|
|-
| sethead(str)
|
|
|-
| setinteriorrendermode(int)
|
|
|-
| setletters(str)
|
|
|-
| setmap(str, str, float, float)
|
| sets a text map (you can see the tiles of other levels but not the npcs), parameters are text file with level names, the map image (not used anymore), default x and y for the head icons; use gmaps if possible instead of this
|-
| setminimap(str, str, float, float)
|
| parameters are a text file with level names, the image, default x and y; use gmaps if possible instead of this
|-
| setmusicvolume(float, float)
|
|
|-
| setplayerdir(str)
|
|
|-
| setshield(str, int)
|
|
|-
| setshoecolor(str)
|
|
|-
| setshootparams(str)
|
|
|-
| setskincolor(str)
|
|
|-
| setskybandcolors(obj)
|
|
|-
| setskybandsizes(obj)
|
|
|-
| setsleevecolor(str)
|
|
|-
| setspritesimage(str)
|
|
|-
| setstatusimage(str)
|
|
|-
| setsuncolors(obj)
|
|
|-
| setsword(str, int)
|
|
|-
| setterrainrendermode(int)
|
|
|-
| showstats(int)
|
|
|-
| spyfire(int, int)
|
|
|-
| startrecordvideo()
|
| returns boolean
|-
| stopmidi()
|
| same as stopmusic(), kept for compatibility
|-
| stopmusic()
|
|
|-
| stoprecordvideo()
|
| returns boolean
|-
| stopsound(str)
|
|
|-
| strcmp(str, str)
|
| returns integer
|-
| strequals(str, str)
|
| returns boolean
|-
| switchtoopengl()
|
|
|-
| synctimeofday(float, float)
|
|
|-
| takeplayercarry()
|
|
|-
| takeplayerhorse()
|
|
|-
| testplayer(float, float)
|
| returns integer
|-
| [[Creation/Dev/Output_Methods#echo.28.29|trace(string)]]
|
| same as [[Creation/Dev/Output_Methods#echo.28.29|echo()]]. Included for compatibility with ActionScript. As such, it should be considered <span style="color:red; font-weight: bold;">deprecated</span>.
|-
| triggeraction(float, float, str, params...)
|
|
|-
| triggerserver(str, str)
|
|
|-
| update3dterrain(float, float, float, float)
|
|
|-
| updateboard(int, int, int, int)
|
|
|-
| updateterrain()
|
|
|-
| updatevisibledistance()
|
|
|-
| uploadfile(str)
|
| uploads a file, you must provide the full path provided by a onDropFiles() event, also this will only work if the scripted RC has currently a file browser window open; once the file is uploaded an onFilesUploaded event will be invoked
|-
| uppercase(str)
|
| returns string
|-
| [[Vectors#Vector_Addition|vectoradd(str, str)]]
|
| returns string
|-
| [[Cross Product|vectorcross(str, str)]]
|
| returns string
|-
| [[Vectors#Distance_Between_Terminal_Points|vectordist(str, str)]]
|
| returns float
|-
| [[Dot Product|vectordot(str, str)]]
|
| returns float
|-
| [[Vectors#Vector_Length_.28Magnitude.2FModulus.29|vectorlen(str)]]
|
| returns float
|-
| [[Vectors#Unit_Length|vectornormalize(str)]]
|
| returns string
|-
| vectororthobasis(str)
|
| returns string
|-
| [[Vectors#Vector-Scalar_Multiplication|vectorscale(str, float)]]
|
| returns string
|-
| [[Vectors#Vector_Subtraction|vectorsub(str, str)]]
|
| returns string
|-
| worldx(float, float)
|
| returns float
|-
| worldy(float, float)
|
| returns float
|-
| wraptext(int, str, str)
|
| returns object
|-
| wraptext2(int, float, str, str)
|
| returns object
|}
<br />
 
=Objects=
{{:Creation/Dev/Script/Client}}
<br />
 
=GUI Objects=
GUI Objects are currently well documented starting here [[Creation/Dev/Script/Client/GuiControl]].
 
=Preference Variables=
{| border="1" cellpadding="2" width="100%"
| '''Variable'''
|width="100px"|'''Type'''
| '''Notes'''
|-
| $pref::audio::choosenvoicecodec
|
| integer
|-
| $pref::audio::microactivatebyvolume
|
| boolean
|-
| $pref::audio::microactivationlevel
|
| integer
|-
| $pref::audio::microinputdevice
|
| integer
|-
| $pref::audio::microon
|
| boolean
|-
| $pref::audio::microvolumefactor
|
| integer
|-
| $pref::audio::midivolume
|
| integer
|-
| $pref::audio::mp3volume
|
| integer
|-
| $pref::audio::radiovolume
|
| integer
|-
| $pref::audio::reversestereo
|
| boolean
|-
| $pref::audio::sfxvolume
|
| integer
|-
| $pref::audio::voicevolume
|
| integer
|-
| $pref::capture::allowbyscript
|
| boolean [R]
|-
| $pref::capture::area
|
| string
|-
| $pref::capture::audiobitrate
|
| integer
|-
| $pref::capture::disabledaynight
|
| boolean
|-
| $pref::capture::format
|
| string
|-
| $pref::capture::fps
|
| integer
|-
| $pref::capture::hideinterface
|
| boolean
|-
| $pref::capture::recordaudio
|
| boolean
|-
| $pref::capture::showmouse
|
| boolean
|-
| $pref::capture::size
|
| string
|-
| $pref::capture::videobitrate
|
| integer
|-
| $pref::graal::allowglobalpms
|
| boolean
|-
| $pref::graal::automapping
|
| boolean
|-
| $pref::graal::defaultfontname
|
| string
|-
| $pref::graal::defaultfontsize
|
| integer
|-
| $pref::graal::dontconnectlevels
|
| boolean
|-
| $pref::graal::dontloadlistheads
|
| boolean
|-
| $pref::graal::dontsavepasswords
|
| boolean
|-
| $pref::graal::dontsavepms
|
| boolean
|-
| $pref::graal::fixedport
|
| boolean
|-
| $pref::graal::fixedudpport
|
| integer
|-
| $pref::graal::language
|
| string
|-
| $pref::graal::limitnicknames
|
| boolean
|-
| $pref::graal::loadbuddylistfromserver
|
| boolean
|-
| $pref::graal::nicknamelimit
|
| integer
|-
| $pref::graal::nomassmessages
|
| boolean
|-
| $pref::graal::notoalls
|
| boolean
|-
| $pref::graal::noudp
|
| boolean
|-
| $pref::graal::showyourselfonbuddylists
|
| boolean
|-
| $pref::input::mousesensitivity
|
| float
|-
| $pref::interior::lockarrays
|
| boolean
|-
| $pref::video::defaultguistyle
|
| string
|-
| $pref::video::detailfactor
|
| float
|-
| $pref::video::fogdistance
|
| float
|-
| $pref::video::fullscreenmode
|
| string
|-
| $pref::video::resolution
|
| integer
|-
| $pref::video::screenshotformat
|
| string
|-
| $pref::video::visibledistance
|
| float
|-
| $pref::video::windowmode
|
| string
|}

Latest revision as of 10:55, 13 October 2011

[R] denotes it is read-only.
[3D] denotes it is a Graal3D function.
[opengl] denotes it is functional only in opengl mode.


Variables

Variable Type Notes
allfeatures integer [R]
allplayerscount integer [R] Returns the count of all players on your playerlist, including IRC bots.
allrenderobjecttypes integer [R]
allstats integer [R] Used with showstats() in order to show all stats.
canspin boolean [R] Returns true of false if the player has spin attack.
carriesblackstone boolean [R] Returns whether the player is carrying a black stone.
carriesbush boolean [R] Returns whether the player is carrying a bush.
carriesnpc boolean [R] Returns whether the player is carrying an NPC
carriessign boolean [R] Returns whether the player is carrying a sign.
carriesstone boolean [R] Returns whether the player is carrying a stone.
carriesvase boolean [R] Returns whether the player is carrying a vase.
downloadfile string [R] Returns the currently downloaded file.
downloadpos integer [R] Returns the position of the currently downloaded file.
downloadsize integer [R] Returns the size of the currently downloaded file.
editingmission boolean
emoticonchar string [R]
focusx float [R] Position of the camera in tile units.
focusy float [R] Position of the camera in tile units.
ghostsnear boolean [R] If a ghost(observer) is in the same level as the player.
graalplugincookie string [R]
graalversion float [R] Version of Graal the player is using.
gravity float The gravity value that effects how fast projectiles fall. It universally effects all projectiles.
installedlanguages string [R]
isapplicationactive boolean [R] Is Graal window active?
iscarrying boolean [R] Returns true of false if the player is carrying something.
isfocused boolean [R]
isgraal3d boolean [R]
isgraalplugin boolean [R]
isleader boolean [R] Player was the first to enter the level.
isonmap boolean [R] Player is on a map.
isopengl boolean [R] Graal is in opengl mode.
isrecordingvideo boolean [R] Player is currently recording(alt+6) Graal.
jpegquality integer
isgraalplugin boolean [R]
lastdownloadfile string [R] The last file downloaded.
leftmousebutton boolean [R] If the left mouse button is pressed.
leftmousebuttonglobal boolean [R] If the left mouse button is pressed. Returns whether mouse is in focus of GUIs or not.
levelorgx float [R]
levelorgy float [R]
lighteffectsenabled boolean Whether the player has their lights enabled via options.
middlemousebutton boolean [R] If the middle mouse button is pressed
middlemousebuttonglobal boolean [R] If the middle mouse button is pressed. Returns whether mouse is in focus of GUIs or not.
mousebuttons integer [R]
mousebuttonsglobal integer [R]
mousepitch float [R] [3D]
mousescreenx integer Position of the mouse in the Graal screen, in pixel units on the x-axis.
mousescreeny integer Position of the mouse in the Graal screen, in pixel units on the y-axis.
mousewheeldelta integer [R] How much the mouse wheel has been scrolled.
mousex float Position of the mouse in the level, in tile units, on the x-axis.
mousey float Position of the mouse in the level, in tile units, on the y-axis
mouseyaw float [R] [3D]
musiclen integer [R] Length of current playing MP3
musicpos integer [R] Position of current playing MP3
particleeffectsenabled boolean If player has particles enabled in their options.
rightmousebutton boolean [R] If the right mouse button is pressed
rightmousebuttonglobal boolean [R] If the right mouse button is pressed. Returns whether mouse is in focus of GUIs or not.
screenheight integer [R] Height of the Graal screen in pixel units.
screenwidth integer [R] Width of the Graal screen in pixel units.
scriptedcontrols boolean [R]
scriptedplayerlist boolean [R] Whether the player has the scripted playerlist enabled.
scriptlogwritetoreadonly boolean
selectedlistplayers object An object of all players selected on the playerlist.
selectedsword integer
selectedweapon integer Index of the currently selected weapon.
servername string [R] Name of the server.
serverstartconnect string
serverstartparams string
shotbybaddy boolean [R] If the player is shot by a baddy(default) arrow.
shotbyplayer boolean [R] If the player is shot by another players arrow.
showterraingrid boolean
spritesimage string Filename of the currently set sprite image.
statusimage string Filename of the currently set state image.
timevar integer [R].
timevar2 float [R]
timevar3 float [R] [3D] Synchronized time which works on both server and client-side, precision is milliseconds.
wasshooted boolean [R] If the player is shot by a default arrow.
waterheight float
weapons object [R] all the players weapons, this includes login inherited weapons.
weaponsenabled boolean If the players weapons are enabled via disableweapons()/enableweapons().
weathereffectsenabled boolean If weather is enabled in the players options.
worldclockstopped boolean
worldhour integer
worldminute float
worldminutesofday float
worldrealsecondsperday float


Functions

Function Type Notes
addcontrol(object) adds 'object' to the parent control.
addmaterialmapping(string, string) [3D] returns boolean.
addtiledef(string image, string prefix, int format) Adds a tileset definition with the supplied tileset image, level prefix and tileset format (0=pics1, 1=new world, 5=terrain).
addtiledef2(string image, string prefix, int x, int y) Overlays an image on the tileset with the supplied tileset image and level prefix. Parameters 'x' and 'y' represent the x and y position on the tileset of where to place the new image.
aindexof(float, array) Returns integer - the position of 'float' in the array.
arccos(float) Returns float - the arc cosine of 'float'.
arcsin(float) Returns float - the arc sine of 'float'.
attachplayertoobj(integer1, integer2) Attaches the player to the object with the matching ID where integer1 is the object type (currently only NPCs - 0) and integer2 is the ID of the desired object.
base64decode(string) Returns string - Decodes a base64 string.
base64encode(string) Returns string - Encodes string in to several characters of a 64 printable character set (A-Z, a-z, 0-9, + and /, while "=" is a special suffix code)
boxcontains(string, string) returns boolean.
boxcontainsvector(string, string) returns boolean
boxintersect(string, string) returns string
boxoverlaps(string, string) returns boolean
boxscale(string, string) returns string
callnpc(int index, string function) Calls a function from an NPC where 'index' is the NPC's index and 'function' is the function name.
callweapon(int index, string function) Calls a function from a weapon where 'index' is the weapon's index and 'function' is the function name.
castray({x,y,x}, {x,y,z}, string type) [3D] returns object - specify the start and end of the ray, and the object types (e.g. "staticts,terrain,interior")
checksum(string) returns float
contains(string2, string1) returns boolean - True if string1 is contained within string2.
copystrings(string, string)
cursoroff() [opengl] Disables the visible mouse cursor.
cursoron() [opengl] Enables the visible mouse cursor.
degtorad(float) returns float - Converts angle measurements of degrees to radians
detachplayer() Detaches a player from an attached object.
disabledefmovement() Disables the default movement system and controls(including weapons, sword, grab. Does not include Q-menu, pause, map...).
disablemap() Disables the default map (M).
disablepause() Disables the default pause (P).
disableselectweapons() Disables the default Q-menu (Q).
disableweapons() Disables the default sword (S) and weapons (D).
echo(string) echos 'string' to the debug window(F2).
enabledefmovement() Enables the default movement system.
enablefeatures(int)
enablemap() Enables the default map system(M).
enablepause() Enables the default pause system(P).
enableselectweapons() Enables the default Q-menu(Q).
enableweapons() Enables the default sword(S) and weapons(D).
escapestring(string) returns string - adds \\ in front of ", ' and \\, and removes non-printable characters
explodebomb(integer) explodes the bomb with the id of 'integer'.
extractfilebase(string) returns string
extractfileext(string) Takes in a file name, and returns its extension.
extractfilepath(string) returns string
fileexists(string) returns boolean of whether the file 'str' exists in the players Graal/ directory(does not search subfolders).
filesize(string) Returns the size(int) of the file 'string' in the players Graal/ directory(does not search subfolders).
fileupdate(string) returns boolean
findani(string) returns object
findfiles(string, integer) returns object
findlevel(string) returns object
findnearestplayer(float1, float2) Returns the closest player's object relevant to float1 and float2.
findnearestplayers(float, float) Returns the closest players' object relevant to float1 and float2.
findnpcbyid(integer) Returns the NPC object with the ID of 'int'.
findpathinarray(obj1, obj2, obj3, obj4, obj5, int, int, int) Returns object - Simple path-finding: Obj1 being tiles that allow walking, Obj2 being tiles that don't allow walking, Obj3; tiles that shouldn't be allowed to walked on, Obj4; tiles that are able to be walked on, Obj5; tiles where we may stop. Integers are relevant to the startx, starty and maximum path length. - Arrays for allowed/non-allowed tiles are only checked if they aren't null.
findplayer(string) Returns the player object with the account equal to string.
findplayerbycommunityname(string) Returns the player object with the community name equal to string.
findplayerbyid(integer) Returns the player object with the ID equal to integer.
findweapon(string) Returns the weapon object with the name equal to string.
format(string, string, ...) See format().
format2(string, array) Like format(), except that this expects the format string and an array of variables instead of passing the variables as separate parameters.
freefileresources(string)
freezeplayer(float) Freezes the player for the number of seconds specified by float.
get3dobjectat(float, float, boolean) [3D] Gets the 3d object at the specified screen position, third parameter true if it should do box collision.
get3dobjectatmouse(boolean) [3D] Gets the 3d object at the mouse. Parameter true if it should do box collision.
get3dobjectbyray(string, string) [3D] returns object
get3dobjectsbybox(string, string) [3D] 1st parameter defines the box {minx,miny,minz, maxx,maxy,maxz}. Second parameter specifies the type of object to find (e.g. "staticts,terrain,interior")
get3dscreenposition(string, boolean) [3D] returns string
getanglesfromvector({x, y, z}) Returns an array that contains the angles the 3D vector {x, y, z} makes with the X-Y and X-Z axes.
getascii(string) Returns the ascii code for string.
getbasepackage() returns object
getboxcenter(string) Returns an array containing the center of a 3D box specified by string ({x0,y0,z0,x1,y1,z1,...}).
getdesktopresolution() returns string
getdisplaydevicelist() returns string
getdownloadedupdatepackagesize() Returns the size of the downloaded update package.
getdownloadingpackage() Returns a reference to current update package being downloaded.
getdownloadingpackagescount() Returns a count of the number of update packages to download.
getdropz(string) returns float
getExtension(string) This function is the same as extractFileExt(). Takes in a file name, and returns its extension.
getfilemodtime(string) Returns a timestamp of when the file was last modified (in unix time compatible to timevar2). This function accepts both exact file path and plain file name.
gethttprequest(string, integer, string) returns object (This function is the same as requestHttp())
getimgheight(string) Returns the height (in pixels) of the filename indicated by string.
getimgpixel(string, integer, integer) returns object
getimgwidth(string) Returns the width(in pixels) of the filename indicated by string.
getkeycode(string) Returns the keycode of the key indicated by string. The keycode returned can be used in keydown2().
getloginaccountname() Presumably used for the login server. Use player.account instead.
getmapx(string) Gets the x coordinate location in the gmap of the level indicated by string. The top-left level starts at (0, 0).
getmapy(string) Gets the y coordinate location in the gmap of the level indicated by string. The top-left level starts at (0, 0).
getmusicfilename() Returns the filename of the music currently playing.
getmusicstatus() Returns the status of the music currently playing.
getmusictags() Returns the tags of the music currently playing. This function can be used to retrieve the title and artist info of the music.
getnearestplayer(float, float) Deprecated. Use findnearestplayer() instead.
getnearestplayers(float, float) Deprecated. Use findnearestplayers() instead.
getpackagesdownloadcomplete() Returns 'true' if the package downloads are complete.
getpackagesdownloaded() Returns 'true' if the most recent packages are already downloaded.
getplatform() Returns the platform that the player is using. (i.e. windows, mac, or linux)
getresolutionlist(string) returns string
getservername() Returns the name of the server the player is currently connected to.
getstringkeys(string) Returns an array of the variables that begins with the supplied string.
getterraintexture(float, float) returns string
getterraintextureindex(float, float) returns integer
gettextheight(float zoom, string style, string font) returns integer - The height in pixels of the text with the given zoom, style and font.
gettextwidth(float zoom, string style, string font, string text) returns integer - The width of the text with the given zoom, style, font and text.
gettileset() returns string - the current main tileset (pics1.png, picso.png etc.)
gettilesettype() returns integer - the current tileset type (pics1.png:0, picso.png:5 etc.)
gettotalupdatepackagesize() returns integer - The total size of the update packages.
getupdatepackage(string name) returns object - A reference to the update package with the given name.
getvectorfromangles(float, float) returns string
getz(float, float) returns float
graalcontrolhasfocus(bool) returns boolean - Whether or not the graal control has focus. Parameter says if it should also check if the chat bar has the focus
hideplayer(float time) Hides player for the specified amount of time.
hidesword(float time) Hides the player's sword for the specified amount of time.
hitnpc(int index, float halfhearts, float fromx, float fromy) Hit's npc with specified index causing the specified amount of halfhearts in damage. It also knocks back the npc based on the from X and Y coordinate passed to it.
hitobjects(float power, float x, float y) Hurts all the npcs with the specified power on the position passed to it.
hitplayer(int index, float halfhearts, float fromx, float fromy) Hit's player with specified index causing the specified amount of halfhearts in damage. It also knocks back the player based on the from X and Y coordinate passed to it. Use 0 as the index to hit your own player.
isadminguild(str guildname) returns boolean - If the passed guildname is an admin guild or not.
isclassloaded(str classname) returns boolean - If the passed classname is loaded for the client.
iscursoron() returns boolean - If the cursor is on or not.
isdevicefullscreenonly(str device) returns boolean - If the device is full screen only or not.
isdownloading(str filename) returns boolean - If a file is currently downloaded or requested from the server.
isdownloadingfiles() returns boolean - checks if Graal is currently downloading or requesting files from the server.
isfullscreenmode() returns boolean - checks if Graal is currently in fullscreen mode.
isimgrectangletransparent(str, int, int, int, int) returns boolean
ismusicplaying() returns boolean
isobject(str) returns boolean
issoundplaying(str) returns boolean
keydown(int) returns boolean
keydown2(int, bool) returns boolean
keydown2global(int, bool) returns boolean
keydownglobal(int) returns boolean
keyname(int) returns string
lay2(str, float, float)
lightscene() returns boolean
loadclass(str)
loadmap(str)
loadtranslation(str)
lowercase(str) returns string
ltmfs(bool)
ltmmax(float, float)
ltmmin(float, float)
makescreenshot2(str, int, float, float, float, int, int)
matrixcreate(str, str) returns string
matrixcreatefromeuler(str) returns string
matrixmulpoint(str, str) returns string
matrixmultiply(str, str) returns string
matrixmulvector(str, str) returns string
md5(str) returns string
noplayerkilling()
onwall(float, float) returns boolean
onwall2(float, float, float, float) returns boolean
onwater(float, float) returns boolean
onwater2(float, float, float, float) returns boolean
opengraalurl(str)
openurl(str)
openurl2(str, int, int)
play(str)
play2(str, float, float, float)
play3d(str, bool, str, str)
playlooped(str)
playlooped2(str, float, float, float)
popdialog()
pushdialog(obj)
putleaps(int, float, float)
radtodeg(float) returns float
randomstring(str) returns string
removetiledefs(str)
replaceani(str, str)
requestfiledeletion(str)
requestfilerename(str, str)
requestfilesmove(str, str)
requesthttp(str, int, str) returns object
requesttext(str, str)
requesturl(str) returns object
resetfocus()
rotationadd(str, str) returns string
rotationaddeuler(str, str) returns string
rotationfromeuler(str) returns string
rotationsub(str, str) returns string
rotationtoeuler(str) returns string
rungarbagecollector()
savelog(str)
say(int)
say2(str)
screenx(float, float) returns integer
screeny(float, float) returns integer
selectfilefordownload(str) opens the select
selectfileforupload() opens the select
sendrpgmessage(str)
sendtext(str, str, params...)
sendtorc(str)
serverwarp(str)
setani(str, str)
setbeltcolor(str)
setcoatcolor(str)
setcontentcontrol(obj)
setcursor2(str)
seteffect(float, float, float, float)
setfocus(float, float)
setfogcolors(obj)
setgender(str)
sethead(str)
setinteriorrendermode(int)
setletters(str)
setmap(str, str, float, float) sets a text map (you can see the tiles of other levels but not the npcs), parameters are text file with level names, the map image (not used anymore), default x and y for the head icons; use gmaps if possible instead of this
setminimap(str, str, float, float) parameters are a text file with level names, the image, default x and y; use gmaps if possible instead of this
setmusicvolume(float, float)
setplayerdir(str)
setshield(str, int)
setshoecolor(str)
setshootparams(str)
setskincolor(str)
setskybandcolors(obj)
setskybandsizes(obj)
setsleevecolor(str)
setspritesimage(str)
setstatusimage(str)
setsuncolors(obj)
setsword(str, int)
setterrainrendermode(int)
showstats(int)
spyfire(int, int)
startrecordvideo() returns boolean
stopmidi() same as stopmusic(), kept for compatibility
stopmusic()
stoprecordvideo() returns boolean
stopsound(str)
strcmp(str, str) returns integer
strequals(str, str) returns boolean
switchtoopengl()
synctimeofday(float, float)
takeplayercarry()
takeplayerhorse()
testplayer(float, float) returns integer
trace(string) same as echo(). Included for compatibility with ActionScript. As such, it should be considered deprecated.
triggeraction(float, float, str, params...)
triggerserver(str, str)
update3dterrain(float, float, float, float)
updateboard(int, int, int, int)
updateterrain()
updatevisibledistance()
uploadfile(str) uploads a file, you must provide the full path provided by a onDropFiles() event, also this will only work if the scripted RC has currently a file browser window open; once the file is uploaded an onFilesUploaded event will be invoked
uppercase(str) returns string
vectoradd(str, str) returns string
vectorcross(str, str) returns string
vectordist(str, str) returns float
vectordot(str, str) returns float
vectorlen(str) returns float
vectornormalize(str) returns string
vectororthobasis(str) returns string
vectorscale(str, float) returns string
vectorsub(str, str) returns string
worldx(float, float) returns float
worldy(float, float) returns float
wraptext(int, str, str) returns object
wraptext2(int, float, str, str) returns object


Objects

Object Navigation


GUI Objects

GUI Objects are currently well documented starting here Creation/Dev/Script/Client/GuiControl.

Preference Variables

Variable Type Notes
$pref::audio::choosenvoicecodec integer
$pref::audio::microactivatebyvolume boolean
$pref::audio::microactivationlevel integer
$pref::audio::microinputdevice integer
$pref::audio::microon boolean
$pref::audio::microvolumefactor integer
$pref::audio::midivolume integer
$pref::audio::mp3volume integer
$pref::audio::radiovolume integer
$pref::audio::reversestereo boolean
$pref::audio::sfxvolume integer
$pref::audio::voicevolume integer
$pref::capture::allowbyscript boolean [R]
$pref::capture::area string
$pref::capture::audiobitrate integer
$pref::capture::disabledaynight boolean
$pref::capture::format string
$pref::capture::fps integer
$pref::capture::hideinterface boolean
$pref::capture::recordaudio boolean
$pref::capture::showmouse boolean
$pref::capture::size string
$pref::capture::videobitrate integer
$pref::graal::allowglobalpms boolean
$pref::graal::automapping boolean
$pref::graal::defaultfontname string
$pref::graal::defaultfontsize integer
$pref::graal::dontconnectlevels boolean
$pref::graal::dontloadlistheads boolean
$pref::graal::dontsavepasswords boolean
$pref::graal::dontsavepms boolean
$pref::graal::fixedport boolean
$pref::graal::fixedudpport integer
$pref::graal::language string
$pref::graal::limitnicknames boolean
$pref::graal::loadbuddylistfromserver boolean
$pref::graal::nicknamelimit integer
$pref::graal::nomassmessages boolean
$pref::graal::notoalls boolean
$pref::graal::noudp boolean
$pref::graal::showyourselfonbuddylists boolean
$pref::input::mousesensitivity float
$pref::interior::lockarrays boolean
$pref::video::defaultguistyle string
$pref::video::detailfactor float
$pref::video::fogdistance float
$pref::video::fullscreenmode string
$pref::video::resolution integer
$pref::video::screenshotformat string
$pref::video::visibledistance float
$pref::video::windowmode string