Модуль:ItemData: различия между версиями

Нет описания правки
Нет описания правки
 
(не показана 221 промежуточная версия этого же участника)
Строка 1: Строка 1:
local p = {}
local p = {}


local lib = require('Module:Feature')
local lib     = require('Module:Feature')


function p.get(frame)
function p.get(frame)
Строка 102: Строка 102:
local get    = require ('Module:ItemData/getter')
local get    = require ('Module:ItemData/getter')
local libHero = require('Module:HeroData')
    local libUnit = require('Module:UnitData')
local item    = args['item'] or args[1]
local item    = args['item'] or args[1]
local loot    = "loot"
local loot    = "loot"
Строка 114: Строка 116:
     if tonumber(args['index']) == k then
     if tonumber(args['index']) == k then
for k2, v2 in ipairs(v) do
for k2, v2 in ipairs(v) do
    divNode
if v[k2][1] == "Альберт" or
    :tag('div')
  v[k2][1] == "Ангмарс" or
    :addClass('loot-item')
  v[k2][1] == "МакКлиф" or
    :wikitext(mw.ustring.format('%s', p.getItemIcon(v[k2][1], "60px", v[k2][2])))
  v[k2][1] == "Сэра, Королева Воров" or
    :done()
  v[k2][1] == "Повелительница мух" or
  v[k2][1] == "Тикола Несла" or
                  v[k2][1] == "Анндралгон Черный" or
  v[k2][1] == "Мехарион" or
                  v[k2][1] == "Владыка Драадор" or
  v[k2][1] == "Кузнечик" or
                  v[k2][1] == "Ледяная Эльга" or
                  v[k2][1] == "Аврора, Ангел Надежды" or
                  v[k2][1] == "Разиэль, Ангел Отчаяния" or
                  v[k2][1] == "Элтор, Ангел Равновесия" or
                  v[k2][1] == "Зевс Громовержец" or
                  v[k2][1] == "Владыка Миктлана" or
                  v[k2][1] == "Инпу" or
                  v[k2][1] == "Арбитр" or
                  v[k2][1] == "Судья" or
                  v[k2][1] == "Пренакс Обманщик" or
                  v[k2][1] == "Коммандор Вед'ахен" or
                  v[k2][1] == "Альммахарет" or
                  v[k2][1] == "Кертхрорааз" or
                  v[k2][1] == "Космический солдат" or
                  v[k2][1] == "Звездный охотник" or
                  v[k2][1] == "Пожиратель душ" or
                  v[k2][1] == "Августин" or
                  v[k2][1] == "Аилред" or
                  v[k2][1] == "Офаниель" or
                  v[k2][1] == "Дидгур" or
                  v[k2][1] == "Воин ягуара" or
                  v[k2][1] == "Уильям Вейн" or
                  v[k2][1] == "Тразк" or
                  v[k2][1] == "Джамис"
then
divNode
    :tag('div')
    :addClass('loot-item')
    :wikitext(mw.ustring.format('%s', libHero.getHeroIcon(v[k2][1], "60px", true)))
    :done()
                elseif v[k2][1] == "Лучники" or
                    v[k2][1] == "Волшебники" or
                    v[k2][1] == "Воины" or
                    v[k2][1] == "Грифоны" or
                    v[k2][1] == "Черные рыцари" or
                    v[k2][1] == "Сторожевая башня пустоты/1"
                then
                    divNode
    :tag('div')
    :addClass('loot-item')
    :wikitext(mw.ustring.format('%s', libUnit.getUnitIcon(v[k2][1], "60px", v[k2][2], true)))
    :done()
else
    divNode
    :tag('div')
    :addClass('loot-item')
    :wikitext(mw.ustring.format('%s', p.getItemIcon(v[k2][1], "60px", v[k2][2], true)))
    :done()
end
    end
    end
