OSRS Plugin API
    Preparing search index...

    Class HighlightConfig

    Represents the configuration settings that a highlight channel has. All highlights routed through a channel have these configuration settings applied to them. This can be applied onto channels and taken from channels. This has an overloaded equality operator, when all fields are equal then two Configs are considered equal.

    Index

    Constructors

    Properties

    alwaysOnTop: boolean

    Causes all highlight effects to bypass other models that might block it.

    disableModel: boolean

    Disables the model within the outline, currently does nothing.

    enableModelFill: boolean

    Whether the model will be tinted the highlight colour based on the alpha value given by highlightColour.

    enableModelOutline: boolean

    Whether an outline around a model should be part of the highlight.

    enableTileFill: boolean

    Whether the tile the the highlighted entity is on will be tinted the highlight colour based on the alpha value given by highlightColour.

    enableTileOutline: boolean

    Whether an outline around the tile that the highlighted entity is on should be part of the highlight.

    highlightColour: osrs.Colour

    The colour of the highlight itself. The alpha value represents the transparency of the model/tile fill.

    ignoreRebuild: boolean

    Whether highlights through this channel are a factor for a region being rebuilt.

    outlineWidth: number

    The width of the outline around the tile outline and the model outline if they are enabled.

    saveToFile: boolean

    When highlights are sent through a channel with this flag enabled, they are saved such that they are persistent on logout/quit. When removing a highlight through a channel with this flag enabled, the highlight is removed from the save. Does not save the configuration itself. NOTE: This does not affect channels under the NPC category as NPC highlights cannot be saved.

    showInsideEdges: boolean

    If a entity takes up multiple grids, this variable decides if the edges between those grids are shown.

    snapToGrid: boolean

    If false, the tile the highlighted entity is on is a tile is directly under the entity and moves with it. If true, the tile the entity is on is the world tile the entity is at.

    swOnly: boolean

    SW is an acronym of South West only. If this is true then regardless how big a highlighted entity is it will only highlight the most south west tile.

    Methods

    • This returns true if any flags that allow for visible highlight effects are enabled.

      Returns boolean

      -- The default configuration is enabled due to enableModelOutline being true on default
      local config = osrs.ClientOp.HighlightConfig.new()

      -- prints: Config Enabled: true
      osr.print("Config Enabled: " .. tostring(config:isEnabled()))
    • Converts the HighlightConfig into string form. This overrides base tostring(HighlightConfig)

      Returns string

      local config = osrs.ClientOp.HighlightConfig.new()

      -- prints: HighlightConfig [highlightColor RGBA | R: 255, G: 255, B: 255, A: 255][outlineWidth: 1 ][enableModelOutline: 1][enableTileOutline: 0][enableModelFill: 0][enableTileFill: 0][alwaysOnTop: 0][showInsideEdges: 0][saveToFile: 0][snapToGrid: 0][swOnly: 0][ignoreRebuild: 0][disableModel: 0]
      osrs.print(tostring(config))
    • Constructs a default configuration that only gives a solid white outline.

      Returns HighlightConfig

    • Constructs a default configuration that only provides an outline of a model.

      Parameters

      • outlineColour: osrs.Colour

        The colour to apply onto the outline.

      • outlineWidth: number

        The width of the outline around the model.

      Returns HighlightConfig