Advanced Commands



In this section we are going to describe the advanced commands that are in the Advanced tab of the command panel. Some of these commands deals with variables, timers and stored data values. Let's explain what are these things.



A variable is somewhat like a container that can contain a value during the execution of your script. So you can use a variable to store a value retrieved by one command, and use later that value in another command. Each variable has a name which can be used to reference that variable. Every time you use a new variable you have to name it. You can name it whatever you like, but there are a little restrictions: Each variable has to have a unique name among all variables in one script. Additionally, the name of a variable must consist only of letters, numbers, the underscore character '_', and it cannot contain any spaces. And the name of a variable must begin with a letter.



When you get used to variables you will find they're very useful, and they can drastically make much more powerful scripts (In the sense of what a script is capable to do). For example, you can ask the slave to input a value and store it in a variable. Then you may use that value in other commands such as wait or show message, or do different things depending on the value the slave gave.



In every command that requires you to specify a numeric value (for example the number of seconds to wait in a 'show message' or 'wait' command, or the probability percentage in a 'if a chance is met') you can introduce the name of a variable instead of a numeric value, and the value contained in that variable will be used. Logically you first need to set the variable with a numeric value before using it in other commands. If you want to use a variable containing a text value instead of introducing a text in a command that requires you to specify a text value (such as the message in the 'show message' command or the image path in the 'show an image outside scripts resources' command) you can too, but this time instead of introducing the name of the variable simply, you must use the special character $[myVariable], replacing myVariable with the name of your variable.



Variables are great but their values will not be saved between different executions of your script. If you need to store a value and be able to retrieve it later in other executions of the script, you will need to save it in the SexScripts data registry as a stored data value. You have commands to save and retrieve data values from and into variables. These values will be stored to a data file, so they can be retrieved between different executions of your script, inclusive if the slave has shutdown his/her computer in the meanwhile.



With variables and data values in your hand, you can dare to perform very serious scripts. But in ssScriptMaker there is also another kind of objects named timers that can be very useful sometimes. You can think of timers as some kind of stopwatches, that you can set to start a count from 0, and some time later stop them and retrieve the count of seconds that have elapsed since they were set to when they were stopped. You can use timers to measure how many time some actions take. For example, you can set a timer and ask the slave to perform some chores. When the slave has finished his/her chores, stop the timer and then you can check how long it take the slave to perform the chores, punishing him/her hard if he/she delayed a lot, punishing him/her lightly if he/she delayed only a bit, and rewarding him/her if he/she did the chores in time.



Set variable

This command will set the specified variable to contain a specified value. You can specify that value in one of many different ways:

-You can specify the value directly introducing it, indicating if it is a numeric value, decimal value (numeric value with possibly a period and decimal part), or a text value.

-You can specify the value as the value contained in another variable.

-You can specify the value as the result of a groovy expression.

-You can ask the slave to input some value. In this case you shall introduce the message that will be shown to the slave to indicate him/her to introduce the value, and you must indicate what kind of value you wish to ask for (numeric, decimal or text value).

-You can specify the value as a random value between a minimum and maximum limits.

-Or you can retrieve the value from a stored data value, indicating the name of the data value and the type of the value (numeric, decimal or text value).



Handle Variables

This command will calculate an operation (add, subtract, multiply, divide, mod) between two variables, or between a variable and a value, or between two values; and store the result of the operation into a specified variable. The variables or values used in the operation must be numeric or decimal. The only exception is that you can calculate an addition of two variables containing text values and the result will be the concatenation of the two text values. (eg, “Hello ” + “world” = “Hello world”).



Execute some code

This command will execute a piece of groovy code given. To see more about groovy please take a look at the third part of this documentation.



Execute a function

This command will execute a specified function from your script function list. You must introduce the values or variables you want to pass as the function's parameters separated by commas. You can additionally if you want, and the function is actually returning some value, store the value returned by the function into a variable. To see more about functions and groovy please take a look at the third part of this documentation.



Execute a script

This command will terminate the execution of your script an execute another specified script. The script to execute must be in the scripts/ directory of SexScripts or a sub-directory in it. You have to introduce the name of that script without the .groovy extension. To easily retrieve the name of the script you can use the browse button.



Ask slave for a pic

This command asks the slave to select an image file from his computer and saves a copy of this file in the images resource folder of your script. Usually you're going to save the image with its original name and store its path into a variable, so you can refer to that image later, (to show it, for example). But you can also save the image with a specified name. If you select this last option, make sure the name you provide has the same extension of the image file the slave's going to select. You can also save the image outside the script's resources. In this last case you also have to provide the path where to save the image as, relative to the images/ folder in SexScripts. If you select this last option make sure that the extension you save the image as is the same of the file provided by the slave.



Set timer

This command will set a specified timer, setting its second count to zero and starting it to count seconds.



Stop timer

This command will stop a specified timer from counting any seconds more. The timer you specify must have been set before you stop it.



Put timer value into a variable

This command will store the seconds count of a specified timer into a specified variable. The specified timer do not need to be stopped to perform this command, but it have to be set before.



Save data value

This command will save a specified value into the data registry file of SexScripts as a stored data value. You can specify the value as numeric value, decimal value (numeric value with possibly a period and a decimal part), text value, or as the value contained in a specified variable. This value will be stored between different executions of your script, and you can recover it later loading it into a variable with the 'Set Variable' command indicating to set the variable with that stored data value.



Set time in a variable

This command will store the value of a current time unit into a specified variable. You can indicate the time unit by selecting it from a droplist with the following possible values: year, month, day, hour, minute, second, millisecond.



Add Item

This command will add a specified toy or piece of clothing to the slave's toy or clothes list. You can select that item from a droplist, indicating if it is a toy or a piece of clothing.



Exit SexScripts

This command will exit not only from the script, it also closes the SexScripts program the slave is running the script in. Take care with this command, it could give your script unexpected behavior to the slave. If you only want to terminate your script execution, it's enough with the 'Exit Script' command.



return to the contents page