All known PLC commands in No Time
For more information and documentation see the bottom of this page
No Time exclusive commands
breakline
not sure if this is exclusive or name differently, but this just breaks a line so you continue on the next lineconnectgate
Connect to a nearby dimension gatedialgate
dial a location or time after connecting to a dimension gategatereadings
get info of the destination from the space coregettemperature
get temperature as read from the plc temperature meterreboot
Reboot the systemtimegraph
shows the time graph and tells where you can travel to -openperipheral
Open the gate/door connected to a terminal -closeperipheral
Close the gate/door connected to a terminalsetlabel
Set the label of a HVD chipcreate "name of file"
creates a new file in the current directorydelete "name of file"
deletes a file with the gives name in the current directorycountlines "filename"
Count lines in a filereadfile("name of file", linenumber)
Read a file. you can print it like so:print readfile("textfile", countlines("textfile")) // prints the last line of the file
you will need to use a forloop to get all the lines in the filewritelines "name of file", linenumber, "line to write"
Write lines to a file
writelines "test.eee", 1, "testing"
-
readline
Creates an input field and reads that line from the console. Useful for getting user input. You can also store it in a variablename = readline
-
readkey
Reads the key that is pressed by the user in the console. You can also store it in a variablename = readkey
for both
readkey
andreadline
, you might need to addwait 0
before this function to not skip the input find "name of file"
tries to find a file in the current directory with the gives name. if it cannot find it, it will return -1 (useful for checking in if statements).copy "filename"
copies the file?paste
pastes the file? The pasted file will act the same way as the original file. So i can rename the original and the copy will update toorename "filename", "new filename"
i think this renames a file in the current directoryedit "filename"
Opens the file in the editorcantravel(yearnumber)
a miniature version of timegraph, usefull for conditional commands. To know if you can travel to a certain yearslice("variable", characternumber)
removes a character from a variable.slice("string", 1) // Will be tring
will remove the first character from the stringgetyear
returns the current yeargetmonth
returns the current monthgetday
returns the current daygethour
returns the current hourgetminute
returns the current minutecococrab
enables cococrab modecocohelp
lists all the functions that cococrab supportscocotransport X, Y, Z
teleports the player to the given coordinates. without parameters returns the current coordinatescococarport X, Y, Z
teleports the car to the given coordinates. without parameters returns the current coordinatescocosave
save game (not working properly)cocoheal
heal the playercocorads
remove radiationcocogive [itemnumber]
spawns the item with given item numbercocoitems
prints all items with their numberscocoheataway
remove the car heat and cool it downcocorepair
repair the carcocodollar [amount]
give player given amount of dollarscocoshilling [amount]
give player given amount of shillingscocotime 1-360
set the daytime to given numbercocoday [amount]
set day to given numbercocomonth [amount]
set month to given numbercocoyear [amount]
set year to given numbercocospeed [double/float]
set the time speed to a given number. default is 4.0. NOTE: this does not change game speed, just how fast days will gococoquest [questnumber], "state"
sets the state of given quest number. state can be one of the following: accepted, finished, invisble, inactivecocoqprogress [questnumber] [progress]
sets the progress of given quest numbercocogetq
get current quest progresscocogetqname
get current quest nameopenperipheral
open the gate doors from panels
Miniscript commands
Numbers
All numbers are stored in full-precision format. Numbers also represent true (1) and false (0). Operators:
+
,-
,*
,/
standard math%
modulus (remainder)^
powerand
,or
,not
logical operators==
,!=
,>
,>=
,<
,<=
comparisons
Strings
Text is stored in strings of Unicode characters. Write strings by surrounding them with quotes. If you need to include a quotation mark in the string, type it twice.
print "OK, ""Bob""."
Operators:
+
string concatenation-
string subtraction (chop)*
,/
replication, division==
equals to!=
is not>
is bigger than>=
is bigger and equal to<
is smaller than<=
is smaller and equal to[i]
get character i
text = "Hello"
print text[0] //prints H
[i:j]
get slice from i up to j
text = "Hello"
print text[0:2] //prints He
Conditional commands
if condition then
do something
else if othercondition then // else if
do something else
else // else
do something else
end if
Conditionals are checks to see if a certain condition is true or false. If the condition is true, the code inside the if statement will run. If the condition is false, the code inside the else statement will run. example:
if 1 == 1 then
print("1 is equal to 1")
else if 1 == 2 then
print("1 is equal to 2")
else
print("1 is not equal to 1 or 2")
end if
you can use and, or and not in if statements loops:
if i == 1 or i == 2 then
print i //prints 1 and 2
end if
Function commands
functionname = function
print "do something"
end function
functionname //will print: do something
Create a function with function(), including parameters with optional default values. Assign the result to a variable. Invoke by using that variable. Use @ to reference a function without invoking.
triple = function(n=1)
return n*3
end function
print triple // 3
print triple(5) // 15
f = @triple
print f(5) // also 15
Return
return
Return something. This is useful for functions, as it will return a value. Or nothing will be returned if nothing is specified.
test = function
variable = 2
return variable // returns 2
end function
Loops
for loop
for numbervariable in range(startnumber, end number, (optional) steps to take)
print number
end for
A for loop loops through numbers in a range. The first number is the start number, the second number is the end number, and the third number is the steps to take. The steps to take is optional, and if not specified, it will default to 1. example:
for i in range(1, 10)
print i //prints numbers 1 through 10
end for
while loop
while condition
print "do something"
end while
A while loop loops through code while a condition is true. The condition is checked before the code is run, and if the condition is false, the code will not run. example:
canwrite = true
while canwrite
print "writing"
canwrite = false // set it back to false so it doesn't loop forever
end while
Break
break
Break out of a loop.
Continue
continue
Continue a loop from another point.
Math commands
Addition
print 1 + 1 //prints 2
Subtraction
print 1 - 1 //prints 0
Multiplication
print 2 * 2 //prints 4
Division
print 4 / 2 //prints 2
Variable commands
Set variable
variable = value
Print variable
print variable
Add to variable
variable += value
Subtract from variable
variable -= value
Multiply variable
variable *= value
Divide variable
variable /= value
Other commands
print "text"
Prints text to the console.
Wait
wait 1
Waits for a certain amount of seconds.
Random
print random(1, 10)
Prints a random number between 1 and 10.
Yield
yield
Yields the script. This is useful for scripts that take a long time to run, as it will allow other scripts to run. Not useful for scripts in No Time.
Exit
exit
Comment
//comment
A comment is a line of code that is not run. It is useful for explaining what a line of code does.
Sign
sign(-98) //prints -1
Returns the sign of a number. If the number is positive, it will return 1. If the number is negative, it will return -1. If the number is 0, it will return 0.
Clear
clear
Clears the console.
List
list = [1, 2, 3, 4, 5]
A list is a collection of values. The values can be accessed by their index. The first value is index 0, the second value is index 1, and so on. you can access it like this:
list[3] //prints 4 because 1 = index 0, 2 = index 1, 3 = index 2, 4 = index 3
Map
map = {"key": "value", "key2": "value2"}
A map is a collection of key value pairs. The values can be accessed by their key. you can access it like this:
map["key"] //prints value because key is the key for value
Both a list and a map are accessable with forloops:
list = [1, 2, 3, 4, 5]
for i in range(1, 5)
print list[i] //prints values 1 through 5
end for
map = {"key": "value", "key2": "value2"}
for key in map
print map[key] //prints value and value2
end for
you can also put functions in a list or a map by doing:
list = [@function, @function2]
for i in range(1, 2)
list[i]() //runs the function
end for
working example:
day = function
print getday()
end function
month = function
print getmonth()
end function
year = function
print getyear()
end function
functions = [@day, @month, @year]
for i in functions.indexes
functions[i]() // prints current day, month, year
breakline
end for
Go to another directory
cd "Item_HoloDisk(Clone)" // the directory of the HVD chips when they are inside the PLC
cd "FPSController" // the directory of the PLC
For more info check out:
- the website
- the documentation
- the editor which also has some tutorials and information