Show / Hide Table of Contents

Class LoliScript

Represents a LoliScript script that can be run line by line.

Inheritance
System.Object
LoliScript
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: RuriLib.LS
Assembly: RuriLib.dll
Syntax
public class LoliScript

Constructors

| Improve this Doc View Source

LoliScript()

Constructs a LoliScript object with an empty script.

Declaration
public LoliScript()
| Improve this Doc View Source

LoliScript(String)

Constructs a LoliScript object with a given script.

Declaration
public LoliScript(string script)
Parameters
Type Name Description
System.String script

The LoliScript script

Properties

| Improve this Doc View Source

CanProceed

Whether the script can proceed the execution or not.

Declaration
public bool CanProceed { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

CurrentBlock

The current block being processed.

Declaration
public string CurrentBlock { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

CurrentLine

The current line being processed.

Declaration
public string CurrentLine { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Script

The actual script as a string containing linebreaks.

Declaration
public string Script { get; set; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

FromBlocks(List<BlockBase>)

Sets the script from a list of blocks.

Declaration
public void FromBlocks(List<BlockBase> blocks)
Parameters
Type Name Description
System.Collections.Generic.List<BlockBase> blocks

The list of blocks which inherit from the BlockBase type

| Improve this Doc View Source

ParseCheckCondition(ref String, BotData)

Parses a condition made of left-hand term, condition type and right-hand term and verifies if it's true.

Declaration
public static bool ParseCheckCondition(ref string cfLine, BotData data)
Parameters
Type Name Description
System.String cfLine

The reference to the line to parse

BotData data

The BotData needed for variable replacement

Returns
Type Description
System.Boolean
| Improve this Doc View Source

Reset()

Resets the line counter so the script can be run again.

Declaration
public void Reset()
| Improve this Doc View Source

ScanFor(String[], Int32, Boolean, String[])

Scans for a given set of identifiers in the script and returns the line index value of the first found.

Declaration
public static int ScanFor(string[] lines, int current, bool downwards, string[] options)
Parameters
Type Name Description
System.String[] lines

The lines of the script

System.Int32 current

The index of the current line

System.Boolean downwards

Whether to scan downwards or upwards

System.String[] options

The target identifiers

Returns
Type Description
System.Int32
| Improve this Doc View Source

TakeStep(BotData)

Executes a line of the script.

Declaration
public void TakeStep(BotData data)
Parameters
Type Name Description
BotData data

The BotData needed for variable replacement

| Improve this Doc View Source

ToBlocks()

Transforms the script into a list of blocks. The blocks that cannot be converted will be created as BlockLSCode blocks.

Declaration
public List<BlockBase> ToBlocks()
Returns
Type Description
System.Collections.Generic.List<BlockBase>
  • Improve this Doc
  • View Source
Back to top Generated by DocFX