4,951
edits
Falterfire (talk | contribs) (Fixed bones drop source lists) |
Falterfire (talk | contribs) (Chests now properly reflect the place they drop from) |
||
Line 2: | Line 2: | ||
local MonsterData = mw.loadData('Module:Monsters/data') | local MonsterData = mw.loadData('Module:Monsters/data') | ||
local AreaData = mw.loadData('Module:CombatAreas/data') | |||
local ItemData = mw.loadData('Module:Items/data') | local ItemData = mw.loadData('Module:Items/data') | ||
local SkillData = mw.loadData('Module:Skills/data') | local SkillData = mw.loadData('Module:Skills/data') | ||
Line 470: | Line 471: | ||
--First up: Can we kill somebody and take theirs? | --First up: Can we kill somebody and take theirs? | ||
local killStr = '' | local killStr = '' | ||
local dungeonStr = '' | |||
local count1 = 0 | local count1 = 0 | ||
for i, monster in Shared.skpairs(MonsterData.Monsters) do | for i, monster in Shared.skpairs(MonsterData.Monsters) do | ||
Line 483: | Line 485: | ||
end | end | ||
if isDrop then | if isDrop then | ||
if monster.isBoss then | |||
--If this is a boss then we actually are completing dungeons for this and need to figure out which one | |||
for j, dung in pairs(AreaData.dungeons) do | |||
if Shared.contains(dung.monsters, monster.id) then | |||
if string.len(dungeonStr) > 0 then | |||
dungeonStr = dungeonStr..',' | |||
else | |||
dungeonStr = 'Completing: ' | |||
end | |||
dungeonStr = dungeonStr..Icons.Icon({dung.name, type="dungeon", notext=true}) | |||
break | |||
end | |||
end | |||
else | else | ||
killStr = killStr..'Killing: '..Icons.Icon({monster.name, type="monster", notext="true"}) | count1 = count1 + 1 | ||
if string.len(killStr) > 0 then | |||
killStr = killStr..',' | |||
if count1 % 3 == 1 and count1 > 1 then killStr = killStr..'<br/>' end | |||
killStr = killStr..Icons.Icon({monster.name, type="monster", notext="true"}) | |||
else | |||
killStr = killStr..'Killing: '..Icons.Icon({monster.name, type="monster", notext="true"}) | |||
end | |||
end | end | ||
end | end | ||
end | end | ||
if string.len(dungeonStr) > 0 then table.insert(lineArray, dungeonStr) end | |||
if string.len(killStr) > 0 then table.insert(lineArray, killStr) end | if string.len(killStr) > 0 then table.insert(lineArray, killStr) end | ||