NT Script: Difference between revisions

Jump to navigation Jump to search
7 bytes removed ,  09:07, 16 June 2023
m
Added additional info to the "time" function description
m (signature)
m (Added additional info to the "time" function description)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Needs revision
|reason=The pre-made scripts at the very bottom of this page are out of date and do not function.|user=[[User:Identification|Identification]] ([[User talk:Identification|talk]]) 21:33, 19 June 2019 (CEST)}}
The NT Scripting Language(NT Script, or NTSL) is a new piece of technology being pushed by NT Tech Department to standardize programming and communication of all Nanotrasen-grade electronic devices. Its syntax is a mixture of PHP, C++, and JavaScript. Most implementations of NT Script are not object-oriented and do not allow the definition of classes, instead, rely on ROBUST(tm) memory management system to store entities in a dynamic data tree. NT Script does allow the in-line definition of functions, however.
The NT Scripting Language(NT Script, or NTSL) is a new piece of technology being pushed by NT Tech Department to standardize programming and communication of all Nanotrasen-grade electronic devices. Its syntax is a mixture of PHP, C++, and JavaScript. Most implementations of NT Script are not object-oriented and do not allow the definition of classes, instead, rely on ROBUST(tm) memory management system to store entities in a dynamic data tree. NT Script does allow the in-line definition of functions, however.


Line 314: Line 311:
| bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" |
| bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" |
|-
|-
| time() || number || Returns the real time of the server in a number. You can then use this to see how much time has passed since the code has last been run via mem().
| time() || number || Returns the real time of the server as a number. Time is in deciseconds, to convert into seconds divide by 10. You can then use this to see how much time has passed since the code has last been run via mem().
|-
|-
| bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" |
| bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" |
Line 321: Line 318:
|}
|}


=== Prefab Variables ===
===Prefab Variables===


  '''PI''' = 3.141592653;
  '''PI''' = 3.141592653;
Line 340: Line 337:
  '''channels.security''' = 1359
  '''channels.security''' = 1359
  '''channels.supply''' = 1347
  '''channels.supply''' = 1347
'''channels.service''' = 1349
   
   
  '''languages.human''' = 1
  '''languages.human''' = 1
  '''languages.monkey''' = 2
  '''languages.monkey''' = 2
  '''languages.alien''' = 4
  '''languages.robot''' = 4
  '''languages.robot''' = 8
  '''languages.polysmorph''' = 8
  '''languages.slime''' = 16
  '''languages.draconic''' = 16
  '''languages.drone''' = 32
  '''languages.beachtongue''' = 32
    
    
  '''filter_types.robot''' = "robot"
  '''filter_types.robot''' = "robot"
Line 377: Line 375:
  sig.language // the language of the signal. Can be any of HUMAN, MONKEY, ALIEN, ROBOT, SLIME or DRONE. Or a combination of them
  sig.language // the language of the signal. Can be any of HUMAN, MONKEY, ALIEN, ROBOT, SLIME or DRONE. Or a combination of them
  sig.filters  // The voice filter of the signal. Includes bolding, italics, as well as silicon and wacky fonts. '''These must be given as a list!'''
  sig.filters  // The voice filter of the signal. Includes bolding, italics, as well as silicon and wacky fonts. '''These must be given as a list!'''
sig.pass    // Whether the signal will be broadcasted. Is a boolean, set to 0 to stop the signal from passing.
  sig.say      // The verb used in a radio messages ending in "."
  sig.say      // The verb used in a radio messages ending in "."
  sig.ask   // The verb used in messages ending in "?". Example: COMMON SERVER asks, "Why?"
  sig.ask   // The verb used in messages ending in "?". Example: COMMON SERVER asks, "Why?"

Navigation menu