docu_core.php 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822
  1. <section id="General">
  2. <table>
  3. <tr>
  4. <th class="command">
  5. + - * / % &amp; | ^ ~ = += -= *= /= %= ++ -- &lt;&lt; &lt;&lt;= &gt;&gt;
  6. &gt;&gt;= &amp;= ^= |= || &amp;&amp; () &lt; &gt; &lt;= &gt;= == ! !=
  7. if while break continue elseif else
  8. </th>
  9. <th class="desc">work as in any general purpose programming language</th>
  10. </tr>
  11. <tr>
  12. <td class="bold">Examples</td>
  13. <td>a = 3 * (5 - 1);<br>a++;<br>a <<= 3;</td>
  14. </tr>
  15. </table>
  16. <table>
  17. <tr>
  18. <th class="command">for</th>
  19. <th class="desc">executes the start instruction once, and repeats the block and the per loop function until the loop check is false</th>
  20. </tr>
  21. <tr>
  22. <td class="bold">Format</td>
  23. <td>for(start_instruction; loop_check; per_loop) { } </td>
  24. </tr>
  25. <tr>
  26. <td class="bold">Examples</td>
  27. <td>for(i = 0; i < 5; i++) { print("hi"); }</td>
  28. </tr>
  29. </table>
  30. <table>
  31. <tr>
  32. <th class="command">functions</th>
  33. <th class="desc">functions can be written and have their own scope, global variables can be accessed by using a $</th>
  34. </tr>
  35. <tr>
  36. <td class="bold">Format</td>
  37. <td>function function_name(vars, ...) { } </td>
  38. </tr>
  39. <tr>
  40. <td class="bold">Examples</td>
  41. <td>c = 6;<br>function printStuff(a, b)<br>{<br>print(a, b, $c);<br>}<br>printStuff(4, "Hallo");</td>
  42. </tr>
  43. </table>
  44. <table>
  45. <tr>
  46. <th class="command">print</th>
  47. <th class="desc">prints all arguments connected to the default console</th>
  48. </tr>
  49. <tr>
  50. <td class="bold">Format</td>
  51. <td>print(arg, ...)</td>
  52. </tr>
  53. </table>
  54. <table>
  55. <tr>
  56. <th class="command">getVar</th>
  57. <th class="desc">returns the value of a variable</th>
  58. </tr>
  59. <tr>
  60. <td class="bold">Format</td>
  61. <td>getVar(variable_name_string)</td>
  62. </tr>
  63. </table>
  64. <table>
  65. <tr>
  66. <th class="command">setVar</th>
  67. <th class="desc">sets the value of a variable</th>
  68. </tr>
  69. <tr>
  70. <td class="bold">Format</td>
  71. <td>setVar(variable_name_string, value)</td>
  72. </tr>
  73. </table>
  74. <table>
  75. <tr>
  76. <th class="command">swap</th>
  77. <th class="desc">swaps the values of two variables</th>
  78. </tr>
  79. <tr>
  80. <td class="bold">Format</td>
  81. <td>swap(var1, var2)</td>
  82. </tr>
  83. </table>
  84. <table>
  85. <tr>
  86. <th class="command">nothing</th>
  87. <th class="desc">does nothing</th>
  88. </tr>
  89. <tr>
  90. <td class="bold">Format</td>
  91. <td>nothing()</td>
  92. </tr>
  93. </table>
  94. <table>
  95. <tr>
  96. <th class="command">error</th>
  97. <th class="desc">sets if full stack exceptions are printed to the logger</th>
  98. </tr>
  99. <tr>
  100. <td class="bold">Format</td>
  101. <td>error(boolean)</td>
  102. </tr>
  103. </table>
  104. <table>
  105. <tr>
  106. <th class="command">array.new</th>
  107. <th class="desc">initializes an array with the given size and returns the array</th>
  108. </tr>
  109. <tr>
  110. <td class="bold">Format</td>
  111. <td>array.new(size, ...)</td>
  112. </tr>
  113. <tr>
  114. <td class="bold">Examples</td>
  115. <td>a = array.new(3);<br>a[0] = 2;<br>b = array.new(3, 2)<br>b[0, 0] = 3;</td>
  116. </tr>
  117. </table>
  118. <table>
  119. <tr>
  120. <th class="command">array.getSize</th>
  121. <th class="desc">returns the size of an array</th>
  122. </tr>
  123. <tr>
  124. <td class="bold">Format</td>
  125. <td>array.getSize(array)</td>
  126. </tr>
  127. <tr>
  128. <td class="bold">Examples</td>
  129. <td>array.new(a[3, 2])<br>array.getSize(a)<br>array.getSize(a[0])</td>
  130. </tr>
  131. </table>
  132. <table>
  133. <tr>
  134. <th class="command">read.number</th>
  135. <th class="desc">returns a double parsed from a string</th>
  136. </tr>
  137. <tr>
  138. <td class="bold">Format</td>
  139. <td>read.number(double_string)</td>
  140. </tr>
  141. </table>
  142. <table>
  143. <tr>
  144. <th class="command">wait</th>
  145. <th class="desc">stops a script until an event is received</th>
  146. </tr>
  147. <tr>
  148. <td class="bold">Format</td>
  149. <td>wait()</td>
  150. </tr>
  151. </table>
  152. <table>
  153. <tr>
  154. <th class="command">term</th>
  155. <th class="desc">terminates a script</th>
  156. </tr>
  157. <tr>
  158. <td class="bold">Format</td>
  159. <td>term()</td>
  160. </tr>
  161. </table>
  162. <table>
  163. <tr>
  164. <th class="command">goto</th>
  165. <th class="desc">jumps to a label</th>
  166. </tr>
  167. <tr>
  168. <td class="bold">Format</td>
  169. <td>goto(label)</td>
  170. </tr>
  171. <tr>
  172. <td class="bold">Arguments</td>
  173. <td>the label can either be a string or @label_name, labels can be made by writing @label_name</td>
  174. </tr>
  175. </table>
  176. <table>
  177. <tr>
  178. <th class="command">sgoto</th>
  179. <th class="desc">jumps to a label after a specific amount of scheduler ticks</th>
  180. </tr>
  181. <tr>
  182. <td class="bold">Format</td>
  183. <td>sgoto(ticks, label)</td>
  184. </tr>
  185. <tr>
  186. <td class="bold">Info</td>
  187. <td>all scheduled tasks are instantly executed on server stop</td>
  188. </tr>
  189. </table>
  190. <table>
  191. <tr>
  192. <th class="command">ignoreGoto</th>
  193. <th class="desc">jumps to a label if it exists</th>
  194. </tr>
  195. <tr>
  196. <td class="bold">Format</td>
  197. <td>ignoreGoto(label)</td>
  198. </tr>
  199. <tr>
  200. <td class="bold">Alias</td>
  201. <td>iGoto(label)</td>
  202. </tr>
  203. </table>
  204. <table>
  205. <tr>
  206. <th class="command">gosub</th>
  207. <th class="desc">jumps to a label and remembers the old position</th>
  208. </tr>
  209. <tr>
  210. <td class="bold">Format</td>
  211. <td>gosub(label)</td>
  212. </tr>
  213. </table>
  214. <table>
  215. <tr>
  216. <th class="command">return</th>
  217. <th class="desc">returns to the previous execution position returning nothing or a value</th>
  218. </tr>
  219. <tr>
  220. <td class="bold">Format</td>
  221. <td>return<br>return 5</td>
  222. </tr>
  223. </table>
  224. <table>
  225. <tr>
  226. <th class="command">waitfor</th>
  227. <th class="desc">waits a specific amount of scheduler ticks, no events are received while waiting, sgotos until now won´t be received anymore</th>
  228. </tr>
  229. <tr>
  230. <td class="bold">Format</td>
  231. <td>waitfor(ticks)</td>
  232. </tr>
  233. </table>
  234. <table>
  235. <tr>
  236. <th class="command">assert</th>
  237. <th class="desc">throws an exception of the given bool is false</th>
  238. </tr>
  239. <tr>
  240. <td class="bold">Format</td>
  241. <td>assert(boolean)</td>
  242. </tr>
  243. </table>
  244. <table>
  245. <tr>
  246. <th class="command">isBool</th>
  247. <th class="desc">returns true if a value is a boolean</th>
  248. </tr>
  249. <tr>
  250. <td class="bold">Format</td>
  251. <td>isBool(value)</td>
  252. </tr>
  253. </table>
  254. <table>
  255. <tr>
  256. <th class="command">isDouble</th>
  257. <th class="desc">returns true if a value is a double</th>
  258. </tr>
  259. <tr>
  260. <td class="bold">Format</td>
  261. <td>isDouble(value)</td>
  262. </tr>
  263. </table>
  264. <table>
  265. <tr>
  266. <th class="command">isLong</th>
  267. <th class="desc">returns true if a value is a long</th>
  268. </tr>
  269. <tr>
  270. <td class="bold">Format</td>
  271. <td>isLong(value)</td>
  272. </tr>
  273. </table>
  274. <table>
  275. <tr>
  276. <th class="command">class</th>
  277. <th class="desc">returns the class of any object</th>
  278. </tr>
  279. <tr>
  280. <td class="bold">Format</td>
  281. <td>class(object)</td>
  282. </tr>
  283. </table>
  284. <table>
  285. <tr>
  286. <th class="command">usedMemory</th>
  287. <th class="desc">returns used memory in mega bytes</th>
  288. </tr>
  289. <tr>
  290. <td class="bold">Format</td>
  291. <td>usedmemory()</td>
  292. </tr>
  293. </table>
  294. <table>
  295. <tr>
  296. <th class="command">allocatedMemory</th>
  297. <th class="desc">returns allocated memory in mega bytes</th>
  298. </tr>
  299. <tr>
  300. <td class="bold">Format</td>
  301. <td>allocatedmemory()</td>
  302. </tr>
  303. </table>
  304. <table>
  305. <tr>
  306. <th class="command">iterator</th>
  307. <th class="desc">returns an iterator</th>
  308. </tr>
  309. <tr>
  310. <td class="bold">Format</td>
  311. <td>iterator(collection / list / set)</td>
  312. </tr>
  313. </table>
  314. <table>
  315. <tr>
  316. <th class="command">hasNext</th>
  317. <th class="desc">returns true if the iterator has a next entry</th>
  318. </tr>
  319. <tr>
  320. <td class="bold">Format</td>
  321. <td>hasNext(iterator)</td>
  322. </tr>
  323. </table>
  324. <table>
  325. <tr>
  326. <th class="command">next</th>
  327. <th class="desc">returns the next entry of an iterator</th>
  328. </tr>
  329. <tr>
  330. <td class="bold">Format</td>
  331. <td>next(iterator)</td>
  332. </tr>
  333. </table>
  334. <table>
  335. <tr>
  336. <th class="command">remove</th>
  337. <th class="desc">removes the actual entry of an iterator</th>
  338. </tr>
  339. <tr>
  340. <td class="bold">Format</td>
  341. <td>remove(iterator)</td>
  342. </tr>
  343. </table>
  344. </section>
  345. <section id="Event">
  346. <table>
  347. <tr>
  348. <th class="command">event.load</th>
  349. <th class="desc">loads an event, a script does not receive non loaded events</th>
  350. </tr>
  351. <tr>
  352. <td class="bold">Format</td>
  353. <td>event.load(event_name_string)</td>
  354. </tr>
  355. </table>
  356. <table>
  357. <tr>
  358. <th class="command">event.unload</th>
  359. <th class="desc">unloads an event</th>
  360. </tr>
  361. <tr>
  362. <td class="bold">Format</td>
  363. <td>event.unload(event_name_string)</td>
  364. </tr>
  365. </table>
  366. <table>
  367. <tr>
  368. <th class="command">event.isloaded</th>
  369. <th class="desc">returns true if the given event is loaded</th>
  370. </tr>
  371. <tr>
  372. <td class="bold">Format</td>
  373. <td>event.isloaded(event_name_string)</td>
  374. </tr>
  375. </table>
  376. </section>
  377. <section id="Script">
  378. <table>
  379. <tr>
  380. <th class="command">script.get</th>
  381. <th class="desc">returns a script</th>
  382. </tr>
  383. <tr>
  384. <td class="bold">Format</td>
  385. <td>script.get()<br>script.get(script_name)</td>
  386. </tr>
  387. </table>
  388. <table>
  389. <tr>
  390. <th class="command">script.getId</th>
  391. <th class="desc">returns the id of a script</th>
  392. </tr>
  393. <tr>
  394. <td class="bold">Format</td>
  395. <td>script.getId(script)</td>
  396. </tr>
  397. </table>
  398. <table>
  399. <tr>
  400. <th class="command">script.getFromId</th>
  401. <th class="desc">returns the script with this id</th>
  402. </tr>
  403. <tr>
  404. <td class="bold">Format</td>
  405. <td>script.getFromId(script_id)</td>
  406. </tr>
  407. </table>
  408. <table>
  409. <tr>
  410. <th class="command">script.getAll</th>
  411. <th class="desc">returns a list with all active scripts with this name</th>
  412. </tr>
  413. <tr>
  414. <td class="bold">Format</td>
  415. <td>script.getAll(script_name)</td>
  416. </tr>
  417. </table>
  418. <table>
  419. <tr>
  420. <th class="command">script.term</th>
  421. <th class="desc">terminates a script</th>
  422. </tr>
  423. <tr>
  424. <td class="bold">Format</td>
  425. <td>script.term(script)</td>
  426. </tr>
  427. </table>
  428. <table>
  429. <tr>
  430. <th class="command">script.getVar</th>
  431. <th class="desc">returns the value from a var from script</th>
  432. </tr>
  433. <tr>
  434. <td class="bold">Format</td>
  435. <td>script.getVar(script, var_name)</td>
  436. </tr>
  437. </table>
  438. <table>
  439. <tr>
  440. <th class="command">script.setVar</th>
  441. <th class="desc">sets the value from a var from script</th>
  442. </tr>
  443. <tr>
  444. <td class="bold">Format</td>
  445. <td>script.setVar(script, var_name, value)</td>
  446. </tr>
  447. </table>
  448. </section>
  449. <section id="ScriptVar">
  450. <table>
  451. <tr>
  452. <th class="command">getScriptVar</th>
  453. <th class="desc">returns the value from a scriptvar (scriptvars are script-across)</th>
  454. </tr>
  455. <tr>
  456. <td class="bold">Format</td>
  457. <td>getScriptVar(String varname)</td>
  458. </tr>
  459. </table>
  460. <table>
  461. <tr>
  462. <th class="command">setScriptVar</th>
  463. <th class="desc">sets the value from a scriptvar (scriptvars are script-across)</th>
  464. </tr>
  465. <tr>
  466. <td class="bold">Format</td>
  467. <td>setScriptVar(String varname, value)</td>
  468. </tr>
  469. </table>
  470. <table>
  471. <tr>
  472. <th class="command">delScriptVar</th>
  473. <th class="desc">deletes a scriptvar</th>
  474. </tr>
  475. <tr>
  476. <td class="bold">Format</td>
  477. <td>delScriptVar(String varname)</td>
  478. </tr>
  479. </table>
  480. <table>
  481. <tr>
  482. <th class="command">clearScriptVars</th>
  483. <th class="desc">clears all scriptvars</th>
  484. </tr>
  485. <tr>
  486. <td class="bold">Format</td>
  487. <td>clearScriptVars()</td>
  488. </tr>
  489. </table>
  490. </section>
  491. <section id="Bit-Operations">
  492. <table>
  493. <tr>
  494. <th class="command">bit.set</th>
  495. <th class="desc">returns a value, where a single bit is set to 1</th>
  496. </tr>
  497. <tr>
  498. <td class="bold">Format</td>
  499. <td>bit.set(value, bit_index)</td>
  500. </tr>
  501. <tr>
  502. <td class="bold">Arguments</td>
  503. <td>bit_index should be from 0 to 31</td>
  504. </tr>
  505. </table>
  506. <table>
  507. <tr>
  508. <th class="command">bit.unset</th>
  509. <th class="desc">returns a value, where a single bit is set to 0</th>
  510. </tr>
  511. <tr>
  512. <td class="bold">Format</td>
  513. <td>bit.unset(value, bit_index)</td>
  514. </tr>
  515. <tr>
  516. <td class="bold">Arguments</td>
  517. <td>bit_index should be from 0 to 31</td>
  518. </tr>
  519. </table>
  520. <table>
  521. <tr>
  522. <th class="command">bit.get</th>
  523. <th class="desc">returns a single bit as boolean</th>
  524. </tr>
  525. <tr>
  526. <td class="bold">Format</td>
  527. <td>bit.get(value, bit_index)</td>
  528. </tr>
  529. <tr>
  530. <td class="bold">Arguments</td>
  531. <td>bit_index should be from 0 to 31</td>
  532. </tr>
  533. <tr>
  534. <td class="bold">Returns</td>
  535. <td>true or false depending on the bit</td>
  536. </tr>
  537. </table>
  538. </section>
  539. <section id="Math">
  540. <table>
  541. <tr>
  542. <th class="command">math.min</th>
  543. <th class="desc">returns the lower value</th>
  544. </tr>
  545. <tr>
  546. <td class="bold">Format</td>
  547. <td>math.min(value1, value2)</td>
  548. </tr>
  549. </table>
  550. <table>
  551. <tr>
  552. <th class="command">math.max</th>
  553. <th class="desc">returns the higher value</th>
  554. </tr>
  555. <tr>
  556. <td class="bold">Format</td>
  557. <td>math.max(value1, value2)</td>
  558. </tr>
  559. </table>
  560. <table>
  561. <tr>
  562. <th class="command">math.abs</th>
  563. <th class="desc">returns the absolute value of a value</th>
  564. </tr>
  565. <tr>
  566. <td class="bold">Format</td>
  567. <td>math.abs(value)</td>
  568. </tr>
  569. </table>
  570. <table>
  571. <tr>
  572. <th class="command">math.pow</th>
  573. <th class="desc">returns a value to the power of another</th>
  574. </tr>
  575. <tr>
  576. <td class="bold">Format</td>
  577. <td>math.pow(value, power)</td>
  578. </tr>
  579. </table>
  580. <table>
  581. <tr>
  582. <th class="command">math.root</th>
  583. <th class="desc">returns the given root of a value</th>
  584. </tr>
  585. <tr>
  586. <td class="bold">Format</td>
  587. <td>math.root(value, root)</td>
  588. </tr>
  589. </table>
  590. <table>
  591. <tr>
  592. <th class="command">math.sqrt</th>
  593. <th class="desc">returns the square root a value</th>
  594. </tr>
  595. <tr>
  596. <td class="bold">Format</td>
  597. <td>math.sqrt(value)</td>
  598. </tr>
  599. </table>
  600. <table>
  601. <tr>
  602. <th class="command">math.hypot</th>
  603. <th class="desc">returns sqrt(x&sup2; + y&sup2;)</th>
  604. </tr>
  605. <tr>
  606. <td class="bold">Format</td>
  607. <td>math.hypot(x, y)</td>
  608. </tr>
  609. </table>
  610. <table>
  611. <tr>
  612. <th class="command">math.sin</th>
  613. <th class="desc">returns the sine of a value</th>
  614. </tr>
  615. <tr>
  616. <td class="bold">Format</td>
  617. <td>math.sin(value)</td>
  618. </tr>
  619. </table>
  620. <table>
  621. <tr>
  622. <th class="command">math.cos</th>
  623. <th class="desc">returns the cosine of a value</th>
  624. </tr>
  625. <tr>
  626. <td class="bold">Format</td>
  627. <td>math.cos(value)</td>
  628. </tr>
  629. </table>
  630. <table>
  631. <tr>
  632. <th class="command">math.tan</th>
  633. <th class="desc">returns the tangent of a value</th>
  634. </tr>
  635. <tr>
  636. <td class="bold">Format</td>
  637. <td>math.tan(value)</td>
  638. </tr>
  639. </table>
  640. <table>
  641. <tr>
  642. <th class="command">math.asin</th>
  643. <th class="desc">returns the arcsine of a value</th>
  644. </tr>
  645. <tr>
  646. <td class="bold">Format</td>
  647. <td>math.asin(value)</td>
  648. </tr>
  649. </table>
  650. <table>
  651. <tr>
  652. <th class="command">math.acos</th>
  653. <th class="desc">returns the arccosine of a value</th>
  654. </tr>
  655. <tr>
  656. <td class="bold">Format</td>
  657. <td>math.acos(value)</td>
  658. </tr>
  659. </table>
  660. <table>
  661. <tr>
  662. <th class="command">math.atan</th>
  663. <th class="desc">returns the arctangent of a value</th>
  664. </tr>
  665. <tr>
  666. <td class="bold">Format</td>
  667. <td>math.atan(value)</td>
  668. </tr>
  669. </table>
  670. <table>
  671. <tr>
  672. <th class="command">math.e</th>
  673. <th class="desc">returns Euler's number</th>
  674. </tr>
  675. <tr>
  676. <td class="bold">Format</td>
  677. <td>math.e()</td>
  678. </tr>
  679. </table>
  680. <table>
  681. <tr>
  682. <th class="command">math.pi</th>
  683. <th class="desc">returns pi</th>
  684. </tr>
  685. <tr>
  686. <td class="bold">Format</td>
  687. <td>math.pi()</td>
  688. </tr>
  689. </table>
  690. <table>
  691. <tr>
  692. <th class="command">math.ln</th>
  693. <th class="desc">returns the natural logarithm of a value</th>
  694. </tr>
  695. <tr>
  696. <td class="bold">Format</td>
  697. <td>math.ln(value)</td>
  698. </tr>
  699. </table>
  700. <table>
  701. <tr>
  702. <th class="command">math.log</th>
  703. <th class="desc">returns the decadic logarithm of a value</th>
  704. </tr>
  705. <tr>
  706. <td class="bold">Format</td>
  707. <td>math.log(value)</td>
  708. </tr>
  709. </table>
  710. <table>
  711. <tr>
  712. <th class="command">math.random</th>
  713. <th class="desc">returns a random natural number between both values including both borders</th>
  714. </tr>
  715. <tr>
  716. <td class="bold">Format</td>
  717. <td>math.random(from, to)</td>
  718. </tr>
  719. </table>
  720. <table>
  721. <tr>
  722. <th class="command">math.round</th>
  723. <th class="desc">returns a value rounded</th>
  724. </tr>
  725. <tr>
  726. <td class="bold">Format</td>
  727. <td>math.round(value)</td>
  728. </tr>
  729. </table>
  730. <table>
  731. <tr>
  732. <th class="command">math.roundUp</th>
  733. <th class="desc">returns a value rounded up</th>
  734. </tr>
  735. <tr>
  736. <td class="bold">Format</td>
  737. <td>math.roundUp(value)</td>
  738. </tr>
  739. </table>
  740. <table>
  741. <tr>
  742. <th class="command">math.roundDown</th>
  743. <th class="desc">returns a value rounded down</th>
  744. </tr>
  745. <tr>
  746. <td class="bold">Format</td>
  747. <td>math.roundDown(value)</td>
  748. </tr>
  749. </table>
  750. <table>
  751. <tr>
  752. <th class="command">math.roundComma</th>
  753. <th class="desc">returns a value rounded to a specific number of decimals</th>
  754. </tr>
  755. <tr>
  756. <td class="bold">Format</td>
  757. <td>math.roundComma(value, number_of_dezimals)</td>
  758. </tr>
  759. </table>
  760. </section>
  761. <section id="List">
  762. <table>
  763. <tr>
  764. <th class="command">list.new</th>
  765. <th class="desc">returns a new list</th>
  766. </tr>
  767. <tr>
  768. <td class="bold">Format</td>
  769. <td>list.new()</td>
  770. </tr>
  771. </table>
  772. <table>
  773. <tr>
  774. <th class="command">list.exists</th>
  775. <th class="desc">returns true if the given value is a list</th>
  776. </tr>
  777. <tr>
  778. <td class="bold">Format</td>
  779. <td>list.exists(value)</td>
  780. </tr>
  781. </table>
  782. <table>
  783. <tr>
  784. <th class="command">list.add</th>
  785. <th class="desc">adds an element to a list</th>
  786. </tr>
  787. <tr>
  788. <td class="bold">Format</td>
  789. <td>list.add(list, element)</td>
  790. </tr>
  791. </table>
  792. <table>
  793. <tr>
  794. <th class="command">list.addAll</th>
  795. <th class="desc">adds all given elements to the list</th>
  796. </tr>
  797. <tr>
  798. <td class="bold">Format</td>
  799. <td>list.addAll(List, element, ...)</td>
  800. </tr>
  801. </table>
  802. <table>
  803. <tr>
  804. <th class="command">list.remove</th>
  805. <th class="desc">removes an element from a list and returns true on success</th>
  806. </tr>
  807. <tr>
  808. <td class="bold">Format</td>
  809. <td>list.remove(list, element)</td>
  810. </tr>
  811. </table>
  812. <table>
  813. <tr>
  814. <th class="command">list.removeIndex</th>
  815. <th class="desc">removes an element from a list at the given index and returns true on success</th>
  816. </tr>
  817. <tr>
  818. <td class="bold">Format</td>
  819. <td>list.removeIndex(list, index)</td>
  820. </tr>
  821. </table>
  822. <table>
  823. <tr>
  824. <th class="command">list.contains</th>
  825. <th class="desc">returns true if a list contains a given element</th>
  826. </tr>
  827. <tr>
  828. <td class="bold">Format</td>
  829. <td>list.contains(list, element)</td>
  830. </tr>
  831. </table>
  832. <table>
  833. <tr>
  834. <th class="command">list.getSize</th>
  835. <th class="desc">returns the size of a list</th>
  836. </tr>
  837. <tr>
  838. <td class="bold">Format</td>
  839. <td>list.getSize(list)</td>
  840. </tr>
  841. </table>
  842. <table>
  843. <tr>
  844. <th class="command">list.getIndex</th>
  845. <th class="desc">returns the element at a given index of a list</th>
  846. </tr>
  847. <tr>
  848. <td class="bold">Format</td>
  849. <td>list.getIndex(list, index)</td>
  850. </tr>
  851. <tr>
  852. <td class="bold">Alias</td>
  853. <td>list.get(list, index)</td>
  854. </tr>
  855. </table>
  856. <table>
  857. <tr>
  858. <th class="command">list.setIndex</th>
  859. <th class="desc">sets the element at a given index of a list and returns the old element</th>
  860. </tr>
  861. <tr>
  862. <td class="bold">Format</td>
  863. <td>list.setIndex(list, index, element)</td>
  864. </tr>
  865. </table>
  866. <table>
  867. <tr>
  868. <th class="command">list.getIndexOf</th>
  869. <th class="desc">returns the index of a given element in a list or -1 if the list does not contain the element</th>
  870. </tr>
  871. <tr>
  872. <td class="bold">Format</td>
  873. <td>list.getIndexOf(list, element)</td>
  874. </tr>
  875. </table>
  876. <table>
  877. <tr>
  878. <th class="command">list.clear</th>
  879. <th class="desc">removes all elements of a list</th>
  880. </tr>
  881. <tr>
  882. <td class="bold">Format</td>
  883. <td>list.clear(list)</td>
  884. </tr>
  885. </table>
  886. <table>
  887. <tr>
  888. <th class="command">list.sort</th>
  889. <th class="desc">sorts a list</th>
  890. </tr>
  891. <tr>
  892. <td class="bold">Format</td>
  893. <td>list.sort(list)</td>
  894. </tr>
  895. </table>
  896. <table>
  897. <tr>
  898. <th class="command">list.reverse</th>
  899. <th class="desc">reverses the order of a list</th>
  900. </tr>
  901. <tr>
  902. <td class="bold">Format</td>
  903. <td>list.reverse(list)</td>
  904. </tr>
  905. </table>
  906. <table>
  907. <tr>
  908. <th class="command">list.shuffle</th>
  909. <th class="desc">shuffles a list</th>
  910. </tr>
  911. <tr>
  912. <td class="bold">Format</td>
  913. <td>list.shuffle(list)</td>
  914. </tr>
  915. </table>
  916. <table>
  917. <tr>
  918. <th class="command">list.iterator (deprecated)</th>
  919. <th class="desc">returns the iterator of a list</th>
  920. </tr>
  921. <tr>
  922. <td class="bold">Format</td>
  923. <td>list.iterator(list)</td>
  924. </tr>
  925. </table>
  926. </section>
  927. <section id="Map">
  928. <table>
  929. <tr>
  930. <th class="command">map.new</th>
  931. <th class="desc">returns a new map</th>
  932. </tr>
  933. <tr>
  934. <td class="bold">Format</td>
  935. <td>map.new()</td>
  936. </tr>
  937. </table>
  938. <table>
  939. <tr>
  940. <th class="command">map.exists</th>
  941. <th class="desc">returns true if the given value is a map</th>
  942. </tr>
  943. <tr>
  944. <td class="bold">Format</td>
  945. <td>map.exists(value)</td>
  946. </tr>
  947. </table>
  948. <table>
  949. <tr>
  950. <th class="command">map.add</th>
  951. <th class="desc">adds a key value pair to a map and returns the old value</th>
  952. </tr>
  953. <tr>
  954. <td class="bold">Format</td>
  955. <td>map.add(map, key, value)</td>
  956. </tr>
  957. </table>
  958. <table>
  959. <tr>
  960. <th class="command">map.remove</th>
  961. <th class="desc">removes a key from a map and returns the old value</th>
  962. </tr>
  963. <tr>
  964. <td class="bold">Format</td>
  965. <td>map.remove(map, key)</td>
  966. </tr>
  967. </table>
  968. <table>
  969. <tr>
  970. <th class="command">map.contains</th>
  971. <th class="desc">returns true if a map contains a given key</th>
  972. </tr>
  973. <tr>
  974. <td class="bold">Format</td>
  975. <td>map.contains(map, key)</td>
  976. </tr>
  977. </table>
  978. <table>
  979. <tr>
  980. <th class="command">map.getSize</th>
  981. <th class="desc">returns the size of a map</th>
  982. </tr>
  983. <tr>
  984. <td class="bold">Format</td>
  985. <td>map.getSize(map)</td>
  986. </tr>
  987. </table>
  988. <table>
  989. <tr>
  990. <th class="command">map.get</th>
  991. <th class="desc">returns the value associated with a key in a map</th>
  992. </tr>
  993. <tr>
  994. <td class="bold">Format</td>
  995. <td>map.get(map, key)</td>
  996. </tr>
  997. </table>
  998. <table>
  999. <tr>
  1000. <th class="command">map.getOrDefault</th>
  1001. <th class="desc">returns the value associated with a key in a map or the default value if the key is not present</th>
  1002. </tr>
  1003. <tr>
  1004. <td class="bold">Format</td>
  1005. <td>map.getOrDefault(map, key, default)</td>
  1006. </tr>
  1007. </table>
  1008. <table>
  1009. <tr>
  1010. <th class="command">map.iterator</th>
  1011. <th class="desc">returns the iterator of a map</th>
  1012. </tr>
  1013. <tr>
  1014. <td class="bold">Format</td>
  1015. <td>map.iterator(map)</td>
  1016. </tr>
  1017. </table>
  1018. <table>
  1019. <tr>
  1020. <th class="command">map.getKey</th>
  1021. <th class="desc">returns the key</th>
  1022. </tr>
  1023. <tr>
  1024. <td class="bold">Format</td>
  1025. <td>map.getKey(iterator_element)</td>
  1026. </tr>
  1027. </table>
  1028. <table>
  1029. <tr>
  1030. <th class="command">map.getValue</th>
  1031. <th class="desc">returns the value</th>
  1032. </tr>
  1033. <tr>
  1034. <td class="bold">Format</td>
  1035. <td>map.getValue(iterator_element)</td>
  1036. </tr>
  1037. </table>
  1038. <table>
  1039. <tr>
  1040. <th class="command">map.setValue</th>
  1041. <th class="desc">sets the newValue and returns the oldValue</th>
  1042. </tr>
  1043. <tr>
  1044. <td class="bold">Format</td>
  1045. <td>map.setValue(iterator_element, newValue)</td>
  1046. </tr>
  1047. </table>
  1048. <table>
  1049. <tr>
  1050. <th class="command">map.clear</th>
  1051. <th class="desc">removes all key value pairs from a map</th>
  1052. </tr>
  1053. <tr>
  1054. <td class="bold">Format</td>
  1055. <td>map.clear(map)</td>
  1056. </tr>
  1057. </table>
  1058. </section>
  1059. <section id="Set">
  1060. <table>
  1061. <tr>
  1062. <th class="command">set.new</th>
  1063. <th class="desc">returns a new set</th>
  1064. </tr>
  1065. <tr>
  1066. <td class="bold">Format</td>
  1067. <td>set.new()</td>
  1068. </tr>
  1069. </table>
  1070. <table>
  1071. <tr>
  1072. <th class="command">set.exists</th>
  1073. <th class="desc">returns true if the given value is a set</th>
  1074. </tr>
  1075. <tr>
  1076. <td class="bold">Format</td>
  1077. <td>set.exists(value)</td>
  1078. </tr>
  1079. </table>
  1080. <table>
  1081. <tr>
  1082. <th class="command">set.add</th>
  1083. <th class="desc">adds a key to a set and returns true if the key was added</th>
  1084. </tr>
  1085. <tr>
  1086. <td class="bold">Format</td>
  1087. <td>set.add(set, key)</td>
  1088. </tr>
  1089. </table>
  1090. <table>
  1091. <tr>
  1092. <th class="command">set.addAll</th>
  1093. <th class="desc">adds all given keys to a set</th>
  1094. </tr>
  1095. <tr>
  1096. <td class="bold">Format</td>
  1097. <td>set.addAll(set, key, ...)</td>
  1098. </tr>
  1099. </table>
  1100. <table>
  1101. <tr>
  1102. <th class="command">set.remove</th>
  1103. <th class="desc">removes a key from a set and returns true if the key was removed</th>
  1104. </tr>
  1105. <tr>
  1106. <td class="bold">Format</td>
  1107. <td>set.remove(set, key)</td>
  1108. </tr>
  1109. </table>
  1110. <table>
  1111. <tr>
  1112. <th class="command">set.contains</th>
  1113. <th class="desc">returns true if a set contains a given key</th>
  1114. </tr>
  1115. <tr>
  1116. <td class="bold">Format</td>
  1117. <td>set.contains(set, key)</td>
  1118. </tr>
  1119. </table>
  1120. <table>
  1121. <tr>
  1122. <th class="command">set.getSize</th>
  1123. <th class="desc">returns the size of a set</th>
  1124. </tr>
  1125. <tr>
  1126. <td class="bold">Format</td>
  1127. <td>set.getSize(set)</td>
  1128. </tr>
  1129. </table>
  1130. <table>
  1131. <tr>
  1132. <th class="command">set.clear</th>
  1133. <th class="desc">removes all keys from a map</th>
  1134. </tr>
  1135. <tr>
  1136. <td class="bold">Format</td>
  1137. <td>set.clear(set)</td>
  1138. </tr>
  1139. </table>
  1140. <table>
  1141. <tr>
  1142. <th class="command">set.toList</th>
  1143. <th class="desc">returns all keys of a set as list</th>
  1144. </tr>
  1145. <tr>
  1146. <td class="bold">Format</td>
  1147. <td>set.toList(set)</td>
  1148. </tr>
  1149. </table>
  1150. <table>
  1151. <tr>
  1152. <th class="command">set.iterator (deprecated)</th>
  1153. <th class="desc">returns the iterator of a set</th>
  1154. </tr>
  1155. <tr>
  1156. <td class="bold">Format</td>
  1157. <td>set.iterator(set)</td>
  1158. </tr>
  1159. </table>
  1160. </section>
  1161. <section id="Time">
  1162. <table>
  1163. <tr>
  1164. <th class="command">time.new</th>
  1165. <th class="desc">returns a calendar of a given time in milliseconds</th>
  1166. </tr>
  1167. <tr>
  1168. <td class="bold">Format</td>
  1169. <td>time.new(time_millis)</td>
  1170. </tr>
  1171. <tr>
  1172. <td class="bold">Arguments</td>
  1173. <td>time_millis are milliseconds passed since 01.01.1970</td>
  1174. </tr>
  1175. </table>
  1176. <table>
  1177. <tr>
  1178. <th class="command">time.getMillis</th>
  1179. <th class="desc">returns the current millisecond time</th>
  1180. </tr>
  1181. <tr>
  1182. <td class="bold">Format</td>
  1183. <td>time.getMillis()</td>
  1184. </tr>
  1185. </table>
  1186. <table>
  1187. <tr>
  1188. <th class="command">time.getNanos</th>
  1189. <th class="desc">returns the current nanosecond time of the whole engine</th>
  1190. </tr>
  1191. <tr>
  1192. <td class="bold">Format</td>
  1193. <td>time.getNanos()</td>
  1194. </tr>
  1195. </table>
  1196. <table>
  1197. <tr>
  1198. <th class="command">time.from</th>
  1199. <th class="desc">returns the millisecond time of a calendar</th>
  1200. </tr>
  1201. <tr>
  1202. <td class="bold">Format</td>
  1203. <td>time.from(calendar)</td>
  1204. </tr>
  1205. </table>
  1206. <table>
  1207. <tr>
  1208. <th class="command">time.nextDay</th>
  1209. <th class="desc">sets the time of a calendar to the beginning of the next day</th>
  1210. </tr>
  1211. <tr>
  1212. <td class="bold">Format</td>
  1213. <td>time.nextDay(calendar)</td>
  1214. </tr>
  1215. </table>
  1216. <table>
  1217. <tr>
  1218. <th class="command">time.getYear</th>
  1219. <th class="desc">returns the year of a calendar</th>
  1220. </tr>
  1221. <tr>
  1222. <td class="bold">Format</td>
  1223. <td>time.getYear(calendar)</td>
  1224. </tr>
  1225. </table>
  1226. <table>
  1227. <tr>
  1228. <th class="command">time.getMonth</th>
  1229. <th class="desc">returns the month of a calendar</th>
  1230. </tr>
  1231. <tr>
  1232. <td class="bold">Format</td>
  1233. <td>time.getMonth(calendar)</td>
  1234. </tr>
  1235. </table>
  1236. <table>
  1237. <tr>
  1238. <th class="command">time.getDay</th>
  1239. <th class="desc">returns the day of a calendar</th>
  1240. </tr>
  1241. <tr>
  1242. <td class="bold">Format</td>
  1243. <td>time.getDay(calendar)</td>
  1244. </tr>
  1245. </table>
  1246. <table>
  1247. <tr>
  1248. <th class="command">time.getHour</th>
  1249. <th class="desc">returns the hours of a calendar</th>
  1250. </tr>
  1251. <tr>
  1252. <td class="bold">Format</td>
  1253. <td>time.getHour(calendar)</td>
  1254. </tr>
  1255. </table>
  1256. <table>
  1257. <tr>
  1258. <th class="command">time.getMinute</th>
  1259. <th class="desc">returns the minutes of a calendar</th>
  1260. </tr>
  1261. <tr>
  1262. <td class="bold">Format</td>
  1263. <td>time.getMinute(calendar)</td>
  1264. </tr>
  1265. </table>
  1266. <table>
  1267. <tr>
  1268. <th class="command">time.getSecond</th>
  1269. <th class="desc">returns the seconds of a calendar</th>
  1270. </tr>
  1271. <tr>
  1272. <td class="bold">Format</td>
  1273. <td>time.getSecond(calendar)</td>
  1274. </tr>
  1275. </table>
  1276. </section>
  1277. <section id="Text">
  1278. <table>
  1279. <tr>
  1280. <th class="command">text</th>
  1281. <th class="desc">returns any object as string</th>
  1282. </tr>
  1283. <tr>
  1284. <td class="bold">Format</td>
  1285. <td>text(object)</td>
  1286. </tr>
  1287. </table>
  1288. <table>
  1289. <tr>
  1290. <th class="command">text.number</th>
  1291. <th class="desc">returns a number as string without unnecessary .0</th>
  1292. </tr>
  1293. <tr>
  1294. <td class="bold">Format</td>
  1295. <td>text.number(number)</td>
  1296. </tr>
  1297. </table>
  1298. <table>
  1299. <tr>
  1300. <th class="command">text.class</th>
  1301. <th class="desc">returns the class of any object</th>
  1302. </tr>
  1303. <tr>
  1304. <td class="bold">Format</td>
  1305. <td>text.class(objekt)</td>
  1306. </tr>
  1307. </table>
  1308. <table>
  1309. <tr>
  1310. <th class="command">text.toUpperCase</th>
  1311. <th class="desc">returns a string capitalized</th>
  1312. </tr>
  1313. <tr>
  1314. <td class="bold">Format</td>
  1315. <td>text.toUpperCase(string)</td>
  1316. </tr>
  1317. </table>
  1318. <table>
  1319. <tr>
  1320. <th class="command">text.toLowerCase</th>
  1321. <th class="desc">returns a string decapitalized</th>
  1322. </tr>
  1323. <tr>
  1324. <td class="bold">Format</td>
  1325. <td>text.toLowerCase(string)</td>
  1326. </tr>
  1327. </table>
  1328. <table>
  1329. <tr>
  1330. <th class="command">text.split</th>
  1331. <th class="desc">returns a string splitted by a given separator as list </th>
  1332. </tr>
  1333. <tr>
  1334. <td class="bold">Format</td>
  1335. <td>text.split(separator, string)</td>
  1336. </tr>
  1337. </table>
  1338. <table>
  1339. <tr>
  1340. <th class="command">text.concatList</th>
  1341. <th class="desc">returns one string which connects all elements of a sub list with a connector</th>
  1342. </tr>
  1343. <tr>
  1344. <td class="bold">Format</td>
  1345. <td>text.concatList(list, connector, fromIndex, toIndex)</td>
  1346. </tr>
  1347. </table>
  1348. <table>
  1349. <tr>
  1350. <th class="command">text.concat</th>
  1351. <th class="desc">returns one string which connects all given arguments</th>
  1352. </tr>
  1353. <tr>
  1354. <td class="bold">Format</td>
  1355. <td>text.concat(arg, ...)</td>
  1356. </tr>
  1357. </table>
  1358. <table>
  1359. <tr>
  1360. <th class="command">text.concatSpace</th>
  1361. <th class="desc">returns one string which connects all given arguments with a space</th>
  1362. </tr>
  1363. <tr>
  1364. <td class="bold">Format</td>
  1365. <td>text.concatSpace(arg, ...)</td>
  1366. </tr>
  1367. </table>
  1368. <table>
  1369. <tr>
  1370. <th class="command">text.startsWith</th>
  1371. <th class="desc">returns true if a string starts with another starting from a given index</th>
  1372. </tr>
  1373. <tr>
  1374. <td class="bold">Format</td>
  1375. <td>text.startsWith(string, search_text, start_index)</td>
  1376. </tr>
  1377. </table>
  1378. <table>
  1379. <tr>
  1380. <th class="command">text.endsWith</th>
  1381. <th class="desc">returns true if a string ends with another</th>
  1382. </tr>
  1383. <tr>
  1384. <td class="bold">Format</td>
  1385. <td>text.endsWith(string, search_text)</td>
  1386. </tr>
  1387. </table>
  1388. <table>
  1389. <tr>
  1390. <th class="command">text.contains</th>
  1391. <th class="desc">returns true if a string is in another</th>
  1392. </tr>
  1393. <tr>
  1394. <td class="bold">Format</td>
  1395. <td>text.contains(string, search_text)</td>
  1396. </tr>
  1397. </table>
  1398. <table>
  1399. <tr>
  1400. <th class="command">text.indexOf</th>
  1401. <th class="desc">returns the index of string in another starting from a given index or -1 if not found</th>
  1402. </tr>
  1403. <tr>
  1404. <td class="bold">Format</td>
  1405. <td>text.indexOf(string, search_text, start_index)</td>
  1406. </tr>
  1407. </table>
  1408. <table>
  1409. <tr>
  1410. <th class="command">text.lastIndexOf</th>
  1411. <th class="desc">returns the last index of a string in another starting from a given index or -1 if not found</th>
  1412. </tr>
  1413. <tr>
  1414. <td class="bold">Format</td>
  1415. <td>text.lastIndexOf(string, search_text, start_index)</td>
  1416. </tr>
  1417. </table>
  1418. <table>
  1419. <tr>
  1420. <th class="command">text.replace</th>
  1421. <th class="desc">replaces all occurrences of a given string in another with a given string</th>
  1422. </tr>
  1423. <tr>
  1424. <td class="bold">Format</td>
  1425. <td>text.replace(string, search_text, swap_text)</td>
  1426. </tr>
  1427. </table>
  1428. <table>
  1429. <tr>
  1430. <th class="command">text.trim</th>
  1431. <th class="desc">returns a string without leading and trailing whitespaces</th>
  1432. </tr>
  1433. <tr>
  1434. <td class="bold">Format</td>
  1435. <td>text.trim(string)</td>
  1436. </tr>
  1437. </table>
  1438. <table>
  1439. <tr>
  1440. <th class="command">text.matches</th>
  1441. <th class="desc">returns true if a string matches a regex</th>
  1442. </tr>
  1443. <tr>
  1444. <td class="bold">Format</td>
  1445. <td>text.matches(string, regex)</td>
  1446. </tr>
  1447. </table>
  1448. <table>
  1449. <tr>
  1450. <th class="command">text.charcode</th>
  1451. <th class="desc">returns the character code of an index in a string</th>
  1452. </tr>
  1453. <tr>
  1454. <td class="bold">Format</td>
  1455. <td>text.charcode(string, index)</td>
  1456. </tr>
  1457. </table>
  1458. <table>
  1459. <tr>
  1460. <th class="command">text.fromCode</th>
  1461. <th class="desc">returns a string from a character code</th>
  1462. </tr>
  1463. <tr>
  1464. <td class="bold">Format</td>
  1465. <td>text.fromCode(character_code)</td>
  1466. </tr>
  1467. </table>
  1468. <table>
  1469. <tr>
  1470. <th class="command">text.length</th>
  1471. <th class="desc">returns the length of a string</th>
  1472. </tr>
  1473. <tr>
  1474. <td class="bold">Format</td>
  1475. <td>text.length(string)</td>
  1476. </tr>
  1477. </table>
  1478. <table>
  1479. <tr>
  1480. <th class="command">text.subString</th>
  1481. <th class="desc">returns a sub string starting at one index and ending at another exclusively</th>
  1482. </tr>
  1483. <tr>
  1484. <td class="bold">Format</td>
  1485. <td>text.subString(string, from_index, to_index)</td>
  1486. </tr>
  1487. </table>
  1488. <table>
  1489. <tr>
  1490. <th class="command">text.onlyLetters</th>
  1491. <th class="desc">returns true if a text has only letters</th>
  1492. </tr>
  1493. <tr>
  1494. <td class="bold">Format</td>
  1495. <td>text.onlyLetters(String)</td>
  1496. </tr>
  1497. </table>
  1498. <table>
  1499. <tr>
  1500. <th class="command">text.convert</th>
  1501. <th class="desc">converts strings into objects</th>
  1502. </tr>
  1503. <tr>
  1504. <td class="bold">Format</td>
  1505. <td>text.convert(any object)</td>
  1506. </tr>
  1507. <tr>
  1508. <td class="bold">Info</td>
  1509. <td>
  1510. null -> null<br>
  1511. "null" -> null<br>
  1512. "true" -> true<br>
  1513. "false" -> false<br>
  1514. "\"" -> \"<br>
  1515. "1" -> 1.0<br>
  1516. "string" -> "string"
  1517. </td>
  1518. </tr>
  1519. </table>
  1520. </section>
  1521. <section id="File">
  1522. <table>
  1523. <tr>
  1524. <th class="command">file.new</th>
  1525. <th class="desc">returns a new file</th>
  1526. </tr>
  1527. <tr>
  1528. <td class="bold">Format</td>
  1529. <td>file.new(path)</td>
  1530. </tr>
  1531. </table>
  1532. <table>
  1533. <tr>
  1534. <th class="command">file.exists</th>
  1535. <th class="desc">returns true if a file exists</th>
  1536. </tr>
  1537. <tr>
  1538. <td class="bold">Format</td>
  1539. <td>file.exists(file)</td>
  1540. </tr>
  1541. </table>
  1542. <table>
  1543. <tr>
  1544. <th class="command">file.delete</th>
  1545. <th class="desc">removes a file and returns true on success</th>
  1546. </tr>
  1547. <tr>
  1548. <td class="bold">Format</td>
  1549. <td>file.delete(file)</td>
  1550. </tr>
  1551. </table>
  1552. <table>
  1553. <tr>
  1554. <th class="command">file.getName</th>
  1555. <th class="desc">returns the name of a file</th>
  1556. </tr>
  1557. <tr>
  1558. <td class="bold">Format</td>
  1559. <td>file.getName(file)</td>
  1560. </tr>
  1561. </table>
  1562. <table>
  1563. <tr>
  1564. <th class="command">file.getList</th>
  1565. <th class="desc">returns all files in a folder as list</th>
  1566. </tr>
  1567. <tr>
  1568. <td class="bold">Format</td>
  1569. <td>file.getList(file)</td>
  1570. </tr>
  1571. </table>
  1572. <table>
  1573. <tr>
  1574. <th class="command">file.read</th>
  1575. <th class="desc">returns all lines in a file as list</th>
  1576. </tr>
  1577. <tr>
  1578. <td class="bold">Format</td>
  1579. <td>file.read(file)</td>
  1580. </tr>
  1581. </table>
  1582. <table>
  1583. <tr>
  1584. <th class="command">file.write</th>
  1585. <th class="desc">writes all entries of a list to a file</th>
  1586. </tr>
  1587. <tr>
  1588. <td class="bold">Format</td>
  1589. <td>file.write(file, list)</td>
  1590. </tr>
  1591. </table>
  1592. <table>
  1593. <tr>
  1594. <th class="command">file.isFile</th>
  1595. <th class="desc">returns true if a file is a file</th>
  1596. </tr>
  1597. <tr>
  1598. <td class="bold">Format</td>
  1599. <td>file.isFile(file)</td>
  1600. </tr>
  1601. </table>
  1602. <table>
  1603. <tr>
  1604. <th class="command">file.isDirectory</th>
  1605. <th class="desc">returns true if a file is a directory</th>
  1606. </tr>
  1607. <tr>
  1608. <td class="bold">Format</td>
  1609. <td>file.isDirectory(file)</td>
  1610. </tr>
  1611. </table>
  1612. </section>
  1613. <section id="Config">
  1614. <table>
  1615. <tr>
  1616. <th class="command">config.new</th>
  1617. <th class="desc">returns a new config</th>
  1618. </tr>
  1619. <tr>
  1620. <td class="bold">Format</td>
  1621. <td>config.new(path, name)</td>
  1622. </tr>
  1623. </table>
  1624. <table>
  1625. <tr>
  1626. <th class="command">config.exists</th>
  1627. <th class="desc">returns true if the config exists</th>
  1628. </tr>
  1629. <tr>
  1630. <td class="bold">Format</td>
  1631. <td>config.exists(config)</td>
  1632. </tr>
  1633. </table>
  1634. <table>
  1635. <tr>
  1636. <th class="command">config.save</th>
  1637. <th class="desc">saves a config and returns true on success</th>
  1638. </tr>
  1639. <tr>
  1640. <td class="bold">Format</td>
  1641. <td>config.save(config)</td>
  1642. </tr>
  1643. </table>
  1644. <table>
  1645. <tr>
  1646. <th class="command">config.load</th>
  1647. <th class="desc">loads a config</th>
  1648. </tr>
  1649. <tr>
  1650. <td class="bold">Format</td>
  1651. <td>config.load(config)</td>
  1652. </tr>
  1653. </table>
  1654. <table>
  1655. <tr>
  1656. <th class="command">config.delete</th>
  1657. <th class="desc">removes a config</th>
  1658. </tr>
  1659. <tr>
  1660. <td class="bold">Format</td>
  1661. <td>config.delete(config)</td>
  1662. </tr>
  1663. </table>
  1664. <table>
  1665. <tr>
  1666. <th class="command">config.set</th>
  1667. <th class="desc">sets a key value pair in a config</th>
  1668. </tr>
  1669. <tr>
  1670. <td class="bold">Format</td>
  1671. <td>config.set(config, key, value)</td>
  1672. </tr>
  1673. </table>
  1674. <table>
  1675. <tr>
  1676. <th class="command">config.getBool</th>
  1677. <th class="desc">returns a boolean or a default value from a config key</th>
  1678. </tr>
  1679. <tr>
  1680. <td class="bold">Format</td>
  1681. <td>config.getBool(config, key, default)</td>
  1682. </tr>
  1683. </table>
  1684. <table>
  1685. <tr>
  1686. <th class="command">config.getDouble</th>
  1687. <th class="desc">returns a double or a default value from a config key</th>
  1688. </tr>
  1689. <tr>
  1690. <td class="bold">Format</td>
  1691. <td>config.getDouble(config, key, default)</td>
  1692. </tr>
  1693. </table>
  1694. <table>
  1695. <tr>
  1696. <th class="command">config.getString</th>
  1697. <th class="desc">returns a string or a default value from a config key</th>
  1698. </tr>
  1699. <tr>
  1700. <td class="bold">Format</td>
  1701. <td>config.getString(config, key, default)</td>
  1702. </tr>
  1703. </table>
  1704. </section>
  1705. <section id="Matrix">
  1706. <table>
  1707. <tr>
  1708. <th class="command">matrix.new</th>
  1709. <th class="desc">returns a new matrix</th>
  1710. </tr>
  1711. <tr>
  1712. <td class="bold">Format</td>
  1713. <td>matrix.new()</td>
  1714. </tr>
  1715. </table>
  1716. <table>
  1717. <tr>
  1718. <th class="command">matrix.newRotationX</th>
  1719. <th class="desc">returns a new rotated matrix</th>
  1720. </tr>
  1721. <tr>
  1722. <td class="bold">Format</td>
  1723. <td>matrix.newRotationX(angle in radiant)</td>
  1724. </tr>
  1725. </table>
  1726. <table>
  1727. <tr>
  1728. <th class="command">matrix.newRotationY</th>
  1729. <th class="desc">returns a new rotated matrix</th>
  1730. </tr>
  1731. <tr>
  1732. <td class="bold">Format</td>
  1733. <td>matrix.newRotationY(angle in radiant)</td>
  1734. </tr>
  1735. </table>
  1736. <table>
  1737. <tr>
  1738. <th class="command">matrix.mul</th>
  1739. <th class="desc">multiplies two matrices</th>
  1740. </tr>
  1741. <tr>
  1742. <td class="bold">Format</td>
  1743. <td>matrix.mul(matrix1, matrix2)</td>
  1744. </tr>
  1745. </table>
  1746. <table>
  1747. <tr>
  1748. <th class="command">matrix.mulVector</th>
  1749. <th class="desc">multiplies a matrix and a vector</th>
  1750. </tr>
  1751. <tr>
  1752. <td class="bold">Format</td>
  1753. <td>matrix.mulVector(matrix, vector)</td>
  1754. </tr>
  1755. </table>
  1756. </section>
  1757. <section id="Vector">
  1758. <table>
  1759. <tr>
  1760. <th class="command">vector.new</th>
  1761. <th class="desc">returns a new vector</th>
  1762. </tr>
  1763. <tr>
  1764. <td class="bold">Format</td>
  1765. <td>vector.new(x, y, z)</td>
  1766. </tr>
  1767. </table>
  1768. <table>
  1769. <tr>
  1770. <th class="command">vector.set</th>
  1771. <th class="desc">modifies a vector</th>
  1772. </tr>
  1773. <tr>
  1774. <td class="bold">Format</td>
  1775. <td>vector.set(vector, x, y, z)</td>
  1776. </tr>
  1777. </table>
  1778. <table>
  1779. <tr>
  1780. <th class="command">vector.getX</th>
  1781. <th class="desc">returns x from a vector</th>
  1782. </tr>
  1783. <tr>
  1784. <td class="bold">Format</td>
  1785. <td>vector.getX(vector)</td>
  1786. </tr>
  1787. </table>
  1788. <table>
  1789. <tr>
  1790. <th class="command">vector.getY</th>
  1791. <th class="desc">returns y from a vector</th>
  1792. </tr>
  1793. <tr>
  1794. <td class="bold">Format</td>
  1795. <td>vector.getY(vector)</td>
  1796. </tr>
  1797. </table>
  1798. <table>
  1799. <tr>
  1800. <th class="command">vector.getZ</th>
  1801. <th class="desc">returns z from a vector</th>
  1802. </tr>
  1803. <tr>
  1804. <td class="bold">Format</td>
  1805. <td>vector.getZ(vector)</td>
  1806. </tr>
  1807. </table>
  1808. </section>