OSRS Plugin API
    Preparing search index...

    Class LocType

    Class representing the base data of a LOC type.

    Implements

    Index

    Methods

    • Returns whether or not the location prevents the player from making ranged attacks over it.

      Returns number

    • Returns whether or not the location prevents the player from moving through it.

      Returns boolean

    • Returns whether the location is able to be actively selected, such as if it supports ops or if hovering will reveal its name.

      Returns boolean

      the flag of if the location is active or not

      local loc = osrs.Engine.Decoders.decodeLocType(osrs.gamevals.loctypes.multicannon_base) if(loc:getActive()) then osrs.print("This location is active.") else osrs.print("This location is not active.") end

    • Returns the type of the current entity.

      Returns TypecodeEntityType

      enum designating the type of the current entity.

      local loc = osrs.Engine.Decoders.decodeLocType(osrs.gamevals.loctypes.poh_portal_teak_empty)
      if(loc:getEntityType() == osrs.TypecodeEntityType.LOC) then
      osrs.print("Found type LOC")
      end

      local lesserdemon = osrs.Engine.Decoders.decodeNpcType(osrs.gamevals.npctypes.lesser_demon)
      if(lesserdemon:getEntityType() == osrs.TypecodeEntityType.NPC) then
      osrs.print("Found type NPC")
      end
    • Gets the id of the current datatype. Data types will return their type ID, which will match the id in gamevals.

      Returns number

      id of the current entity.

      local loc = osrs.Engine.Decoders.decodeLocType(osrs.gamevals.loctypes.poh_portal_teak_empty)
      if(loc:getEntityType() == osrs.TypecodeEntityType.LOC) then
      osrs.print("Found type LOC")
      end

      local lesserdemon = osrs.Engine.Decoders.decodeNpcType(osrs.gamevals.npctypes.lesser_demon)
      if(lesserdemon:getEntityType() == osrs.TypecodeEntityType.NPC) then
      osrs.print("Found type NPC")
      end
    • Returns the length of the location in map squares.

      Returns number

    • Returns the name of the entity.

      Returns string

      Returns the name of the entity as a string.

      local picked = osrs.Engine.MousePickingHelper.getPickedEntityTypecodes()
      for index, entity in pairs(picked) do
      local var = entity:getEntityTypeData()
      if(var ~= nil) then
      osrs.print(var:getName())
      end
      end
    • Gets a table with the available 5 ops for the location. If there are no op for the given slot, an empty string will be provided.

      Returns OpTable

      table of available ops

      local loc = osrs.Engine.Decoders.decodeLocType(osrs.gamevals.loctypes.multicannon_base)
      for index, op in pairs(loc:getOps()) do
      osrs.print(tostring(index), ", ", op)
      end
    • Returns a table of params for the location, if exists. Otherwise, returns an empty table.

      Returns LocParamTable

      local loc = osrs.Engine.Decoders.decodeLocType(osrs.gamevals.loctypes.poh_portal_teak_empty)
      local torchParams = loc:getParams()
      for key,value in pairs(torchParams) do
      osrs.print("Key: " .. key .. ", Value: " .. value )
      end
    • Applicable to Walls only: how far away from the wall to decor can be placed.

      Returns number

    • Returns the width of location in map squares.

      Returns number