RiftWorks
Найти
Персональное меню
Вы не представились системе
user-interface-preferences
Персональные инструменты
Обсуждение
Вклад
Создать учётную запись
Войти
Параметры
notifications
Редактирование:
NT Script
(раздел)
associated-pages
Статья
Обсуждение
Просмотры
Читать
Править
Править код
История
Внимание:
Вы не вошли в систему. Ваш IP-адрес будет общедоступен, если вы запишете какие-либо изменения. Если вы
войдёте
или
создадите учётную запись
, её имя будет использоваться вместо IP-адреса, наряду с другими преимуществами.
Анти-спам проверка.
Не
заполняйте это!
== Traffic Control Systems Implementation == The [[Telecommunications]] system is directly tied to the TCS scripting implementation. It comes with the following functions and features. === Realtime signal modification === If the code is set to execute automatically, signals will first execute stored server code. Signal information is stored in the following variables: $source // the source of the signal $content // the content of the signal $freq // the frequency of the signal $pass // determines if the signal will be broadcasted $job // the job (only for radio messages) of the operator $language // the language of the signal. Can be any of HUMAN, MONKEY, ALIEN, ROBOT, SLIME or DRONE. Or a combination of them $filters // The voice filter of the signal. Includes bolding, italics, as well as silicon and wacky fonts. '''These must be given as a vector!''' $say // The verb used in a radio messages ending in "." $ask // The verb used in messages ending in "?". Example: COMMON SERVER asks, "Why?" $exclaim // The verb used in a radio messages ending in "!" Note that having more exclamation points changes it to "$yell". $yell // The verb used in a radio messages ending in "!!" or more exclamation points. By default, these messages are bolded. === Functions === TCS also comes with the following functions (parameters may be ignored for automatic assignment): ==== broadcast() ==== broadcast(message, frequency, source, job) Sends a radio signal to neighboring subspace broadcasters to broadcast with the following parameters. '''message''': The radio message <br>'''frequency''': The frequency to broadcast to <br>'''source''': The name of the broadcaster. If the source name is not in a server-side voice databank (voice analysis is performed every time a person speaks over a channel) the name will appear in UPPERCASE and Italicized to indicate a synthesized voice job <br>'''job''': The job of the orator. Examples: broadcast("Hello world!"); '''defaults''': <br>frequency: 1459 <br>source: the server name <br>job: None broadcast("HELP GRIEFF", 1459, "Burer", "Security Officer"); ==== signal() ==== signal(frequency, code) Sends a signal to the frequency, with the code. This works exactly like a remote signaler. '''frequency''': The frequency to send to. <br>'''code''': The code to attach to the signal. Examples: signal(1359, 25); '''defaults''': <br>frequency: 1459 <br>code: 30 ==== mem() ==== mem(key, value) Variables declared in a script expire after the script has finished executing (duh). The mem function allows you to save persistent information to the server's memory to be retrieved by future executions of the script. Each telecommunications server contains its own separate databank, which is basically a hash table/dictionary, a data structure consisting of a set of key-value pairs. When called with just the key as an argument, mem will return the associated value. When called with two arguments, mem will set the value associated with the key. '''key''': A string used to identify the variable to be saved. <br>'''value''': The information you want to store for future use. Can be any type. Examples: $source = "Jarsh Mellow"; mem($source + "'s Mom"); // returns the value associated with the key "Jarsh Mellow's Mom". Returns null/0 if not found mem($source + "'s Mom", "Lindsay Donk"); // sets the value associated with the key "Jarsh Mellow's Mom" to "Lindsay Donk".
Описание изменений:
Обратите внимание, что все изменения в RiftWorks рассматриваются как выпущенные на условиях лицензии Creative Commons Attribution-NonCommercial-ShareAlike (см.
RiftWorks:Авторские права
). Если вы не хотите, чтобы ваши тексты свободно распространялись и редактировались любым желающим, не помещайте их сюда.
Вы также подтверждаете, что являетесь автором вносимых дополнений или скопировали их из источника в общественном достоянии или под совместимой лицензией.
Не размещайте без разрешения материалы, защищённые авторским правом!
Отменить
Справка по редактированию
(в новом окне)