Anonymous

Module:Skills/Agility: Difference between revisions

From Melvor Idle
Added grouping by agility slot
(Added Pillar table)
(Added grouping by agility slot)
Line 15: Line 15:
   result = '{| class="wikitable sortable stickyHeader"'
   result = '{| class="wikitable sortable stickyHeader"'
   result = result..'\r\n|- class="headerRow-0"'
   result = result..'\r\n|- class="headerRow-0"'
   result = result..'\r\n!Name!!Slot!!XP!!GP!!Time'--!!XP/s!!GP/s
   result = result..'\r\n!Slot!!Name!!XP!!GP!!Time'--!!XP/s!!GP/s
   result = result..'!!Bonuses!!Requirements!!Cost'
   result = result..'!!Bonuses!!Requirements!!Cost'
  local catLog = {}


   for i, obst in Shared.skpairs(SkillData.Agility.Obstacles) do
   for i, obst in Shared.skpairs(SkillData.Agility.Obstacles) do
     result = result..'\r\n|-'
     result = result..'\r\n|-'
     result = result..'\r\n|'..obst.name..'||'..(obst.category + 1)
     result = result..'\r\n|'
    if catLog[obst.category] == nil then
      local rowspan = obst.category > 1 and 5 or 3
      result = result..'rowspan="'..rowspan..'"|'..(obst.category + 1)..'||'
      catLog[obst.category] = true
    end
    result = result..obst.name


     --After the name & category, doing XP, GP, Time, and rates
     --After the name & category, doing XP, GP, Time, and rates