end
end
Строка 129: Строка 185:
local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
local libGift    = require('Module:GiftData')
local get        = require ('Module:ItemData/getter')
local get        = require ('Module:ItemData/getter')
local recipe_data = require ('Module:RecipeData/data')
local recipe_data = require ('Module:RecipeData/data')
local loot_data  = require ('Module:ItemData/loot')
local loot_data  = require ('Module:ItemData/loot')
local gifts_data  = require ('Module:GiftData/gifts')
local boss_data  = require ('Module:BossData/data')
local boss_data  = require ('Module:BossData/data')
local item_data  = require ('Module:ItemData/data')
local item_data  = require ('Module:ItemData/data')
local gift_data  = require ('Module:GiftData/data')
local gm_data    = require ('Module:GameModes/data')
local gm_data    = require ('Module:GameModes/data')
local item        = args['item'] or args[1]
local item        = args['item'] or args[1]
Строка 147: Строка 206:
local checkpoint5 = nil
local checkpoint5 = nil
local checkpoint6 = nil
local checkpoint6 = nil
local checkpoint7 = nil
local result    = get["source"](item)
local result    = get["source"](item)
local data      = recipe_data[item]
local data      = recipe_data[item]
if (result ~= "Добыча") then
if (result ~= "Неизвестно") then
str = str .. mw.ustring.format('<h2>Способ получения</h2>')
str = str .. mw.ustring.format('<h2>Способ получения</h2>')
end
end
if (result == "Крафт") then
if (result == "Добыча") then
str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
str = str .. mw.ustring.format('</div>')
elseif (result == "Крафт") then
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
if data ~= nil then
if data ~= nil then
Строка 266: Строка 330:
if checkpoint4 ~= gm_data[k]["type"] then
if checkpoint4 ~= gm_data[k]["type"] then
checkpoint4 = gm_data[k]["type"]
checkpoint4 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий драфт")
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
end
end
end
end
Строка 291: Строка 355:
checkpoint6 = gm_data[k]["type"]
checkpoint6 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
end
end
end
end
elseif gm_data[k]["type"] == 7 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
i = i + 1
if checkpoint7 ~= gm_data[k]["type"] then
checkpoint7 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
end
end
end
end
Строка 302: Строка 378:
end
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('</div>')
elseif (result == "Крафт/Сундук") then
elseif (result == "Подарок") then
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
str = str .. mw.ustring.format('<div class="gift" style="width:fit-content; width: -moz-fit-content">')
if data ~= nil then
for k, v in ipairs(gifts_data) do
for k, v in ipairs(data) do
i = i + 1
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
end
end
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
for k, v in ipairs(loot_data) do
for k1, v1 in ipairs(v) do
for k1, v1 in ipairs(v) do
if (v[k1][1] == item) then
if (v[k1][1] == item) then
for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
for k2, v2 in lib.pairsByAlphabeticalKeys(gift_data) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
for k3, v3 in pairs(gift_data[k2]["gifts"]) do
if (v3[1] == k) then
if (v3[1] == k) then
l = l + 1
i = i + 1
if checkpoint ~= k2 then
if checkpoint ~= k2 then
checkpoint = k2
checkpoint = k2
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
str = str .. mw.ustring.format('%s', libGift.getGiftIcon(k2, "75px"))
end
end
end
end
Строка 332: Строка 397:
end
end
end
end
if l == 0 then
if i == 0 then
str = str .. "Нет данных"
str = str .. "Нет данных"
end
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('</div>')
elseif (result == "Крафт/Босс") then
elseif (result == "Добыча/Крафт") then
str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
if data ~= nil then
if data ~= nil then
Строка 348: Строка 416:
end
end
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
elseif (result == "Крафт/Сундук") then
for k, v in pairs(boss_data) do
for k2, v2 in pairs(boss_data[k]["loot"]) do
if (v2[1] == item) then
l = l + 1
str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
end
end
end
if l == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
elseif (result == "Крафт/Награда") then
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
if data ~= nil then
if data ~= nil then
Строка 373: Строка 428:
end
end
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
for k, v in ipairs(loot_data) do
for k2, v2 in pairs(gm_data[k]["rewards"]) do
for k1, v1 in ipairs(v) do
if gm_data[k]["type"] == 1 then
if (v[k1][1] == item) then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
if (v3[1] == k) then
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
l = l + 1
l = l + 1
if checkpoint ~= k2 then
if checkpoint ~= gm_data[k]["type"] then
checkpoint = k2
checkpoint = gm_data[k]["type"]
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 2 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
if k2 == "clan" then
end
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if l == 0 then
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
str = str .. "Нет данных"
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
end
l = l + 1
str = str .. mw.ustring.format('</div>')
if checkpoint2 ~= gm_data[k]["type"] then
elseif (result == "Крафт/Босс") then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
if data ~= nil then
end
for k, v in ipairs(data) do
end
i = i + 1
end
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
end
end
else
end
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if i == 0 then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
str = str .. "Нет данных"
l = l + 1
end
if checkpoint2 ~= gm_data[k]["type"] then
str = str .. mw.ustring.format('</div></div>')
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
for k, v in pairs(boss_data) do
end
for k2, v2 in pairs(boss_data[k]["loot"]) do
end
if (v2[1] == item) then
end
l = l + 1
end
str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
end
end
elseif gm_data[k]["type"] == 3 then
end
end
if l == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
elseif (result == "Крафт/Награда") then
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
if data ~= nil then
for k, v in ipairs(data) do
i = i + 1
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
end
end
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
for k2, v2 in pairs(gm_data[k]["rewards"]) do
if gm_data[k]["type"] == 1 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
l = l + 1
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
if checkpoint3 ~= gm_data[k]["type"] then
l = l + 1
checkpoint3 = gm_data[k]["type"]
if checkpoint ~= gm_data[k]["type"] then
str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
checkpoint = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 4 then
elseif gm_data[k]["type"] == 2 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if k2 == "clan" then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
l = l + 1
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
if checkpoint4 ~= gm_data[k]["type"] then
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
checkpoint4 = gm_data[k]["type"]
l = l + 1
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий драфт")
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
end
end
end
else
end
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
elseif gm_data[k]["type"] == 5 then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
end
elseif gm_data[k]["type"] == 3 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
l = l + 1
if checkpoint5 ~= gm_data[k]["type"] then
if checkpoint3 ~= gm_data[k]["type"] then
checkpoint5 = gm_data[k]["type"]
checkpoint3 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 6 then
elseif gm_data[k]["type"] == 4 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
l = l + 1
if checkpoint6 ~= gm_data[k]["type"] then
if checkpoint4 ~= gm_data[k]["type"] then
checkpoint6 = gm_data[k]["type"]
checkpoint4 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 5 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
if l == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
elseif (result == "Награда/Сундук") then
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
for k2, v2 in pairs(gm_data[k]["rewards"]) do
if gm_data[k]["type"] == 1 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
l = l + 1
i = i + 1
if checkpoint5 ~= gm_data[k]["type"] then
if checkpoint ~= gm_data[k]["type"] then
checkpoint5 = gm_data[k]["type"]
checkpoint = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 2 then
elseif gm_data[k]["type"] == 6 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
if k2 == "clan" then
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
l = l + 1
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
if checkpoint6 ~= gm_data[k]["type"] then
i = i + 1
checkpoint6 = gm_data[k]["type"]
if checkpoint2 ~= gm_data[k]["type"] then
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
else
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
i = i + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 3 then
elseif gm_data[k]["type"] == 7 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
i = i + 1
l = l + 1
if checkpoint3 ~= gm_data[k]["type"] then
if checkpoint7 ~= gm_data[k]["type"] then
checkpoint3 = gm_data[k]["type"]
checkpoint7 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 4 then
end
end
end
if l == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
elseif (result == "Награда/Сундук") then
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
for k2, v2 in pairs(gm_data[k]["rewards"]) do
if gm_data[k]["type"] == 1 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
i = i + 1
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
if checkpoint4 ~= gm_data[k]["type"] then
i = i + 1
checkpoint4 = gm_data[k]["type"]
if checkpoint ~= gm_data[k]["type"] then
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий драфт")
checkpoint = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 5 then
elseif gm_data[k]["type"] == 2 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if k2 == "clan" then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
i = i + 1
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
if checkpoint5 ~= gm_data[k]["type"] then
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
checkpoint5 = gm_data[k]["type"]
i = i + 1
str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
else
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
i = i + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 6 then
elseif gm_data[k]["type"] == 3 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
i = i + 1
i = i + 1
if checkpoint6 ~= gm_data[k]["type"] then
if checkpoint3 ~= gm_data[k]["type"] then
checkpoint6 = gm_data[k]["type"]
checkpoint3 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 4 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if i == 0 then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
str = str .. "Нет данных"
i = i + 1
end
if checkpoint4 ~= gm_data[k]["type"] then
str = str .. mw.ustring.format('</div>')
checkpoint4 = gm_data[k]["type"]
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
for k, v in ipairs(loot_data) do
for k1, v1 in ipairs(v) do
if (v[k1][1] == item) then
for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
if (v3[1] == k) then
l = l + 1
if checkpoint ~= k2 then
checkpoint = k2
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 5 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if l == 0 then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
str = str .. "Нет данных"
i = i + 1
end
if checkpoint5 ~= gm_data[k]["type"] then
str = str .. mw.ustring.format('</div>')
checkpoint5 = gm_data[k]["type"]
elseif (result == "Награда/Босс") then
str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
for k2, v2 in pairs(gm_data[k]["rewards"]) do
if gm_data[k]["type"] == 1 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
i = i + 1
if checkpoint ~= gm_data[k]["type"] then
checkpoint = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 2 then
elseif gm_data[k]["type"] == 6 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
if k2 == "clan" then
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
i = i + 1
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
if checkpoint6 ~= gm_data[k]["type"] then
i = i + 1
checkpoint6 = gm_data[k]["type"]
if checkpoint2 ~= gm_data[k]["type"] then
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
else
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
i = i + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 3 then
elseif gm_data[k]["type"] == 7 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
i = i + 1
i = i + 1
if checkpoint3 ~= gm_data[k]["type"] then
if checkpoint7 ~= gm_data[k]["type"] then
checkpoint3 = gm_data[k]["type"]
checkpoint7 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 4 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if i == 0 then
i = i + 1
str = str .. "Нет данных"
if checkpoint4 ~= gm_data[k]["type"] then
end
checkpoint4 = gm_data[k]["type"]
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий драфт")
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
for k, v in ipairs(loot_data) do
for k1, v1 in ipairs(v) do
if (v[k1][1] == item) then
for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
if (v3[1] == k) then
l = l + 1
if checkpoint ~= k2 then
checkpoint = k2
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 5 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if l == 0 then
i = i + 1
str = str .. "Нет данных"
if checkpoint5 ~= gm_data[k]["type"] then
end
checkpoint5 = gm_data[k]["type"]
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
elseif (result == "Награда/Босс") then
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
for k2, v2 in pairs(gm_data[k]["rewards"]) do
if gm_data[k]["type"] == 1 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
i = i + 1
if checkpoint ~= gm_data[k]["type"] then
checkpoint = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 6 then
elseif gm_data[k]["type"] == 2 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
if k2 == "clan" then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
i = i + 1
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
if checkpoint6 ~= gm_data[k]["type"] then
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
checkpoint6 = gm_data[k]["type"]
i = i + 1
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
else
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
i = i + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 3 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if i == 0 then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
str = str .. "Нет данных"
i = i + 1
end
if checkpoint3 ~= gm_data[k]["type"] then
str = str .. mw.ustring.format('</div>')
checkpoint3 = gm_data[k]["type"]
str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
for k, v in pairs(boss_data) do
for k2, v2 in pairs(boss_data[k]["loot"]) do
if (v2[1] == item) then
l = l + 1
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
end
end
end
if l == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
elseif (result == "Сундук/Босс") then
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
for k, v in ipairs(loot_data) do
for k1, v1 in ipairs(v) do
if (v[k1][1] == item) then
for k2, v2 in pairs(item_data) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
if (v3[1] == k) then
i = i + 1
if checkpoint ~= k2 then
checkpoint = k2
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 4 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if i == 0 then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
str = str .. "Нет данных"
i = i + 1
end
if checkpoint4 ~= gm_data[k]["type"] then
str = str .. mw.ustring.format('</div>')
checkpoint4 = gm_data[k]["type"]
str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
for k, v in pairs(boss_data) do
end
for k2, v2 in pairs(boss_data[k]["loot"]) do
end
if (v2[1] == item) then
end
l = l + 1
end
str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
elseif gm_data[k]["type"] == 5 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if l == 0 then
i = i + 1
str = str .. "Нет данных"
if checkpoint5 ~= gm_data[k]["type"] then
end
checkpoint5 = gm_data[k]["type"]
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
elseif (result == "Крафт/Награда/Сундук") then
end
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
end
if data ~= nil then
end
for k, v in ipairs(data) do
end
i = i + 1
elseif gm_data[k]["type"] == 6 then
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
end
end
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
for k2, v2 in pairs(gm_data[k]["rewards"]) do
if gm_data[k]["type"] == 1 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
i = i + 1
l = l + 1
if checkpoint6 ~= gm_data[k]["type"] then
if checkpoint ~= gm_data[k]["type"] then
checkpoint6 = gm_data[k]["type"]
checkpoint = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 2 then
elseif gm_data[k]["type"] == 7 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
if k2 == "clan" then
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
i = i + 1
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
if checkpoint7 ~= gm_data[k]["type"] then
l = l + 1
checkpoint7 = gm_data[k]["type"]
if checkpoint2 ~= gm_data[k]["type"] then
str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
end
end
else
end
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
end
l = l + 1
end
if checkpoint2 ~= gm_data[k]["type"] then
end
checkpoint2 = gm_data[k]["type"]
if i == 0 then
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
str = str .. "Нет данных"
end
end
end
str = str .. mw.ustring.format('</div>')
end
str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
end
for k, v in pairs(boss_data) do
end
for k2, v2 in pairs(boss_data[k]["loot"]) do
elseif gm_data[k]["type"] == 3 then
if (v2[1] == item) then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
l = l + 1
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
end
l = l + 1
end
if checkpoint3 ~= gm_data[k]["type"] then
end
checkpoint3 = gm_data[k]["type"]
if l == 0 then
str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
elseif (result == "Добыча/Сундук") then
str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
for k, v in ipairs(loot_data) do
for k1, v1 in ipairs(v) do
if (v[k1][1] == item) then
for k2, v2 in pairs(item_data) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
if (v3[1] == k) then
i = i + 1
if checkpoint ~= k2 then
checkpoint = k2
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 4 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if i == 0 then
l = l + 1
str = str .. "Нет данных"
if checkpoint4 ~= gm_data[k]["type"] then
end
checkpoint4 = gm_data[k]["type"]
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий драфт")
elseif (result == "Добыча/Босс") then
str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
for k, v in pairs(boss_data) do
for k2, v2 in pairs(boss_data[k]["loot"]) do
if (v2[1] == item) then
l = l + 1
str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
end
end
end
if l == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
elseif (result == "Добыча/Подарок") then
str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="gift" style="width:fit-content; width: -moz-fit-content">')
for k, v in ipairs(gifts_data) do
for k1, v1 in ipairs(v) do
if (v[k1][1] == item) then
for k2, v2 in lib.pairsByAlphabeticalKeys(gift_data) do
for k3, v3 in pairs(gift_data[k2]["gifts"]) do
if (v3[1] == k) then
i = i + 1
if checkpoint ~= k2 then
checkpoint = k2
str = str .. mw.ustring.format('%s', libGift.getGiftIcon(k2, "75px"))
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 5 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if i == 0 then
l = l + 1
if checkpoint5 ~= gm_data[k]["type"] then
checkpoint5 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
end
end
end
end
elseif gm_data[k]["type"] == 6 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint6 ~= gm_data[k]["type"] then
checkpoint6 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
end
end
end
end
end
end
end
if l == 0 then
str = str .. "Нет данных"
str = str .. "Нет данных"
end
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('</div>')
elseif (result == "Сундук/Босс") then
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
for k, v in ipairs(loot_data) do
for k, v in ipairs(loot_data) do
for k1, v1 in ipairs(v) do
for k1, v1 in ipairs(v) do
if (v[k1][1] == item) then
if (v[k1][1] == item) then
for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
for k2, v2 in pairs(item_data) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
if (v3[1] == k) then
if (v3[1] == k) then
m = m + 1
i = i + 1
if checkpoint ~= k2 then
if checkpoint ~= k2 then
checkpoint = k2
checkpoint = k2
Строка 868: Строка 942:
end
end
end
end
if m == 0 then
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
for k, v in pairs(boss_data) do
for k2, v2 in pairs(boss_data[k]["loot"]) do
if (v2[1] == item) then
l = l + 1
str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
end
end
end
if l == 0 then
str = str .. "Нет данных"
str = str .. "Нет данных"
end
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('</div>')
elseif (result == "Крафт/Награда/Босс") then
elseif (result == "Добыча/Крафт/Сундук") then
str = str .. mw.ustring.format('<div class="recipes" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
if data ~= nil then
if data ~= nil then
for k, v in ipairs(data) do
for k, v in ipairs(data) do
Строка 883: Строка 973:
str = str .. "Нет данных"
str = str .. "Нет данных"
end
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
for k, v in ipairs(loot_data) do
for k2, v2 in pairs(gm_data[k]["rewards"]) do
for k1, v1 in ipairs(v) do
if gm_data[k]["type"] == 1 then
if (v[k1][1] == item) then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k2, v2 in pairs(item_data) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
if (v3[1] == k) then
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
i = i + 1
l = l + 1
if checkpoint ~= k2 then
if checkpoint ~= gm_data[k]["type"] then
checkpoint = k2
checkpoint = gm_data[k]["type"]
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 2 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
if k2 == "clan" then
end
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if i == 0 then
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
str = str .. "Нет данных"
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
end
l = l + 1
str = str .. mw.ustring.format('</div>')
if checkpoint2 ~= gm_data[k]["type"] then
elseif (result == "Добыча/Крафт/Подарок") then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
end
str = str .. mw.ustring.format('</div>')
end
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
if data ~= nil then
for k, v in ipairs(data) do
i = i + 1
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
end
end
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('<div class="gift" style="width:fit-content; width: -moz-fit-content">')
for k, v in ipairs(gifts_data) do
for k1, v1 in ipairs(v) do
if (v[k1][1] == item) then
for k2, v2 in lib.pairsByAlphabeticalKeys(gift_data) do
for k3, v3 in pairs(gift_data[k2]["gifts"]) do
if (v3[1] == k) then
i = i + 1
if checkpoint ~= k2 then
checkpoint = k2
str = str .. mw.ustring.format('%s', libGift.getGiftIcon(k2, "75px"))
end
end
end
end
else
end
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
end
end
end
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
elseif (result == "Крафт/Награда/Сундук") then
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
if data ~= nil then
for k, v in ipairs(data) do
i = i + 1
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
end
end
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
for k2, v2 in pairs(gm_data[k]["rewards"]) do
if gm_data[k]["type"] == 1 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item)then
l = l + 1
l = l + 1
if checkpoint2 ~= gm_data[k]["type"] then
if checkpoint ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
checkpoint = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
end
end
end
end
Строка 927: Строка 1069:
end
end
end
end
elseif gm_data[k]["type"] == 3 then
elseif gm_data[k]["type"] == 2 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if k2 == "clan" then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
l = l + 1
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
if checkpoint3 ~= gm_data[k]["type"] then
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
checkpoint3 = gm_data[k]["type"]
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
end
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
l = l + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
end
end
end
else
end
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
elseif gm_data[k]["type"] == 4 then
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
end
elseif gm_data[k]["type"] == 3 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint3 ~= gm_data[k]["type"] then
checkpoint3 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
end
end
end
end
elseif gm_data[k]["type"] == 4 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
l = l + 1
if checkpoint4 ~= gm_data[k]["type"] then
if checkpoint4 ~= gm_data[k]["type"] then
checkpoint4 = gm_data[k]["type"]
checkpoint4 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий драфт")
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
end
end
end
end
Строка 954: Строка 1150:
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
l = l + 1
Строка 966: Строка 1169:
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
l = l + 1
Строка 971: Строка 1181:
checkpoint6 = gm_data[k]["type"]
checkpoint6 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
end
end
end
end
elseif gm_data[k]["type"] == 7 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint7 ~= gm_data[k]["type"] then
checkpoint7 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
end
end
end
end
Строка 982: Строка 1211:
end
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
for k, v in pairs(boss_data) do
for k, v in ipairs(loot_data) do
for k2, v2 in pairs(boss_data[k]["loot"]) do
for k1, v1 in ipairs(v) do
if (v2[1] == item) then
if (v[k1][1] == item) then
m = m + 1
for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
for k3, v3 in pairs(item_data[k2]["loot"]) do
end
if (v3[1] == k) then
end
m = m + 1
end
if checkpoint ~= k2 then
checkpoint = k2
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
end
end
end
end
end
end
end
if m == 0 then
if m == 0 then
str = str .. "Нет данных"
str = str .. "Нет данных"
end
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('</div>')
elseif (result == "Награда/Сундук/Босс") then
elseif (result == "Крафт/Награда/Босс") then
str = str .. mw.ustring.format('<div class="recipes" style="width:fit-content; width: -moz-fit-content">')
if data ~= nil then
for k, v in ipairs(data) do
i = i + 1
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
end
end
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
Строка 1004: Строка 1253:
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
i = i + 1
l = l + 1
if checkpoint ~= gm_data[k]["type"] then
if checkpoint ~= gm_data[k]["type"] then
checkpoint = gm_data[k]["type"]
checkpoint = gm_data[k]["type"]
Строка 1019: Строка 1268:
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
i = i + 1
l = l + 1
if checkpoint2 ~= gm_data[k]["type"] then
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
checkpoint2 = gm_data[k]["type"]
Строка 1030: Строка 1279:
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
i = i + 1
l = l + 1
if checkpoint2 ~= gm_data[k]["type"] then
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
checkpoint2 = gm_data[k]["type"]
Строка 1043: Строка 1292:
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
i = i + 1
l = l + 1
if checkpoint3 ~= gm_data[k]["type"] then
if checkpoint3 ~= gm_data[k]["type"] then
checkpoint3 = gm_data[k]["type"]
checkpoint3 = gm_data[k]["type"]
Строка 1055: Строка 1304:
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
i = i + 1
l = l + 1
if checkpoint4 ~= gm_data[k]["type"] then
if checkpoint4 ~= gm_data[k]["type"] then
checkpoint4 = gm_data[k]["type"]
checkpoint4 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий драфт")
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
end
end
end
end
Строка 1067: Строка 1316:
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
i = i + 1
l = l + 1
if checkpoint5 ~= gm_data[k]["type"] then
if checkpoint5 ~= gm_data[k]["type"] then
checkpoint5 = gm_data[k]["type"]
checkpoint5 = gm_data[k]["type"]
Строка 1079: Строка 1328:
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
i = i + 1
l = l + 1
if checkpoint6 ~= gm_data[k]["type"] then
if checkpoint6 ~= gm_data[k]["type"] then
checkpoint6 = gm_data[k]["type"]
checkpoint6 = gm_data[k]["type"]
Строка 1087: Строка 1336:
end
end
end
end
end
elseif gm_data[k]["type"] == 7 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if i == 0 then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
for k, v in ipairs(loot_data) do
for k1, v1 in ipairs(v) do
if (v[k1][1] == item) then
for k2, v2 in pairs(item_data) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
if (v3[1] == k) then
l = l + 1
l = l + 1
if checkpoint ~= k2 then
if checkpoint7 ~= gm_data[k]["type"] then
checkpoint = k2
checkpoint7 = gm_data[k]["type"]
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
end
end
end
end
Строка 1129: Строка 1368:
end
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('</div>')
elseif (result == "Крафт/Сундук/Босс") then
elseif (result == "Награда/Сундук/Босс") then
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
if data ~= nil then
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
for k, v in ipairs(data) do
for k2, v2 in pairs(gm_data[k]["rewards"]) do
i = i + 1
if gm_data[k]["type"] == 1 then
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
end
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
if i == 0 then
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
str = str .. "Нет данных"
i = i + 1
end
if checkpoint ~= gm_data[k]["type"] then
str = str .. mw.ustring.format('</div></div>')
checkpoint = gm_data[k]["type"]
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
for k, v in ipairs(loot_data) do
end
for k1, v1 in ipairs(v) do
end
if (v[k1][1] == item) then
end
for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
end
for k3, v3 in pairs(item_data[k2]["loot"]) do
end
if (v3[1] == k) then
elseif gm_data[k]["type"] == 2 then
l = l + 1
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
if checkpoint ~= k2 then
if k2 == "clan" then
checkpoint = k2
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
i = i + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
else
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
i = i + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 3 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if l == 0 then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
str = str .. "Нет данных"
i = i + 1
end
if checkpoint3 ~= gm_data[k]["type"] then
str = str .. mw.ustring.format('</div>')
checkpoint3 = gm_data[k]["type"]
str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
for k, v in pairs(boss_data) do
end
for k2, v2 in pairs(boss_data[k]["loot"]) do
end
if (v2[1] == item) then
end
m = m + 1
end
str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
elseif gm_data[k]["type"] == 4 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
str = str .. mw.ustring.format('</div>')
i = i + 1
if m == 0 then
if checkpoint4 ~= gm_data[k]["type"] then
str = str .. "Нет данных"
checkpoint4 = gm_data[k]["type"]
end
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
elseif (result == "Крафт/Награда/Босс/Сундук") then
end
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
end
if data ~= nil then
end
for k, v in ipairs(data) do
end
i = i + 1
elseif gm_data[k]["type"] == 5 then
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
end
end
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
for k2, v2 in pairs(gm_data[k]["rewards"]) do
if gm_data[k]["type"] == 1 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
i = i + 1
l = l + 1
if checkpoint5 ~= gm_data[k]["type"] then
if checkpoint ~= gm_data[k]["type"] then
checkpoint5 = gm_data[k]["type"]
checkpoint = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
end
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 2 then
elseif gm_data[k]["type"] == 6 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
if k2 == "clan" then
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
i = i + 1
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
if checkpoint6 ~= gm_data[k]["type"] then
l = l + 1
checkpoint6 = gm_data[k]["type"]
if checkpoint2 ~= gm_data[k]["type"] then
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
end
end
else
end
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
end
end
elseif gm_data[k]["type"] == 3 then
elseif gm_data[k]["type"] == 7 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
i = i + 1
if checkpoint3 ~= gm_data[k]["type"] then
if checkpoint7 ~= gm_data[k]["type"] then
checkpoint3 = gm_data[k]["type"]
checkpoint7 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 4 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if i == 0 then
l = l + 1
str = str .. "Нет данных"
if checkpoint4 ~= gm_data[k]["type"] then
end
checkpoint4 = gm_data[k]["type"]
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий драфт")
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
end
for k, v in ipairs(loot_data) do
end
for k1, v1 in ipairs(v) do
end
if (v[k1][1] == item) then
end
for k2, v2 in pairs(item_data) do
elseif gm_data[k]["type"] == 5 then
for k3, v3 in pairs(item_data[k2]["loot"]) do
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
if (v3[1] == k) then
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
l = l + 1
if checkpoint5 ~= gm_data[k]["type"] then
if checkpoint ~= k2 then
checkpoint5 = gm_data[k]["type"]
checkpoint = k2
str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
end
end
end
end
end
end
end
end
elseif gm_data[k]["type"] == 6 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if l == 0 then
l = l + 1
if checkpoint6 ~= gm_data[k]["type"] then
checkpoint6 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
end
end
end
end
end
end
end
if l == 0 then
str = str .. "Нет данных"
str = str .. "Нет данных"
end
end
Строка 1298: Строка 1513:
str = str .. "Нет данных"
str = str .. "Нет данных"
end
end
str = str .. mw.ustring.format('</div>')
elseif (result == "Добыча/Сундук/Подарок") then
str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
Строка 1303: Строка 1522:
for k1, v1 in ipairs(v) do
for k1, v1 in ipairs(v) do
if (v[k1][1] == item) then
if (v[k1][1] == item) then
for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
for k2, v2 in pairs(item_data) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
if (v3[1] == k) then
if (v3[1] == k) then
n = n + 1
i = i + 1
if checkpoint ~= k2 then
if checkpoint ~= k2 then
checkpoint = k2
checkpoint = k2
Строка 1317: Строка 1536:
end
end
end
end
if n == 0 then
if i == 0 then
str = str .. "Нет данных"
str = str .. "Нет данных"
end
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('</div>')
end
str = str .. mw.ustring.format('<div class="gift" style="width:fit-content; width: -moz-fit-content">')
 
