-
Notifications
You must be signed in to change notification settings - Fork 0
Commands
For language rules, go to the rules page found here
Command List:
setpre - Sets the prefix for the scripts input.
startsay - Outputs text when program first starts.
say - Outputs text when called on.
newdata - Creates a new data.
startdata - Creates a new data, and then sets the data a value.
setdata - Sets the value of a data that has been created earlier.
command - Creates a text command, which if the user inputs the same exact text, then something happens.
none - When the user types in nothing that matches a command.
if - Creates an if statement, kind of like command.
eif - Makes an else if.
else - Makes an else.
then - Then is used when a special event or an if statement is called.
end - End is used to tell the program to end the then statement, and return the program back to normal.
Sets the prefix for input. Whenever the user types something into the script, it'll always show the prefix first, then whatever the user types.
setpre
test >
Now the script will show test > then the user text. You can use it to show the name of the program, or almost anything else you want it to show.
Startsay is a basic command. It is what the program outputs when it first starts.
startsay
Hello World!
Result Hello World!
Say is different than startsay. Startsay only happens when the program first starts, the say command happens when called on (ex: called in if statement).
say
"Hello Guys!"
Result Hello Guys!
It is important that the line under is in quotes, or else it'll think that you are trying to output data. You can do data, but you'll have to do "Hello" + [dataname] (replace the brackets with the name of the data).
Newdata creates a data. A data is data that the script remembers. If you want to make a new one and then give it a value see startdata To declare a data, say
newdata
[name]
Every time you use this data, you say the name of the to output the stored data. Example is show at say.
Creates a new data and then gives it a value.
startdata
[name]
[value]
Set the value of data created earlier.
Setdata
[name]
[value]
If you want to change the value, you can simply use this command. This only works if the data was made earlier.
Creates a user command. An event happens if the user says the exact same thing. You'll need to say then to tell the program to do the next few lines only when the command is called and then say end.
command
[text or data]
Note: Using this without quotes will use a data, while using with quotes will just use the text given.
When the user says something that doesn't match a (command)[#command].
none
then
say
"You didn't say a command"
end
Result: You didn't say a command, when I didn't say a command.
Creates an if statement. You can do anything like if a data equals 4.
if
[dataname]
==
4
then
Will check if the data is equal to 4 (if you want to see if it equals text, the text needs to be in quotes). Needs to have then and end.
Works like if, but only does it if the if statement isn't true. It can be called endless times.
eif
[dataname]
==
5
then
If all the other if and eif statements don't work, then it'll do this one.
else
then
Used to tell the program that everything between the then and end commands are going to happen only when the special event happens.
then
Used to tell the program that everything between the then and end commands are going to happen only when the special event happens.
end