Anonymous

Module:CombatAreas: Difference between revisions

From Melvor Idle
Added getAreaByID
(Moving getAreaMonsterTable out to Module:Monsters to prevent loop)
(Added getAreaByID)
Line 42: Line 42:


   return nil
   return nil
end
function p.getAreaByID(type, id)
  if type == 'dungeon' then type = 'dungeons'
  elseif type == 'combat' then type = 'combatAreas'
  elseif type == 'slayer' then type = 'slayerAreas' end
  return processArea(AreaData[type][id + 1], id + 1)
end
end