for k, v in ipairs(gifts_data) do
return frame:preprocess(tostring(str))
for k1, v1 in ipairs(v) do
end
if (v[k1][1] == item) then
 
for k2, v2 in lib.pairsByAlphabeticalKeys(gift_data) do
function p.getItemSummon(frame)
for k3, v3 in pairs(gift_data[k2]["gifts"]) do
local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
if (v3[1] == k) then
i = i + 1
local get      = require ('Module:ItemData/getter')
if checkpoint ~= k2 then
local boss_data = require ('Module:BossData/data')
checkpoint = k2
local item      = args['item'] or args[1]
str = str .. mw.ustring.format('%s', libGift.getGiftIcon(k2, "75px"))
local summon    = "summon"
end
local str      = ""
end
end
local result    = get[summon](item)
end
end
if (result == true) then
str = str .. mw.ustring.format('<h2>Используется для вызова</h2><div class="bosses" style="width:fit-content; width: -moz-fit-content">')
for k, v in pairs(boss_data) do
if (boss_data[k]["summon"] == item) then
str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
end
end
end
if i == 0 then
str = str .. "Нет данных"
end
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('</div>')
end
elseif (result == "Крафт/Сундук/Босс") then
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
return frame:preprocess(tostring(str))
if data ~= nil then
end
for k, v in ipairs(data) do
 
i = i + 1
function p.getItemUsedInCraft(frame)
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
local recipe_data = require ('Module:RecipeData/data')
local item        = args['item'] or args[1]
local str        = ""
local checkpoint  = nil
if p.checkItemUsedInCraft(item) then
str = str .. mw.ustring.format('<h2>Используется в крафте</h2><div class="used-in-craft" style="width:fit-content; width: -moz-fit-content">')
end
for k, v in lib.pairsByAlphabeticalKeys(recipe_data) do
for k2, v2 in ipairs(recipe_data[k]) do
for k3, v3 in ipairs(recipe_data[k][k2]["ingredients"]) do
if (recipe_data[k][k2]["ingredients"][k3][1] == item) then
if checkpoint ~= k then
checkpoint = k
str = str .. mw.ustring.format('%s', p.getItemIcon(k, "50px"))
end
end
end
end
end
end
end
if i == 0 then
str = str .. "Нет данных"
if p.checkItemUsedInCraft(item) then
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('</div></div>')
end
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
for k, v in ipairs(loot_data) do
return frame:preprocess(tostring(str))
for k1, v1 in ipairs(v) do
end
if (v[k1][1] == item) then
 
for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
function p.checkItemUsedInCraft(item)
for k3, v3 in pairs(item_data[k2]["loot"]) do
local recipe_data = require ('Module:RecipeData/data')
if (v3[1] == k) then
l = l + 1
for k, v in lib.pairsByAlphabeticalKeys(recipe_data) do
if checkpoint ~= k2 then
for k2, v2 in ipairs(recipe_data[k]) do
checkpoint = k2
for k3, v3 in ipairs(recipe_data[k][k2]["ingredients"]) do
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
if (recipe_data[k][k2]["ingredients"][k3][1] == item) then
end
return true
end
end
end
end
end
end
end
end
end
end
if l == 0 then
end
str = str .. "Нет данных"
 
end
function p.getItemIcon(item, size, count, link)
str = str .. mw.ustring.format('</div>')
local item_data    = require ('Module:ItemData/data')
str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
local rarity_data  = require ('Module:ItemData/rarities')
for k, v in pairs(boss_data) do
local rarity, icon = ""
for k2, v2 in pairs(boss_data[k]["loot"]) do
if (v2[1] == item) then
if size == nil then
m = m + 1
size = "30px"
str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
end
end
end
if count == nil then
end
count = ""
str = str .. mw.ustring.format('</div>')
end
if m == 0 then
str = str .. "Нет данных"
if link == nil then
end
link = ""
elseif (result == "Крафт/Награда/Босс/Сундук") then
end
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
if data ~= nil then
if item == "Нет шлема" then
for k, v in ipairs(data) do
return mw.ustring.format('{{ii|Нет шлема|no_helmet.png|обычный|size=40px|link=}}')
i = i + 1
elseif item == "Нет доспеха" then
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
return mw.ustring.format('{{ii|Нет доспеха|no_armor.png|обычный|size=40px|link=}}')
end
elseif item == "Нет оружия" then
end
return mw.ustring.format('{{ii|Нет оружия|no_weapon.png|обычный|size=40px|link=}}')
if i == 0 then
elseif item == "Нет обуви" then
str = str .. "Нет данных"
return mw.ustring.format('{{ii|Нет обуви|no_shoes.png|обычный|size=40px|link=}}')
end
elseif item == "Нет кольца" then
str = str .. mw.ustring.format('</div></div>')
return mw.ustring.format('{{ii|Нет кольца|no_ring.png|обычный|size=40px|link=}}')
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
elseif item == "Нет ожерелья" then
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
return mw.ustring.format('{{ii|Нет ожерелья|no_necklace.png|обычный|size=40px|link=}}')
for k2, v2 in pairs(gm_data[k]["rewards"]) do
end
if gm_data[k]["type"] == 1 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
if lib.lookup(item_data, item) then
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
icon = item_data[item]["icon"]
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
else
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
return item
l = l + 1
end
if checkpoint ~= gm_data[k]["type"] then
checkpoint = gm_data[k]["type"]
if rarity_data[item_data[item]["rarity"]] and rarity_data[item_data[item]["rarity"]] ~= nil then
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
rarity = rarity_data[item_data[item]["rarity"]]
end
else
end
rarity = "обычный"
end
end
end
end
return mw.ustring.format('{{ii|%s|%s|%s|size=%s|count=%s|link=%s}}', item, icon, rarity, size, count, link)
elseif gm_data[k]["type"] == 2 then
end
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
 
if k2 == "clan" then
function p.getIconItem(frame)
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
local item_data    = require ('Module:ItemData/data')
l = l + 1
local rarity_data  = require ('Module:ItemData/rarities')
if checkpoint2 ~= gm_data[k]["type"] then
local rarity, icon, size, count = ""
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
if args['size'] == nil then
end
size = "30px"
end
else
end
size = args['size']
end
end
else
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if args['count'] == nil then
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
count = ""
l = l + 1
else
if checkpoint2 ~= gm_data[k]["type"] then
count = args['count']
checkpoint2 = gm_data[k]["type"]
end
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
if args['link'] == nil then
end
link = ""
end
else
end
link = args['link']
end
end
elseif gm_data[k]["type"] == 3 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
if args['item'] == "Нет шлема" then
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
return mw.ustring.format('{{ii|Нет шлема|no_helmet.png|обычный|size=40px|link=}}')
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
elseif args['item'] == "Нет доспеха" then
l = l + 1
return mw.ustring.format('{{ii|Нет доспеха|no_armor.png|обычный|size=40px|link=}}')
if checkpoint3 ~= gm_data[k]["type"] then
elseif args['item'] == "Нет оружия" then
checkpoint3 = gm_data[k]["type"]
return mw.ustring.format('{{ii|Нет оружия|no_weapon.png|обычный|size=40px|link=}}')
str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
elseif args['item'] == "Нет обуви" then
end
return mw.ustring.format('{{ii|Нет обуви|no_shoes.png|обычный|size=40px|link=}}')
end
elseif args['item'] == "Нет кольца" then
end
return mw.ustring.format('{{ii|Нет кольца|no_ring.png|обычный|size=40px|link=}}')
end
elseif args['item'] == "Нет ожерелья" then
elseif gm_data[k]["type"] == 4 then
return mw.ustring.format('{{ii|Нет ожерелья|no_necklace.png|обычный|size=40px|link=}}')
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
if lib.lookup(item_data, args['item']) then
l = l + 1
icon = item_data[args['item']]["icon"]
if checkpoint4 ~= gm_data[k]["type"] then
else
checkpoint4 = gm_data[k]["type"]
return args['item']
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
end
end
end
if rarity_data[item_data[args['item']]["rarity"]] and rarity_data[item_data[args['item']]["rarity"]] ~= nil then
end
rarity = rarity_data[item_data[args['item']]["rarity"]]
end
else
elseif gm_data[k]["type"] == 5 then
rarity = "обычный"
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
return frame:preprocess(mw.ustring.format('{{ii|%s|%s|%s|size=%s|count=%s|link=%s}}', args['item'], icon, rarity, size, count, link))
l = l + 1
end
if checkpoint5 ~= gm_data[k]["type"] then
 
checkpoint5 = gm_data[k]["type"]
function p.getItemCategoriesTable(frame)
str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
end
end
local item_data      = require ('Module:ItemData/data')
end
local categories_data = require ('Module:ItemData/categories')
end
local ability_data    = require ('Module:ItemData/abilities')
elseif gm_data[k]["type"] == 6 then
local category        = args['category'] or args[1]
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
local items          = {}
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
local type            = 0
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
local property1      = ""
l = l + 1
local property2      = ""
if checkpoint6 ~= gm_data[k]["type"] then
local property3      = ""
checkpoint6 = gm_data[k]["type"]
     local tableNode      = mw.html.create('table')
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
      
end
     for k, v in lib.pairsByAlphabeticalKeys(item_data) do
end
     if item_data[k]['categories'] ~= nil then
end
    for k1, v1 in ipairs(item_data[k]['categories']) do
end
    if category == categories_data[item_data[k]['categories'][k1]] then
elseif gm_data[k]["type"] == 7 then
    table.insert(items, k)
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
    end
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
    end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint7 ~= gm_data[k]["type"] then
