OSRS Plugin API
    Preparing search index...

    Function addShape

    • Add a shape to the draw-list. It will return as close as possible to its original sort position. Newly created shapes are in the draw-list by default, so this is mainly used for showing and hiding shapes.

      Parameters

      Returns boolean

      a boolean indicating if the shape was successfully added. Returns false if the shape has already been added.

      --create shape but don't immediately render it. 
      local myShape = osrs.Shape.new(osrs.Shape.PrimitiveType.RECTANGLE, false)

      --now set the shape to render.
      if (osrs.Graphics.addShape(myShape)) then
      osrs.print("Shape is now rendering")
      end

      -- Attempt to duplicate the call.
      if (not osrs.Graphics.addShape(myShape)) then
      osrs.print("Shape is already rendered")
      end