checkpoint7 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
end
end
end
end
end
end
end
if l == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
for k, v in pairs(boss_data) do
for k2, v2 in pairs(boss_data[k]["loot"]) do
if (v2[1] == item) then
m = m + 1
str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
end
end
end
if m == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
for k, v in ipairs(loot_data) do
for k1, v1 in ipairs(v) do
if (v[k1][1] == item) then
for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
if (v3[1] == k) then
n = n + 1
if checkpoint ~= k2 then
checkpoint = k2
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
end
end
end
end
end
end
end
if n == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
elseif (result == "Магазин") then
str = str .. mw.ustring.format('<div class="shop" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_shop.png|x100px|ссылка=Магазин]]', "Магазин")
str = str .. mw.ustring.format('</div>')
elseif (result == "Магазин/Крафт") then
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
if data ~= nil then
for k, v in ipairs(data) do
i = i + 1
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
end
end
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('<div class="shop" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_shop.png|x100px|ссылка=Магазин]]', "Магазин")
str = str .. mw.ustring.format('</div>')
elseif (result == "Магазин/Крафт/Награда") then
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
if data ~= nil then
for k, v in ipairs(data) do
i = i + 1
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
end
end
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
for k2, v2 in pairs(gm_data[k]["rewards"]) do
if gm_data[k]["type"] == 1 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item)then
l = l + 1
if checkpoint ~= gm_data[k]["type"] then
checkpoint = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
end
end
end
end
end
elseif gm_data[k]["type"] == 2 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
if k2 == "clan" then
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
l = l + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
else
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
end
elseif gm_data[k]["type"] == 3 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint3 ~= gm_data[k]["type"] then
checkpoint3 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
end
end
end
end
elseif gm_data[k]["type"] == 4 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint4 ~= gm_data[k]["type"] then
checkpoint4 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
end
end
end
end
elseif gm_data[k]["type"] == 5 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint5 ~= gm_data[k]["type"] then
checkpoint5 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
end
end
end
end
elseif gm_data[k]["type"] == 6 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint6 ~= gm_data[k]["type"] then
checkpoint6 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
end
end
end
end
elseif gm_data[k]["type"] == 7 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint7 ~= gm_data[k]["type"] then
checkpoint7 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
end
end
end
end
end
end
end
if l == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="shop" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_shop.png|x100px|ссылка=Магазин]]', "Магазин")
str = str .. mw.ustring.format('</div>')
elseif (result == "Магазин/Крафт/Награда/Сундук") then
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
if data ~= nil then
for k, v in ipairs(data) do
i = i + 1
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
end
end
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
for k2, v2 in pairs(gm_data[k]["rewards"]) do
if gm_data[k]["type"] == 1 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item)then
l = l + 1
if checkpoint ~= gm_data[k]["type"] then
checkpoint = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
end
end
end
end
end
elseif gm_data[k]["type"] == 2 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
if k2 == "clan" then
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
l = l + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
else
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
end
elseif gm_data[k]["type"] == 3 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint3 ~= gm_data[k]["type"] then
checkpoint3 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
end
end
end
end
elseif gm_data[k]["type"] == 4 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint4 ~= gm_data[k]["type"] then
checkpoint4 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
end
end
end
end
elseif gm_data[k]["type"] == 5 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint5 ~= gm_data[k]["type"] then
checkpoint5 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
end
end
end
end
elseif gm_data[k]["type"] == 6 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint6 ~= gm_data[k]["type"] then
checkpoint6 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
end
end
end
end
elseif gm_data[k]["type"] == 7 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint7 ~= gm_data[k]["type"] then
checkpoint7 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
end
end
end
end
end
end
end
if l == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
for k, v in ipairs(loot_data) do
for k1, v1 in ipairs(v) do
if (v[k1][1] == item) then
for k2, v2 in pairs(item_data) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
if (v3[1] == k) then
l = l + 1
if checkpoint ~= k2 then
checkpoint = k2
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
end
end
end
end
end
end
end
if l == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="shop" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_shop.png|x100px|ссылка=Магазин]]', "Магазин")
str = str .. mw.ustring.format('</div>')
elseif (result == "Добыча/Крафт/Сундук/Подарок") then
str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
if data ~= nil then
for k, v in ipairs(data) do
i = i + 1
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
end
end
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
for k, v in ipairs(loot_data) do
for k1, v1 in ipairs(v) do
if (v[k1][1] == item) then
for k2, v2 in pairs(item_data) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
if (v3[1] == k) then
i = i + 1
if checkpoint ~= k2 then
checkpoint = k2
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
end
end
end
end
end
end
end
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="gift" style="width:fit-content; width: -moz-fit-content">')
for k, v in ipairs(gifts_data) do
for k1, v1 in ipairs(v) do
if (v[k1][1] == item) then
for k2, v2 in lib.pairsByAlphabeticalKeys(gift_data) do
for k3, v3 in pairs(gift_data[k2]["gifts"]) do
if (v3[1] == k) then
i = i + 1
if checkpoint ~= k2 then
checkpoint = k2
str = str .. mw.ustring.format('%s', libGift.getGiftIcon(k2, "75px"))
end
end
end
end
end
end
end
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
elseif (result == "Магазин/Крафт/Награда/Сундук/Босс") then
str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
if data ~= nil then
for k, v in ipairs(data) do
i = i + 1
str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
end
end
if i == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div></div>')
str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
for k2, v2 in pairs(gm_data[k]["rewards"]) do
if gm_data[k]["type"] == 1 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item)then
l = l + 1
if checkpoint ~= gm_data[k]["type"] then
checkpoint = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
end
end
end
end
end
elseif gm_data[k]["type"] == 2 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
if k2 == "clan" then
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
l = l + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
else
for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint2 ~= gm_data[k]["type"] then
checkpoint2 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
end
end
end
end
end
elseif gm_data[k]["type"] == 3 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint3 ~= gm_data[k]["type"] then
checkpoint3 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
end
end
end
end
elseif gm_data[k]["type"] == 4 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint4 ~= gm_data[k]["type"] then
checkpoint4 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
end
end
end
end
elseif gm_data[k]["type"] == 5 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint5 ~= gm_data[k]["type"] then
checkpoint5 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
end
end
end
end
elseif gm_data[k]["type"] == 6 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint6 ~= gm_data[k]["type"] then
checkpoint6 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
end
end
end
end
elseif gm_data[k]["type"] == 7 then
for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
end
if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
end
if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
l = l + 1
if checkpoint7 ~= gm_data[k]["type"] then
checkpoint7 = gm_data[k]["type"]
str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
end
end
end
end
end
end
end
if l == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
for k, v in pairs(boss_data) do
for k2, v2 in pairs(boss_data[k]["loot"]) do
if (v2[1] == item) then
m = m + 1
str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
end
end
end
if m == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
for k, v in ipairs(loot_data) do
for k1, v1 in ipairs(v) do
if (v[k1][1] == item) then
for k2, v2 in pairs(item_data) do
for k3, v3 in pairs(item_data[k2]["loot"]) do
if (v3[1] == k) then
l = l + 1
if checkpoint ~= k2 then
checkpoint = k2
str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
end
end
end
end
end
end
end
if l == 0 then
str = str .. "Нет данных"
end
str = str .. mw.ustring.format('</div>')
str = str .. mw.ustring.format('<div class="shop" style="width:fit-content; width: -moz-fit-content">')
str = str .. mw.ustring.format('[[Файл:icon_shop.png|x100px|ссылка=Магазин]]', "Магазин")
str = str .. mw.ustring.format('</div>')
end
 
return frame:preprocess(tostring(str))
end
 
function p.getItemSummon(frame)
local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
local get      = require ('Module:ItemData/getter')
local boss_data = require ('Module:BossData/data')
local item      = args['item'] or args[1]
local summon    = "summon"
local str      = ""
local result    = get[summon](item)
if (result == true) then
str = str .. mw.ustring.format('<h2>Используется для вызова</h2><div class="bosses" style="width:fit-content; width: -moz-fit-content">')
for k, v in pairs(boss_data) do
if (boss_data[k]["summon"] == item) then
str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
end
end
str = str .. mw.ustring.format('</div>')
end
return frame:preprocess(tostring(str))
end
 
function p.checkSpecialItemUsedInCraft(item)
local chunks = {}
local str = ""
if item == "Кольцо охотника Ⅰ/1" or item == "Кольцо охотника Ⅰ/2" or item == "Кольцо охотника Ⅰ/3" then
return false
end
for substring in item:gmatch("%W+ ") do
  table.insert(chunks, substring)
end
str = tostring(chunks[1])
str = string.sub(str, 0, str:len()-1)
if str == "Кольцо охотника" then
return true
else
return false
end
end
 
function p.getItemUsedInCraft(frame)
local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
local recipe_data = require ('Module:RecipeData/data')
local unit_data  = require ('Module:UnitData/data')
local item        = args['item'] or args[1]
local str        = ""
local checkpoint  = nil
if p.checkItemUsedInCraft(item) or p.checkSpecialItemUsedInCraft(item) then
str = str .. mw.ustring.format('<h2>Используется в крафте</h2><div class="used-in-craft" style="width:fit-content; width: -moz-fit-content">')
end
for k, v in lib.pairsByAlphabeticalKeys(recipe_data) do
for k2, v2 in ipairs(recipe_data[k]) do
for k3, v3 in ipairs(recipe_data[k][k2]["ingredients"]) do
if (recipe_data[k][k2]["ingredients"][k3][1] == item) then
if unit_data[item] ~= nil then
if checkpoint ~= k then
checkpoint = k
str = str .. mw.ustring.format('%s', p.getUnitIcon(k, "50px"))
end
else
if checkpoint ~= k then
checkpoint = k
str = str .. mw.ustring.format('%s', p.getItemIcon(k, "50px"))
end
end
end
end
end
end
if p.checkSpecialItemUsedInCraft(item) then
str = str .. mw.ustring.format('%s', p.getItemIcon("Кольцо", "50px"))
end
if p.checkItemUsedInCraft(item) or p.checkSpecialItemUsedInCraft(item) then
str = str .. mw.ustring.format('</div>')
end
return frame:preprocess(tostring(str))
end
 
function p.checkItemUsedInCraft(item)
local recipe_data = require ('Module:RecipeData/data')
for k, v in lib.pairsByAlphabeticalKeys(recipe_data) do
for k2, v2 in ipairs(recipe_data[k]) do
for k3, v3 in ipairs(recipe_data[k][k2]["ingredients"]) do
if (recipe_data[k][k2]["ingredients"][k3][1] == item) then
return true
end
end
end
end
end
 
function p.getItemUsedToOpen(frame)
local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
local item_data  = require ('Module:ItemData/data')
local item      = args['item'] or args[1]
local str        = ""
local checkpoint = nil
if p.checkItemUsedToOpen(item) then
str = str .. mw.ustring.format('<h2>Используется для открытия</h2><div class="used-in-craft" style="width:fit-content; width: -moz-fit-content">')
end
for k, v in lib.pairsByAlphabeticalKeys(item_data) do
if item_data[k]["key"] ~= nil then
if (item_data[k]["key"] == p.getKeyId(item)) then
if checkpoint ~= k then
checkpoint = k
str = str .. mw.ustring.format('%s', p.getItemIcon(k, "50px"))
end
end
end
end
if p.checkItemUsedToOpen(item) then
str = str .. mw.ustring.format('</div>')
end
return frame:preprocess(tostring(str))
end
 
function p.checkItemUsedToOpen(item)
local item_data = require ('Module:ItemData/data')
for k, v in lib.pairsByAlphabeticalKeys(item_data) do
if item_data[k]["key"] ~= nil then
if (item_data[k]["key"] == p.getKeyId(item)) then
return true
end
end
end
end
 
function p.getKeyId(item)
local key_data = require ('Module:ItemData/keys')
for k, v in lib.pairsByAlphabeticalKeys(key_data) do
if (v == item) then
return k
end
end
end
 
function p.getItemIcon(item, size, count, tooltip, link)
local item_data    = require ('Module:ItemData/data')
local unit_data    = require ('Module:UnitData/data')
local rarity_data  = require ('Module:ItemData/rarities')
local rarity, icon = ""
local unit = false
if size == nil then
size = "30px"
end
if count == nil then
count = ""
end
if tooltip == nil then
tooltip = "";
else
tooltip = "true";
end
if link == nil then
link = item
end
if item == "Нет шлема" then
return mw.ustring.format('{{ItemIcon|Нет шлема|no_helmet.png|обычный|size=40px|link=false}}')
elseif item == "Нет доспеха" then
return mw.ustring.format('{{ItemIcon|Нет доспеха|no_armor.png|обычный|size=40px|link=false}}')
elseif item == "Нет оружия" then
return mw.ustring.format('{{ItemIcon|Нет оружия|no_weapon.png|обычный|size=40px|link=false}}')
elseif item == "Нет обуви" then
return mw.ustring.format('{{ItemIcon|Нет обуви|no_shoes.png|обычный|size=40px|link=false}}')
elseif item == "Нет кольца" then
return mw.ustring.format('{{ItemIcon|Нет кольца|no_ring.png|обычный|size=40px|link=false}}')
elseif item == "Нет ожерелья" then
return mw.ustring.format('{{ItemIcon|Нет ожерелья|no_necklace.png|обычный|size=40px|link=false}}')
end
if lib.lookup(item_data, item) then
icon = item_data[item]["icon"]
elseif lib.lookup(unit_data, item) then
icon = unit_data[item]["icon"]
unit = true;
else
return item
end
if unit == false then
if rarity_data[item_data[item]["rarity"]] and rarity_data[item_data[item]["rarity"]] ~= nil then
rarity = rarity_data[item_data[item]["rarity"]]
else
rarity = "обычный"
end
return mw.ustring.format('{{ItemIcon|%s|%s|%s|size=%s|count=%s|link=%s|tooltip=%s}}', item, icon, rarity, size, count, link, tooltip)
else
if rarity_data[unit_data[item]["rarity"]] and rarity_data[unit_data[item]["rarity"]] ~= nil then
rarity = rarity_data[unit_data[item]["rarity"]]
else
rarity = "обычный"
end
return mw.ustring.format('{{UnitIcon|%s|%s|%s|size=%s|count=%s|link=%s|tooltip=%s}}', item, icon, rarity, size, count, link, tooltip)
end
end
 
function p.getIconItem(frame)
local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
local item_data    = require ('Module:ItemData/data')
local rarity_data  = require ('Module:ItemData/rarities')
local rarity, icon, size, count = ""
if args['size'] == nil then
size = "30px"
else
size = args['size']
end
if args['count'] == nil then
count = ""
else
count = args['count']
end
if args['link'] == nil then
link = args['item']
else
link = args['link']
end
if args['caption'] == nil then
caption = ""
else
caption = args['caption']
end
if args['tooltip'] == nil then
tooltip = ""
else
if args['tooltip'] == "true" then
tooltip = args['item']
else
tooltip = ""
end
end
if args['item'] == "Нет шлема" then
return mw.ustring.format('{{ItemIcon|Нет шлема|no_helmet.png|обычный|size=40px|link=}}')
elseif args['item'] == "Нет доспеха" then
return mw.ustring.format('{{ItemIcon|Нет доспеха|no_armor.png|обычный|size=40px|link=}}')
elseif args['item'] == "Нет оружия" then
return mw.ustring.format('{{ItemIcon|Нет оружия|no_weapon.png|обычный|size=40px|link=}}')
elseif args['item'] == "Нет обуви" then
return mw.ustring.format('{{ItemIcon|Нет обуви|no_shoes.png|обычный|size=40px|link=}}')
elseif args['item'] == "Нет кольца" then
return mw.ustring.format('{{ItemIcon|Нет кольца|no_ring.png|обычный|size=40px|link=}}')
elseif args['item'] == "Нет ожерелья" then
return mw.ustring.format('{{ItemIcon|Нет ожерелья|no_necklace.png|обычный|size=40px|link=}}')
end
if lib.lookup(item_data, args['item']) then
icon = item_data[args['item']]["icon"]
else
return args['item']
end
if rarity_data[item_data[args['item']]["rarity"]] and rarity_data[item_data[args['item']]["rarity"]] ~= nil then
rarity = rarity_data[item_data[args['item']]["rarity"]]
else
rarity = "обычный"
end
return frame:preprocess(mw.ustring.format('{{ItemIcon|%s|%s|%s|size=%s|count=%s|link=%s|caption=%s|tooltip=%s}}', args['item'], icon, rarity, size, count, link, caption, tooltip))
end
 
function p.getItemCategories(frame)
local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
local item_data      = require ('Module:ItemData/data')
local categories_data = require ('Module:ItemData/categories')
local item            = args['item'] or args[1]
local str            = ""
if item_data[item]["categories"] ~= nil then
    for _, v in ipairs(item_data[item]["categories"]) do
str = str .. mw.ustring.format('[[Категория:%s]]\n', categories_data[v])
end
end
return frame:preprocess(tostring(str))
end
 
function p.getItemDuplicateLinks(frame)
local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
local item_data = require ('Module:ItemData/data')
local hero_data = require ('Module:HeroData/data')
local boss_data = require ('Module:BossData/data')
local shop_data = require ('Module:ShopData/data')
local libHero  = require ('Module:HeroData')
local libBoss  = require ('Module:BossData')
local libShop  = require ('Module:ShopData')
local item      = args['item'] or args[1]
local i        = 1
local str      = ''
local divNode = mw.html.create('div')
local divNode2 = mw.html.create('div')
local divNode3 = mw.html.create('div')
divNode
        :newline()
       
    divNode2
    :addClass('custom-grid')
        :newline()
divNode3
        :cssText('')
        :wikitext(mw.ustring.format('В данном пространстве вики существует несколько страниц с именем - <strong>%s</strong>.', item))
        :newline()
if (item_data[item .. "/1"] ~= nil or item_data[item .. "/2"] ~= nil) or hero_data[item .. "/1"] ~= nil or boss_data[item .. "/1"] ~= nil or shop_data[item .. "/1"] ~= nil then
divNode:node(divNode3):newline()
while i < 10 do
local divNode4 = mw.html.create('div')
if hero_data[item .. "/" .. i] ~= nil then
    divNode4
:addClass('custom-grid__card')
            :tag('div')
            :cssText('margin: 0 auto;')
                :wikitext(mw.ustring.format('{{Center|%s}}', libHero.getHeroIcon(item .. "/" .. i, "75px")))
                :done()
            :tag('div')
            :addClass('custom-grid__header')
                :wikitext(mw.ustring.format('%s', hero_data[item .. "/" .. i]['info']))
                :done()
            :done()
      divNode2:node(divNode4):newline()
end
if item_data[item .. "/" .. i] ~= nil then
divNode4
:addClass('custom-grid__card')
            :tag('div')
                :wikitext(mw.ustring.format('{{Center|%s}}', p.getItemIcon(item .. "/" .. i, "75px")))
                :done()
            :tag('div')
            :addClass('custom-grid__footer')
                :wikitext(mw.ustring.format('%s', item_data[item .. "/" .. i]['description']))
                :done()
            :done()
      divNode2:node(divNode4):newline()
end
if boss_data[item .. "/" .. i] ~= nil then
    divNode4
:addClass('custom-grid-block')
        :cssText('text-align: center; display: flex; flex-flow: column wrap;')
            :tag('div')
            :cssText('margin: 0 auto;')
                :wikitext(mw.ustring.format('{{Center|%s}}', libBoss.getBossIcon(item .. "/" .. i, "75px")))
                :done()
            :tag('div')
            :cssText('font-family: BeaufortforLoL; color: #649ec0; font-style: italic; margin-top: 5px;')
                :wikitext()
                :done()
            :done()
      divNode2:node(divNode4):newline()
end
if shop_data[item .. "/" .. i] ~= nil then
    divNode4
:addClass('custom-grid__card')
            :tag('div')
            :cssText('margin: 0 auto;')
                :wikitext(mw.ustring.format('{{Center|%s}}', libShop.getLotIcon(item .. "/" .. i, "75px")))
                :done()
            :tag('div')
            :addClass('custom-grid__footer')
                :wikitext(mw.ustring.format('%s', shop_data[item .. "/" .. i]['description']))
                :done()
            :done()
      divNode2:node(divNode4):newline()
end
i = i + 1
end
divNode:node(divNode2):newline()
else
return
end
return frame:preprocess(tostring(divNode))
end
 
function p.getItemActivatesHero(frame)
local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
local hero_data  = require ('Module:HeroData/data')
local libHero    = require('Module:HeroData')
local item      = args['item'] or args[1]
local str        = ""
local checkpoint = nil
str = str .. mw.ustring.format('<h2>Используется для активации героя</h2><div class="activates-hero" style="width:fit-content; width: -moz-fit-content">')
for k, v in lib.pairsByAlphabeticalKeys(hero_data) do
if (k == lib.replace(item, "Осколки: ", "") or lib.replace(k, "/1", "") == lib.replace(item, "Осколки: ", "")) then
str = str .. mw.ustring.format('%s', libHero.getHeroIcon(k, "75px"))
end
end
str = str .. mw.ustring.format('</div>')
return frame:preprocess(tostring(str))
end
 
function p.getItemCategoriesTable(frame)
local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
local item_data      = require ('Module:ItemData/data')
local categories_data = require ('Module:ItemData/categories')
local category        = args['category'] or args[1]
local items          = {}
     local divNode        = mw.html.create('div')
      
     for k, v in lib.pairsByAlphabeticalKeys(item_data) do
     if item_data[k]['categories'] ~= nil then
    for k1, v1 in ipairs(item_data[k]['categories']) do
    if category == categories_data[item_data[k]['categories'][k1]] then
    table.insert(items, k)
    end
    end
    end
    end
     end
     end
      
      
     for _, v2 in lib.pairsByAlphabeticalKeys(items) do
     divNode
     if item_data[v2]['type'] == 1 then
     :addClass('custom-grid')
    type = 1
    elseif item_data[v2]['type'] == 2 then
    type = 2
    elseif item_data[v2]['type'] == 3 then
    type = 3
    elseif item_data[v2]['type'] == 4 then
    type = 4
    end
    end
   
    tableNode
        :addClass('wikitable sortable')
        :cssText('width: 100%; text-align: center; display: table;')
         :newline()
         :newline()
      
      
    if type == 3 then
     for k1, v1 in lib.pairsByAlphabeticalKeys(items) do
tableNode
    local divNode2 = mw.html.create('div')
        :tag('tr')
            :css('white-space', 'nowrap')
divNode2
            :tag('th')
:addClass('custom-grid__card')
            :css('width', '100px')
    :tag('div')
                :wikitext('Название')
    :addClass('custom-grid__header')
                :done()
                 :wikitext(mw.ustring.format('%s', item_data[v1]['name']))
            :tag('th')
                :attr('class', 'unsortable')
                :css('width', '60px')
                :wikitext('Иконка')
                :done()
            :tag('th')
            :attr('class', 'unsortable')
                :wikitext('Способности')
                :done()
            :done()
    end
   
     for k3, v3 in lib.pairsByAlphabeticalKeys(items) do
        local rowNode = mw.html.create('tr')
       
        if item_data[v3]['abilities'][2] ~= nil then
        property1 = ability_data[item_data[v3]['abilities'][2]][2]
        property2 = ability_data[item_data[v3]['abilities'][2]][3]
        property3 = ability_data[item_data[v3]['abilities'][2]][4]
        end
       
        rowNode
            :tag('td')
                :attr('data-sort-value', k3)
                 :wikitext(mw.ustring.format('[[%s|%s]]', v3, v3:gsub('.*/', '')))
                 :done()
                 :done()
             :tag('td')
             :tag('div')
                 :wikitext(mw.ustring.format('%s', p.getItemIcon(v3, "50px")))
                 :wikitext(mw.ustring.format('{{Center|%s}}', p.getItemIcon(v1, "75px", nil, true)))
                 :done()
                 :done()
             :tag('td')
             :tag('div')
                 :wikitext(mw.ustring.format('<div><strong>%s (%s)</strong>: %s</div>%s',
            :addClass('custom-grid__footer')
                ability_data[item_data[v3]['abilities'][1]][2],
                 :wikitext(mw.ustring.format('%s', item_data[v1]['description']))
                ability_data[item_data[v3]['abilities'][1]][3],
                ability_data[item_data[v3]['abilities'][1]][4],
                lib.ternary(property1 == "", "",
                mw.ustring.format('<div><strong>%s (%s)</strong>: %s</div>', property1, property2, property3)
                )
                ))
                 :done()
                 :done()
        :done()
            :done()
         tableNode:node(rowNode):newline()
         divNode:node(divNode2):newline()
     end
     end
      
      
     return frame:preprocess(tostring(tableNode))
     return frame:preprocess(tostring(divNode))
end
 
function p.getItemCategories(frame)
local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
local item_data      = require ('Module:ItemData/data')
local categories_data = require ('Module:ItemData/categories')
local item            = args['item'] or args[1]
local categories      = {}
local str            = ""
local divNode         = mw.html.create('div')
if item_data[item]["categories"] ~= nil then
    for _, v in ipairs(item_data[item]["categories"]) do
str = str .. mw.ustring.format('[[Категория:%s]]', categories_data[v])
end
end
return frame:preprocess(tostring(str))
end
end


return p
return p

Текущая версия от 12:50, 31 декабря 2023

Данная группа модулей хранит информацию обо всех предметах из Крушителей подземелий. Перечень модулей:

Информация из Модуль:ItemData/doc


local p = {}

local lib     = require('Module:Feature')

function p.get(frame)
	local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
	
	local get      = require ('Module:ItemData/getter')
    local item     = args['item'] or args[1]
    local datatype = args['datatype'] or args[2]
    local output   = args['output'] or args[3] or nil
    
    local result = get[datatype](item)
    
    if output ~= nil and type(result) == "table" then
        if output == "csv" then
            return lib.tbl_concat{result}
        elseif output == "custom" then 
            return frame:preprocess(lib.tbl_concat({result, prepend = args['prepend'], append = args['append'], separator = args['separator'], index = args["index"]}))
        elseif output == "template" then 
            return frame:preprocess(lib.tbl_concat{result, prepend = "{{" .. args['t_name'] .. "|", append = "}}", separator = args['separator']})
        end
    elseif result == nil then
        return ""
    else
        return result
    end
end

function p.getItemAbility(frame)
	local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
		
	local get     = require ('Module:ItemData/getter')
	local item    = args['item'] or args[1]
	local ability = "abilities"
	local str     = ""
	
	local result = get[ability](item)
	
	for k, v in ipairs(result) do
    	if tonumber(args['index']) == k then
    		str = mw.ustring.format('%s/%s/%s/%s', v[1], v[2], v[3], v[4])
    	end
    end
    
    return str
end

function p.getLoot(frame)
	local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
		
	local get       = require ('Module:ItemData/getter')
	local item      = args['item'] or args[1]
	local str       = ""
	
	local source = get["source"](item)

	str = mw.ustring.format('{{Chest|%s|source=%s|used_in_craft=%s}}', item, source, item)
    
    return frame:preprocess(tostring(str))
end

function p.getLootPack(frame)
	local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
		
	local get       = require ('Module:ItemData/getter')
	local item      = args['item'] or args[1]
	local loot_data = "loot_data"
	local count

	local result = get[loot_data](item)
	for k, v in ipairs(result) do
    	if tonumber(args['index']) == k then
			count = mw.ustring.format('%d', v[2])
		end
    end
    
    return tonumber(count)
end

function p.getLootType(frame)
	local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
		
	local get       = require ('Module:ItemData/getter')
	local loot_type = require('Module:ItemData/loot/types')
	local item      = args['item'] or args[1]
	local loot_data = "loot_data"
	local type      = ""

	local result = get[loot_data](item)
	for k, v in ipairs(result) do
    	if tonumber(args['index']) == k then
			type = mw.ustring.format('%s', loot_type[v[3]])
		end
    end
    
    return tostring(type)
end

function p.getLootItems(frame)
	local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
		
	local get     = require ('Module:ItemData/getter')
	local libHero = require('Module:HeroData')
    local libUnit = require('Module:UnitData')
	local item    = args['item'] or args[1]
	local loot    = "loot"
	local divNode = mw.html.create('div')
	
	divNode
		:cssText('display: flex; flex-flow: row wrap; justify-content: center;')
		:newline()

	local result = get[loot](item)
	for k, v in ipairs(result) do
    	if tonumber(args['index']) == k then
			for k2, v2 in ipairs(v) do
				if v[k2][1] == "Альберт" or
				   v[k2][1] == "Ангмарс" or
				   v[k2][1] == "МакКлиф" or
				   v[k2][1] == "Сэра, Королева Воров" or
				   v[k2][1] == "Повелительница мух" or
				   v[k2][1] == "Тикола Несла" or
                   v[k2][1] == "Анндралгон Черный" or
				   v[k2][1] == "Мехарион" or
                   v[k2][1] == "Владыка Драадор" or
				   v[k2][1] == "Кузнечик" or
                   v[k2][1] == "Ледяная Эльга" or
                   v[k2][1] == "Аврора, Ангел Надежды" or
                   v[k2][1] == "Разиэль, Ангел Отчаяния" or
                   v[k2][1] == "Элтор, Ангел Равновесия" or
                   v[k2][1] == "Зевс Громовержец" or
                   v[k2][1] == "Владыка Миктлана" or
                   v[k2][1] == "Инпу" or
                   v[k2][1] == "Арбитр" or
                   v[k2][1] == "Судья" or
                   v[k2][1] == "Пренакс Обманщик" or
                   v[k2][1] == "Коммандор Вед'ахен" or
                   v[k2][1] == "Альммахарет" or
                   v[k2][1] == "Кертхрорааз" or
                   v[k2][1] == "Космический солдат" or
                   v[k2][1] == "Звездный охотник" or
                   v[k2][1] == "Пожиратель душ" or
                   v[k2][1] == "Августин" or
                   v[k2][1] == "Аилред" or
                   v[k2][1] == "Офаниель" or
                   v[k2][1] == "Дидгур" or
                   v[k2][1] == "Воин ягуара" or
                   v[k2][1] == "Уильям Вейн" or
                   v[k2][1] == "Тразк" or
                   v[k2][1] == "Джамис"
				then
					divNode
		    			:tag('div')
		    				:addClass('loot-item')
				    		:wikitext(mw.ustring.format('%s', libHero.getHeroIcon(v[k2][1], "60px", true)))
				    		:done()
                elseif v[k2][1] == "Лучники" or
                    v[k2][1] == "Волшебники" or
                    v[k2][1] == "Воины" or
                    v[k2][1] == "Грифоны" or
                    v[k2][1] == "Черные рыцари" or
                    v[k2][1] == "Сторожевая башня пустоты/1"
                then
                    divNode
		    			:tag('div')
		    				:addClass('loot-item')
				    		:wikitext(mw.ustring.format('%s', libUnit.getUnitIcon(v[k2][1], "60px", v[k2][2], true)))
				    		:done()
				else
	    			divNode
		    			:tag('div')
		    				:addClass('loot-item')
				    		:wikitext(mw.ustring.format('%s', p.getItemIcon(v[k2][1], "60px", v[k2][2], true)))
				    		:done()
				end
		    end
		end
    end
    
    return frame:preprocess(tostring(divNode))
end

function p.getItemSource(frame)
	local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
		
	local libGift     = require('Module:GiftData')
	local get         = require ('Module:ItemData/getter')
	local recipe_data = require ('Module:RecipeData/data')
	local loot_data   = require ('Module:ItemData/loot')
	local gifts_data  = require ('Module:GiftData/gifts')
	local boss_data   = require ('Module:BossData/data')
	local item_data   = require ('Module:ItemData/data')
	local gift_data   = require ('Module:GiftData/data')
	local gm_data     = require ('Module:GameModes/data')
	local item        = args['item'] or args[1]
	local i           = 0
	local l           = 0
	local m           = 0
	local n           = 0
	local str         = ""
	local checkpoint  = ""
	local checkpoint2 = nil
	local checkpoint3 = nil
	local checkpoint4 = nil
	local checkpoint5 = nil
	local checkpoint6 = nil
	local checkpoint7 = nil
	
	local result     = get["source"](item)
	local data       = recipe_data[item]
	
	if (result ~= "Неизвестно") then
		str = str .. mw.ustring.format('<h2>Способ получения</h2>')
	end
	
	if (result == "Добыча") then
		str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
		str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Крафт") then
		str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div></div>')
	elseif (result == "Сундук") then
		str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(loot_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
						for k3, v3 in pairs(item_data[k2]["loot"]) do
							if (v3[1] == k) then
								i = i + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Босс") then
		str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
		for k, v in pairs(boss_data) do
			for k2, v2 in pairs(boss_data[k]["loot"]) do
				if (v2[1] == item) then
					i = i + 1
					str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Награда") then
		str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
		for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
			for k2, v2 in pairs(gm_data[k]["rewards"]) do
				if gm_data[k]["type"] == 1 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
								if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
									i = i + 1
									if checkpoint ~= gm_data[k]["type"] then
										checkpoint = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 2 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						if k2 == "clan" then
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
									if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
										i = i + 1
										if checkpoint2 ~= gm_data[k]["type"] then
											str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
										end
									end
								end
							end
						else
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
									i = i + 1
									if checkpoint2 ~= gm_data[k]["type"] then
										checkpoint2 = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 3 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint3 ~= gm_data[k]["type"] then
									checkpoint3 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 4 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint4 ~= gm_data[k]["type"] then
									checkpoint4 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 5 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint5 ~= gm_data[k]["type"] then
									checkpoint5 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 6 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint6 ~= gm_data[k]["type"] then
									checkpoint6 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 7 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint7 ~= gm_data[k]["type"] then
									checkpoint7 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
								end
							end
						end
					end
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Подарок") then
		str = str .. mw.ustring.format('<div class="gift" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(gifts_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in lib.pairsByAlphabeticalKeys(gift_data) do
						for k3, v3 in pairs(gift_data[k2]["gifts"]) do
							if (v3[1] == k) then
								i = i + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', libGift.getGiftIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Добыча/Крафт") then
		str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
		str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div></div>')
	elseif (result == "Крафт/Сундук") then
		str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div></div>')
		str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(loot_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
						for k3, v3 in pairs(item_data[k2]["loot"]) do
							if (v3[1] == k) then
								l = l + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Крафт/Босс") then
		str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div></div>')
		str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
		for k, v in pairs(boss_data) do
			for k2, v2 in pairs(boss_data[k]["loot"]) do
				if (v2[1] == item) then
					l = l + 1
					str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Крафт/Награда") then
		str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div></div>')
		str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
		for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
			for k2, v2 in pairs(gm_data[k]["rewards"]) do
				if gm_data[k]["type"] == 1 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
								if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
									l = l + 1
									if checkpoint ~= gm_data[k]["type"] then
										checkpoint = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 2 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						if k2 == "clan" then
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
									if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
										l = l + 1
										if checkpoint2 ~= gm_data[k]["type"] then
											checkpoint2 = gm_data[k]["type"]
											str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
										end
									end
								end
							end
						else
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
									l = l + 1
									if checkpoint2 ~= gm_data[k]["type"] then
										checkpoint2 = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 3 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint3 ~= gm_data[k]["type"] then
									checkpoint3 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 4 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint4 ~= gm_data[k]["type"] then
									checkpoint4 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 5 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint5 ~= gm_data[k]["type"] then
									checkpoint5 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 6 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint6 ~= gm_data[k]["type"] then
									checkpoint6 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 7 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint7 ~= gm_data[k]["type"] then
									checkpoint7 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
								end
							end
						end
					end
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Награда/Сундук") then
		str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
		for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
			for k2, v2 in pairs(gm_data[k]["rewards"]) do
				if gm_data[k]["type"] == 1 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
								if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
									i = i + 1
									if checkpoint ~= gm_data[k]["type"] then
										checkpoint = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 2 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						if k2 == "clan" then
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
									if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
										i = i + 1
										if checkpoint2 ~= gm_data[k]["type"] then
											checkpoint2 = gm_data[k]["type"]
											str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
										end
									end
								end
							end
						else
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
									i = i + 1
									if checkpoint2 ~= gm_data[k]["type"] then
										checkpoint2 = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 3 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint3 ~= gm_data[k]["type"] then
									checkpoint3 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 4 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint4 ~= gm_data[k]["type"] then
									checkpoint4 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 5 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint5 ~= gm_data[k]["type"] then
									checkpoint5 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 6 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint6 ~= gm_data[k]["type"] then
									checkpoint6 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 7 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint7 ~= gm_data[k]["type"] then
									checkpoint7 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
								end
							end
						end
					end
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(loot_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
						for k3, v3 in pairs(item_data[k2]["loot"]) do
							if (v3[1] == k) then
								l = l + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Награда/Босс") then
		str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
		for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
			for k2, v2 in pairs(gm_data[k]["rewards"]) do
				if gm_data[k]["type"] == 1 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
								if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
									i = i + 1
									if checkpoint ~= gm_data[k]["type"] then
										checkpoint = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 2 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						if k2 == "clan" then
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
									if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
										i = i + 1
										if checkpoint2 ~= gm_data[k]["type"] then
											checkpoint2 = gm_data[k]["type"]
											str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
										end
									end
								end
							end
						else
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
									i = i + 1
									if checkpoint2 ~= gm_data[k]["type"] then
										checkpoint2 = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 3 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint3 ~= gm_data[k]["type"] then
									checkpoint3 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 4 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint4 ~= gm_data[k]["type"] then
									checkpoint4 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 5 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint5 ~= gm_data[k]["type"] then
									checkpoint5 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 6 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint6 ~= gm_data[k]["type"] then
									checkpoint6 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 7 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint7 ~= gm_data[k]["type"] then
									checkpoint7 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
								end
							end
						end
					end
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
		for k, v in pairs(boss_data) do
			for k2, v2 in pairs(boss_data[k]["loot"]) do
				if (v2[1] == item) then
					l = l + 1
					str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Добыча/Сундук") then
		str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
		str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(loot_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in pairs(item_data) do
						for k3, v3 in pairs(item_data[k2]["loot"]) do
							if (v3[1] == k) then
								i = i + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Добыча/Босс") then
		str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
		str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
		for k, v in pairs(boss_data) do
			for k2, v2 in pairs(boss_data[k]["loot"]) do
				if (v2[1] == item) then
					l = l + 1
					str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Добыча/Подарок") then
		str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
		str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="gift" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(gifts_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in lib.pairsByAlphabeticalKeys(gift_data) do
						for k3, v3 in pairs(gift_data[k2]["gifts"]) do
							if (v3[1] == k) then
								i = i + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', libGift.getGiftIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Сундук/Босс") then
		str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(loot_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in pairs(item_data) do
						for k3, v3 in pairs(item_data[k2]["loot"]) do
							if (v3[1] == k) then
								i = i + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
		for k, v in pairs(boss_data) do
			for k2, v2 in pairs(boss_data[k]["loot"]) do
				if (v2[1] == item) then
					l = l + 1
					str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Добыча/Крафт/Сундук") then
		str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
		str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div></div>')
		str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(loot_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in pairs(item_data) do
						for k3, v3 in pairs(item_data[k2]["loot"]) do
							if (v3[1] == k) then
								i = i + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Добыча/Крафт/Подарок") then
		str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
		str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div></div>')
		str = str .. mw.ustring.format('<div class="gift" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(gifts_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in lib.pairsByAlphabeticalKeys(gift_data) do
						for k3, v3 in pairs(gift_data[k2]["gifts"]) do
							if (v3[1] == k) then
								i = i + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', libGift.getGiftIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Крафт/Награда/Сундук") then
		str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div></div>')
		str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
		for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
			for k2, v2 in pairs(gm_data[k]["rewards"]) do
				if gm_data[k]["type"] == 1 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
								if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
									gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
								end
								if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
								end
								
								if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item)then
									l = l + 1
									if checkpoint ~= gm_data[k]["type"] then
										checkpoint = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 2 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						if k2 == "clan" then
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
									if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
										gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
									end
									if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
										gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
									end
									
									if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
										l = l + 1
										if checkpoint2 ~= gm_data[k]["type"] then
											checkpoint2 = gm_data[k]["type"]
											str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
										end
									end
								end
							end
						else
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
								end
								if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
								
								if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
									l = l + 1
									if checkpoint2 ~= gm_data[k]["type"] then
										checkpoint2 = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 3 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint3 ~= gm_data[k]["type"] then
									checkpoint3 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 4 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint4 ~= gm_data[k]["type"] then
									checkpoint4 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 5 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint5 ~= gm_data[k]["type"] then
									checkpoint5 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 6 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint6 ~= gm_data[k]["type"] then
									checkpoint6 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 7 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint7 ~= gm_data[k]["type"] then
									checkpoint7 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
								end
							end
						end
					end
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(loot_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
						for k3, v3 in pairs(item_data[k2]["loot"]) do
							if (v3[1] == k) then
								m = m + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if m == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Крафт/Награда/Босс") then
		str = str .. mw.ustring.format('<div class="recipes" style="width:fit-content; width: -moz-fit-content">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
		for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
			for k2, v2 in pairs(gm_data[k]["rewards"]) do
				if gm_data[k]["type"] == 1 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
								if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
									l = l + 1
									if checkpoint ~= gm_data[k]["type"] then
										checkpoint = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 2 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						if k2 == "clan" then
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
									if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
										l = l + 1
										if checkpoint2 ~= gm_data[k]["type"] then
											checkpoint2 = gm_data[k]["type"]
											str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
										end
									end
								end
							end
						else
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
									l = l + 1
									if checkpoint2 ~= gm_data[k]["type"] then
										checkpoint2 = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 3 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint3 ~= gm_data[k]["type"] then
									checkpoint3 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 4 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint4 ~= gm_data[k]["type"] then
									checkpoint4 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 5 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint5 ~= gm_data[k]["type"] then
									checkpoint5 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 6 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint6 ~= gm_data[k]["type"] then
									checkpoint6 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 7 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint7 ~= gm_data[k]["type"] then
									checkpoint7 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
								end
							end
						end
					end
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
		for k, v in pairs(boss_data) do
			for k2, v2 in pairs(boss_data[k]["loot"]) do
				if (v2[1] == item) then
					m = m + 1
					str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
				end
			end
		end
		if m == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Награда/Сундук/Босс") then
		str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
		for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
			for k2, v2 in pairs(gm_data[k]["rewards"]) do
				if gm_data[k]["type"] == 1 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
								if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
									i = i + 1
									if checkpoint ~= gm_data[k]["type"] then
										checkpoint = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 2 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						if k2 == "clan" then
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
									if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
										i = i + 1
										if checkpoint2 ~= gm_data[k]["type"] then
											checkpoint2 = gm_data[k]["type"]
											str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
										end
									end
								end
							end
						else
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
									i = i + 1
									if checkpoint2 ~= gm_data[k]["type"] then
										checkpoint2 = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 3 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint3 ~= gm_data[k]["type"] then
									checkpoint3 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 4 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint4 ~= gm_data[k]["type"] then
									checkpoint4 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 5 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint5 ~= gm_data[k]["type"] then
									checkpoint5 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 6 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint6 ~= gm_data[k]["type"] then
									checkpoint6 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 7 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								i = i + 1
								if checkpoint7 ~= gm_data[k]["type"] then
									checkpoint7 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
								end
							end
						end
					end
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(loot_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in pairs(item_data) do
						for k3, v3 in pairs(item_data[k2]["loot"]) do
							if (v3[1] == k) then
								l = l + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
		for k, v in pairs(boss_data) do
			for k2, v2 in pairs(boss_data[k]["loot"]) do
				if (v2[1] == item) then
					m = m + 1
					str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
				end
			end
		end
		if m == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Добыча/Сундук/Подарок") then
		str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
		str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(loot_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in pairs(item_data) do
						for k3, v3 in pairs(item_data[k2]["loot"]) do
							if (v3[1] == k) then
								i = i + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="gift" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(gifts_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in lib.pairsByAlphabeticalKeys(gift_data) do
						for k3, v3 in pairs(gift_data[k2]["gifts"]) do
							if (v3[1] == k) then
								i = i + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', libGift.getGiftIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Крафт/Сундук/Босс") then
		str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div></div>')
		str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(loot_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
						for k3, v3 in pairs(item_data[k2]["loot"]) do
							if (v3[1] == k) then
								l = l + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
		for k, v in pairs(boss_data) do
			for k2, v2 in pairs(boss_data[k]["loot"]) do
				if (v2[1] == item) then
					m = m + 1
					str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
				end
			end
		end
		str = str .. mw.ustring.format('</div>')
		if m == 0 then
			str = str .. "Нет данных"
		end
	elseif (result == "Крафт/Награда/Босс/Сундук") then
		str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div></div>')
		str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
		for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
			for k2, v2 in pairs(gm_data[k]["rewards"]) do
				if gm_data[k]["type"] == 1 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
								if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
									l = l + 1
									if checkpoint ~= gm_data[k]["type"] then
										checkpoint = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 2 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						if k2 == "clan" then
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
									if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
										l = l + 1
										if checkpoint2 ~= gm_data[k]["type"] then
											checkpoint2 = gm_data[k]["type"]
											str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
										end
									end
								end
							end
						else
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
									l = l + 1
									if checkpoint2 ~= gm_data[k]["type"] then
										checkpoint2 = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 3 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint3 ~= gm_data[k]["type"] then
									checkpoint3 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 4 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint4 ~= gm_data[k]["type"] then
									checkpoint4 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 5 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint5 ~= gm_data[k]["type"] then
									checkpoint5 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 6 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint6 ~= gm_data[k]["type"] then
									checkpoint6 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 7 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint7 ~= gm_data[k]["type"] then
									checkpoint7 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
								end
							end
						end
					end
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
		for k, v in pairs(boss_data) do
			for k2, v2 in pairs(boss_data[k]["loot"]) do
				if (v2[1] == item) then
					m = m + 1
					str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
				end
			end
		end
		if m == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(loot_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in lib.pairsByAlphabeticalKeys(item_data) do
						for k3, v3 in pairs(item_data[k2]["loot"]) do
							if (v3[1] == k) then
								n = n + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if n == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Магазин") then
		str = str .. mw.ustring.format('<div class="shop" style="width:fit-content; width: -moz-fit-content">')
		str = str .. mw.ustring.format('[[Файл:icon_shop.png|x100px|ссылка=Магазин]]', "Магазин")
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Магазин/Крафт") then
		str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div></div>')
		str = str .. mw.ustring.format('<div class="shop" style="width:fit-content; width: -moz-fit-content">')
		str = str .. mw.ustring.format('[[Файл:icon_shop.png|x100px|ссылка=Магазин]]', "Магазин")
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Магазин/Крафт/Награда") then
		str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div></div>')
		str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
		for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
			for k2, v2 in pairs(gm_data[k]["rewards"]) do
				if gm_data[k]["type"] == 1 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
								if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
									gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
								end
								if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
								end
								
								if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item)then
									l = l + 1
									if checkpoint ~= gm_data[k]["type"] then
										checkpoint = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 2 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						if k2 == "clan" then
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
									if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
										gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
									end
									if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
										gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
									end
									
									if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
										l = l + 1
										if checkpoint2 ~= gm_data[k]["type"] then
											checkpoint2 = gm_data[k]["type"]
											str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
										end
									end
								end
							end
						else
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
								end
								if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
								
								if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
									l = l + 1
									if checkpoint2 ~= gm_data[k]["type"] then
										checkpoint2 = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 3 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint3 ~= gm_data[k]["type"] then
									checkpoint3 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 4 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint4 ~= gm_data[k]["type"] then
									checkpoint4 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 5 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint5 ~= gm_data[k]["type"] then
									checkpoint5 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 6 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint6 ~= gm_data[k]["type"] then
									checkpoint6 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 7 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint7 ~= gm_data[k]["type"] then
									checkpoint7 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
								end
							end
						end
					end
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="shop" style="width:fit-content; width: -moz-fit-content">')
		str = str .. mw.ustring.format('[[Файл:icon_shop.png|x100px|ссылка=Магазин]]', "Магазин")
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Магазин/Крафт/Награда/Сундук") then
		str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div></div>')
		str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
		for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
			for k2, v2 in pairs(gm_data[k]["rewards"]) do
				if gm_data[k]["type"] == 1 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
								if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
									gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
								end
								if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
								end
								
								if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item)then
									l = l + 1
									if checkpoint ~= gm_data[k]["type"] then
										checkpoint = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 2 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						if k2 == "clan" then
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
									if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
										gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
									end
									if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
										gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
									end
									
									if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
										l = l + 1
										if checkpoint2 ~= gm_data[k]["type"] then
											checkpoint2 = gm_data[k]["type"]
											str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
										end
									end
								end
							end
						else
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
								end
								if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
								
								if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
									l = l + 1
									if checkpoint2 ~= gm_data[k]["type"] then
										checkpoint2 = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 3 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint3 ~= gm_data[k]["type"] then
									checkpoint3 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 4 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint4 ~= gm_data[k]["type"] then
									checkpoint4 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 5 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint5 ~= gm_data[k]["type"] then
									checkpoint5 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 6 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint6 ~= gm_data[k]["type"] then
									checkpoint6 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 7 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint7 ~= gm_data[k]["type"] then
									checkpoint7 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
								end
							end
						end
					end
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(loot_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in pairs(item_data) do
						for k3, v3 in pairs(item_data[k2]["loot"]) do
							if (v3[1] == k) then
								l = l + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="shop" style="width:fit-content; width: -moz-fit-content">')
		str = str .. mw.ustring.format('[[Файл:icon_shop.png|x100px|ссылка=Магазин]]', "Магазин")
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Добыча/Крафт/Сундук/Подарок") then
		str = str .. mw.ustring.format('<div class="loot" style="width:fit-content; width: -moz-fit-content">')
		str = str .. mw.ustring.format('[[Файл:icon_loot.png|x80px|ссылка=%s]]', "Добыча и экипировка")
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div></div>')
		str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(loot_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in pairs(item_data) do
						for k3, v3 in pairs(item_data[k2]["loot"]) do
							if (v3[1] == k) then
								i = i + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="gift" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(gifts_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in lib.pairsByAlphabeticalKeys(gift_data) do
						for k3, v3 in pairs(gift_data[k2]["gifts"]) do
							if (v3[1] == k) then
								i = i + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', libGift.getGiftIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
	elseif (result == "Магазин/Крафт/Награда/Сундук/Босс") then
		str = str .. mw.ustring.format('<div class="recipes"><div class="owl-carousel owl-theme recipes-carousel">')
		if data ~= nil then
			for k, v in ipairs(data) do
				i = i + 1
				str = str .. mw.ustring.format('{{RecipeImage|%s|%d}}', item, k)
			end
		end
		if i == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div></div>')
		str = str .. mw.ustring.format('<div class="awards" style="width:fit-content; width: -moz-fit-content">')
		for k, v in lib.pairsByAlphabeticalKeys(gm_data) do
			for k2, v2 in pairs(gm_data[k]["rewards"]) do
				if gm_data[k]["type"] == 1 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							for k5, v5 in pairs(gm_data[k]["rewards"][k2][k3][k4]) do
								if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
									gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
								end
								if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
								end
								
								if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item)then
									l = l + 1
									if checkpoint ~= gm_data[k]["type"] then
										checkpoint = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_event.png|x100px|ссылка=%s]]', "События")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 2 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						if k2 == "clan" then
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								for k5, v5 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3][k4]) do
									if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Изумруды" then
										gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Зеленые осколки"
									end
									if gm_data[k]["rewards"][k2][k3][k4][k5][1] == "Ранги" then
										gm_data[k]["rewards"][k2][k3][k4][k5][1] = "Очки гилдования"
									end
									
									if (gm_data[k]["rewards"][k2][k3][k4][k5][1] == item) then
										l = l + 1
										if checkpoint2 ~= gm_data[k]["type"] then
											checkpoint2 = gm_data[k]["type"]
											str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
										end
									end
								end
							end
						else
							for k4, v4 in pairs(gm_data[k]["rewards"][k2][k3]) do
								if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
								end
								if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
								
								if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
									l = l + 1
									if checkpoint2 ~= gm_data[k]["type"] then
										checkpoint2 = gm_data[k]["type"]
										str = str .. mw.ustring.format('[[Файл:icon_siege.png|x100px|ссылка=%s]]', "Осады")
									end
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 3 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint3 ~= gm_data[k]["type"] then
									checkpoint3 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_league.png|x100px|ссылка=%s]]', "Лига Чемпионов")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 4 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint4 ~= gm_data[k]["type"] then
									checkpoint4 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_dragon_draft.png|100px|ссылка=%s]]', "Драконий Драфт")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 5 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint5 ~= gm_data[k]["type"] then
									checkpoint5 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_hunt.png|98px|ссылка=%s]]', "Королевская охота")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 6 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in ipairs(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint6 ~= gm_data[k]["type"] then
									checkpoint6 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_lairs.png|80px|ссылка=%s]]', "Логова")
								end
							end
						end
					end
				elseif gm_data[k]["type"] == 7 then
					for k3, v3 in pairs(gm_data[k]["rewards"][k2]) do
						for k4, v4 in lib.pairsByAlphabeticalKeys(gm_data[k]["rewards"][k2][k3]) do
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Изумруды" then
								gm_data[k]["rewards"][k2][k3][k4][1] = "Зеленые осколки"
							end
							if gm_data[k]["rewards"][k2][k3][k4][1] == "Ранги" then
									gm_data[k]["rewards"][k2][k3][k4][1] = "Очки гилдования"
								end
							
							if (gm_data[k]["rewards"][k2][k3][k4][1] == item) then
								l = l + 1
								if checkpoint7 ~= gm_data[k]["type"] then
									checkpoint7 = gm_data[k]["type"]
									str = str .. mw.ustring.format('[[Файл:icon_labyrinth.png|100px|ссылка=%s]]', "Лабиринт Богов")
								end
							end
						end
					end
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="bosses" style="width:fit-content; width: -moz-fit-content">')
		for k, v in pairs(boss_data) do
			for k2, v2 in pairs(boss_data[k]["loot"]) do
				if (v2[1] == item) then
					m = m + 1
					str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
				end
			end
		end
		if m == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="chests" style="width:fit-content; width: -moz-fit-content">')
		for k, v in ipairs(loot_data) do
			for k1, v1 in ipairs(v) do
				if (v[k1][1] == item) then
					for k2, v2 in pairs(item_data) do
						for k3, v3 in pairs(item_data[k2]["loot"]) do
							if (v3[1] == k) then
								l = l + 1
								if checkpoint ~= k2 then
									checkpoint = k2
									str = str .. mw.ustring.format('%s', p.getItemIcon(k2, "75px"))
								end
							end
						end
					end
				end
			end
		end
		if l == 0 then
			str = str .. "Нет данных"
		end
		str = str .. mw.ustring.format('</div>')
		str = str .. mw.ustring.format('<div class="shop" style="width:fit-content; width: -moz-fit-content">')
		str = str .. mw.ustring.format('[[Файл:icon_shop.png|x100px|ссылка=Магазин]]', "Магазин")
		str = str .. mw.ustring.format('</div>')
	end

	return frame:preprocess(tostring(str))	
end

function p.getItemSummon(frame)
	local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
		
	local get       = require ('Module:ItemData/getter')
	local boss_data = require ('Module:BossData/data')
	local item      = args['item'] or args[1]
	local summon    = "summon"
	local str       = ""
	
	local result    = get[summon](item)
	
	if (result == true) then
		str = str .. mw.ustring.format('<h2>Используется для вызова</h2><div class="bosses" style="width:fit-content; width: -moz-fit-content">')
		for k, v in pairs(boss_data) do
			if (boss_data[k]["summon"] == item) then
				str = str .. mw.ustring.format('[[Файл:%s|100px|ссылка=%s/босс]]', boss_data[k]["icon"], k)
			end
		end
		str = str .. mw.ustring.format('</div>')
	end
	
	return frame:preprocess(tostring(str))
end

function p.checkSpecialItemUsedInCraft(item)
	local chunks = {}
	local str = ""
	
	if item == "Кольцо охотника Ⅰ/1" or item == "Кольцо охотника Ⅰ/2" or item == "Кольцо охотника Ⅰ/3" then
		return false
	end
	
	for substring in item:gmatch("%W+ ") do
	   table.insert(chunks, substring)
	end
	
	str = tostring(chunks[1])
	str = string.sub(str, 0, str:len()-1)
	
	if str == "Кольцо охотника" then
		return true
	else
		return false
	end
end

function p.getItemUsedInCraft(frame)
	local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
		
	local recipe_data = require ('Module:RecipeData/data')
	local unit_data   = require ('Module:UnitData/data')
	local item        = args['item'] or args[1]
	local str         = ""
	local checkpoint  = nil
	
	if p.checkItemUsedInCraft(item) or p.checkSpecialItemUsedInCraft(item) then
		str = str .. mw.ustring.format('<h2>Используется в крафте</h2><div class="used-in-craft" style="width:fit-content; width: -moz-fit-content">')
	end
	
	for k, v in lib.pairsByAlphabeticalKeys(recipe_data) do
		for k2, v2 in ipairs(recipe_data[k]) do
			for k3, v3 in ipairs(recipe_data[k][k2]["ingredients"]) do
				if (recipe_data[k][k2]["ingredients"][k3][1] == item) then
					if unit_data[item] ~= nil then
						if checkpoint ~= k then
							checkpoint = k
							str = str .. mw.ustring.format('%s', p.getUnitIcon(k, "50px"))
						end
					else
						if checkpoint ~= k then
							checkpoint = k
							str = str .. mw.ustring.format('%s', p.getItemIcon(k, "50px"))
						end
					end
				end
			end
		end
	end
	
	if p.checkSpecialItemUsedInCraft(item) then
		str = str .. mw.ustring.format('%s', p.getItemIcon("Кольцо", "50px"))
	end
	
	if p.checkItemUsedInCraft(item) or p.checkSpecialItemUsedInCraft(item) then
		str = str .. mw.ustring.format('</div>')
	end
	
	return frame:preprocess(tostring(str))
end

function p.checkItemUsedInCraft(item)
	local recipe_data = require ('Module:RecipeData/data')
	
	for k, v in lib.pairsByAlphabeticalKeys(recipe_data) do
		for k2, v2 in ipairs(recipe_data[k]) do
			for k3, v3 in ipairs(recipe_data[k][k2]["ingredients"]) do
				if (recipe_data[k][k2]["ingredients"][k3][1] == item) then
					return true
				end
			end
		end
	end
end

function p.getItemUsedToOpen(frame)
	local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
		
	local item_data  = require ('Module:ItemData/data')
	local item       = args['item'] or args[1]
	local str        = ""
	local checkpoint = nil
	
	if p.checkItemUsedToOpen(item) then
		str = str .. mw.ustring.format('<h2>Используется для открытия</h2><div class="used-in-craft" style="width:fit-content; width: -moz-fit-content">')
	end
	
	for k, v in lib.pairsByAlphabeticalKeys(item_data) do
		if item_data[k]["key"] ~= nil then
			if (item_data[k]["key"] == p.getKeyId(item)) then
				if checkpoint ~= k then
					checkpoint = k
					str = str .. mw.ustring.format('%s', p.getItemIcon(k, "50px"))
				end
			end
		end
	end
	
	if p.checkItemUsedToOpen(item) then
		str = str .. mw.ustring.format('</div>')
	end
	
	return frame:preprocess(tostring(str))
end

function p.checkItemUsedToOpen(item)
	local item_data = require ('Module:ItemData/data')
	
	for k, v in lib.pairsByAlphabeticalKeys(item_data) do
		if item_data[k]["key"] ~= nil then
			if (item_data[k]["key"] == p.getKeyId(item)) then
				return true
			end
		end
	end
end

function p.getKeyId(item)
	local key_data = require ('Module:ItemData/keys')
	
	for k, v in lib.pairsByAlphabeticalKeys(key_data) do
		if (v == item) then
			return k
		end
	end
end

function p.getItemIcon(item, size, count, tooltip, link)
	local item_data    = require ('Module:ItemData/data')
	local unit_data    = require ('Module:UnitData/data')
	local rarity_data  = require ('Module:ItemData/rarities')
	local rarity, icon = ""
	local unit = false
	
	if size == nil then
		size = "30px"
	end
	
	if count == nil then
		count = ""
	end
	
	if tooltip == nil then
		tooltip = "";
	else
		tooltip = "true";
	end
	
	if link == nil then
		link = item
	end
	
	if item == "Нет шлема" then
		return mw.ustring.format('{{ItemIcon|Нет шлема|no_helmet.png|обычный|size=40px|link=false}}')
	elseif item == "Нет доспеха" then
		return mw.ustring.format('{{ItemIcon|Нет доспеха|no_armor.png|обычный|size=40px|link=false}}')
	elseif item == "Нет оружия" then
		return mw.ustring.format('{{ItemIcon|Нет оружия|no_weapon.png|обычный|size=40px|link=false}}')
	elseif item == "Нет обуви" then
		return mw.ustring.format('{{ItemIcon|Нет обуви|no_shoes.png|обычный|size=40px|link=false}}')
	elseif item == "Нет кольца" then
		return mw.ustring.format('{{ItemIcon|Нет кольца|no_ring.png|обычный|size=40px|link=false}}')
	elseif item == "Нет ожерелья" then
		return mw.ustring.format('{{ItemIcon|Нет ожерелья|no_necklace.png|обычный|size=40px|link=false}}')
	end
	
	if lib.lookup(item_data, item) then
		icon = item_data[item]["icon"]
	elseif lib.lookup(unit_data, item) then
		icon = unit_data[item]["icon"]
		unit = true;
	else
		return item
	end
	
	if unit == false then
		if rarity_data[item_data[item]["rarity"]] and rarity_data[item_data[item]["rarity"]] ~= nil then
			rarity = rarity_data[item_data[item]["rarity"]]
		else
			rarity = "обычный"
		end
		
		return mw.ustring.format('{{ItemIcon|%s|%s|%s|size=%s|count=%s|link=%s|tooltip=%s}}', item, icon, rarity, size, count, link, tooltip)
	else
		if rarity_data[unit_data[item]["rarity"]] and rarity_data[unit_data[item]["rarity"]] ~= nil then
			rarity = rarity_data[unit_data[item]["rarity"]]
		else
			rarity = "обычный"
		end
		
		return mw.ustring.format('{{UnitIcon|%s|%s|%s|size=%s|count=%s|link=%s|tooltip=%s}}', item, icon, rarity, size, count, link, tooltip)
	end
end

function p.getIconItem(frame)
	local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
		
	local item_data    = require ('Module:ItemData/data')
	local rarity_data  = require ('Module:ItemData/rarities')
	local rarity, icon, size, count = ""
	
	if args['size'] == nil then
		size = "30px"
	else
		size = args['size']
	end
	
	if args['count'] == nil then
		count = ""
	else
		count = args['count']
	end
	
	if args['link'] == nil then
		link = args['item']
	else
		link = args['link']
	end
	
	if args['caption'] == nil then
		caption = ""
	else
		caption = args['caption']
	end
	
	if args['tooltip'] == nil then
		tooltip = ""
	else
		if args['tooltip'] == "true" then
			tooltip = args['item']
		else
			tooltip = ""
		end
	end
	
	if args['item'] == "Нет шлема" then
		return mw.ustring.format('{{ItemIcon|Нет шлема|no_helmet.png|обычный|size=40px|link=}}')
	elseif args['item'] == "Нет доспеха" then
		return mw.ustring.format('{{ItemIcon|Нет доспеха|no_armor.png|обычный|size=40px|link=}}')
	elseif args['item'] == "Нет оружия" then
		return mw.ustring.format('{{ItemIcon|Нет оружия|no_weapon.png|обычный|size=40px|link=}}')
	elseif args['item'] == "Нет обуви" then
		return mw.ustring.format('{{ItemIcon|Нет обуви|no_shoes.png|обычный|size=40px|link=}}')
	elseif args['item'] == "Нет кольца" then
		return mw.ustring.format('{{ItemIcon|Нет кольца|no_ring.png|обычный|size=40px|link=}}')
	elseif args['item'] == "Нет ожерелья" then
		return mw.ustring.format('{{ItemIcon|Нет ожерелья|no_necklace.png|обычный|size=40px|link=}}')
	end
	
	if lib.lookup(item_data, args['item']) then
		icon = item_data[args['item']]["icon"]
	else
		return args['item']
	end
	
	if rarity_data[item_data[args['item']]["rarity"]] and rarity_data[item_data[args['item']]["rarity"]] ~= nil then
		rarity = rarity_data[item_data[args['item']]["rarity"]]
	else
		rarity = "обычный"
	end
	
	return frame:preprocess(mw.ustring.format('{{ItemIcon|%s|%s|%s|size=%s|count=%s|link=%s|caption=%s|tooltip=%s}}', args['item'], icon, rarity, size, count, link, caption, tooltip))
end

function p.getItemCategories(frame)
	local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
		
	local item_data       = require ('Module:ItemData/data')
	local categories_data = require ('Module:ItemData/categories')
	local item            = args['item'] or args[1]
	local str             = ""
	
	if item_data[item]["categories"] ~= nil then
    	for _, v in ipairs(item_data[item]["categories"]) do
			str = str .. mw.ustring.format('[[Категория:%s]]\n', categories_data[v])
		end
	end
	
	return frame:preprocess(tostring(str))
end

function p.getItemDuplicateLinks(frame)
	local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
		
	local item_data = require ('Module:ItemData/data')
	local hero_data = require ('Module:HeroData/data')
	local boss_data = require ('Module:BossData/data')
	local shop_data = require ('Module:ShopData/data')
	local libHero   = require ('Module:HeroData')
	local libBoss   = require ('Module:BossData')
	local libShop   = require ('Module:ShopData')
	local item      = args['item'] or args[1]
	local i         = 1
	local str       = ''
	local divNode = mw.html.create('div')
	local divNode2 = mw.html.create('div')
	local divNode3 = mw.html.create('div')
	
	divNode
        :newline()
        
    divNode2
    	:addClass('custom-grid')
        :newline()
	
	divNode3
        :cssText('')
        :wikitext(mw.ustring.format('В данном пространстве вики существует несколько страниц с именем - <strong>%s</strong>.', item))
        :newline()
	
	if (item_data[item .. "/1"] ~= nil or item_data[item .. "/2"] ~= nil) or hero_data[item .. "/1"] ~= nil or boss_data[item .. "/1"] ~= nil or shop_data[item .. "/1"] ~= nil then
	
		divNode:node(divNode3):newline()
		
		while i < 10 do
			local divNode4 = mw.html.create('div')
			
			if hero_data[item .. "/" .. i] ~= nil then
	    		divNode4
					:addClass('custom-grid__card')
		            :tag('div')
		            	:cssText('margin: 0 auto;')
		                :wikitext(mw.ustring.format('{{Center|%s}}', libHero.getHeroIcon(item .. "/" .. i, "75px")))
		                :done()
		            :tag('div')
		            	:addClass('custom-grid__header')
		                :wikitext(mw.ustring.format('%s', hero_data[item .. "/" .. i]['info']))
		                :done()
		            :done()
		       divNode2:node(divNode4):newline()
			end
			
			if item_data[item .. "/" .. i] ~= nil then
				divNode4
					:addClass('custom-grid__card')
		            :tag('div')
		                :wikitext(mw.ustring.format('{{Center|%s}}', p.getItemIcon(item .. "/" .. i, "75px")))
		                :done()
		            :tag('div')
		            	:addClass('custom-grid__footer')
		                :wikitext(mw.ustring.format('%s', item_data[item .. "/" .. i]['description']))
		                :done()
		            :done()
		       divNode2:node(divNode4):newline()
			end
			
			if boss_data[item .. "/" .. i] ~= nil then
	    		divNode4
					:addClass('custom-grid-block')
	        		:cssText('text-align: center; display: flex; flex-flow: column wrap;')
		            :tag('div')
		            	:cssText('margin: 0 auto;')
		                :wikitext(mw.ustring.format('{{Center|%s}}', libBoss.getBossIcon(item .. "/" .. i, "75px")))
		                :done()
		            :tag('div')
		            	:cssText('font-family: BeaufortforLoL; color: #649ec0; font-style: italic; margin-top: 5px;')
		                :wikitext()
		                :done()
		            :done()
		       divNode2:node(divNode4):newline()
			end
			
			if shop_data[item .. "/" .. i] ~= nil then
	    		divNode4
					:addClass('custom-grid__card')
		            :tag('div')
		            	:cssText('margin: 0 auto;')
		                :wikitext(mw.ustring.format('{{Center|%s}}', libShop.getLotIcon(item .. "/" .. i, "75px")))
		                :done()
		            :tag('div')
		            	:addClass('custom-grid__footer')
		                :wikitext(mw.ustring.format('%s', shop_data[item .. "/" .. i]['description']))
		                :done()
		            :done()
		       divNode2:node(divNode4):newline()
			end
			
			i = i + 1
		end
		
		divNode:node(divNode2):newline()
	else
		return
	end
	
	return frame:preprocess(tostring(divNode))
end

function p.getItemActivatesHero(frame)
	local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
		
	local hero_data  = require ('Module:HeroData/data')
	local libHero    = require('Module:HeroData')
	local item       = args['item'] or args[1]
	local str        = ""
	local checkpoint = nil
	
	str = str .. mw.ustring.format('<h2>Используется для активации героя</h2><div class="activates-hero" style="width:fit-content; width: -moz-fit-content">')
	
	for k, v in lib.pairsByAlphabeticalKeys(hero_data) do
		if (k == lib.replace(item, "Осколки: ", "") or lib.replace(k, "/1", "") == lib.replace(item, "Осколки: ", "")) then
			str = str .. mw.ustring.format('%s', libHero.getHeroIcon(k, "75px"))
		end
	end
	
	str = str .. mw.ustring.format('</div>')
	
	return frame:preprocess(tostring(str))
end

function p.getItemCategoriesTable(frame)
	local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
		
	local item_data       = require ('Module:ItemData/data')
	local categories_data = require ('Module:ItemData/categories')
	local category        = args['category'] or args[1]
	local items           = {}
    local divNode         = mw.html.create('div')
    
    for k, v in lib.pairsByAlphabeticalKeys(item_data) do
    	if item_data[k]['categories'] ~= nil then
	    	for k1, v1 in ipairs(item_data[k]['categories']) do
	    		if category == categories_data[item_data[k]['categories'][k1]] then
	    			table.insert(items, k)
	    		end
	    	end
	    end
    end
    
    divNode
    	:addClass('custom-grid')
        :newline()
    
    for k1, v1 in lib.pairsByAlphabeticalKeys(items) do
    	local divNode2 = mw.html.create('div')
		
		divNode2
			:addClass('custom-grid__card')
    		:tag('div')
    			:addClass('custom-grid__header')
                :wikitext(mw.ustring.format('%s', item_data[v1]['name']))
                :done()
            :tag('div')
                :wikitext(mw.ustring.format('{{Center|%s}}', p.getItemIcon(v1, "75px", nil, true)))
                :done()
            :tag('div')
            	:addClass('custom-grid__footer')
                :wikitext(mw.ustring.format('%s', item_data[v1]['description']))
                :done()
            :done()
        divNode:node(divNode2):newline()
    end
    
    return frame:preprocess(tostring(divNode))
end

return p