Jump to content

Clean Warp System / Login error


Recommended Posts

Hi,

this is ok, no problems:

 

--[[
    Inizializes:
        The 'Warp' class.
]]
Warp = {};
--[[
    Returns:
        The full warp config.
    Structure:
        [section_key] = {
            ["section"] = "The section name", 
            ["data"] = {
                {["name"] = "The name of the first map", ["warp"] = {[1] = {x_shinsoo, y_shinsoo}, [2] = {x_chunjo, y_chunjo}, [3] = {x_jinno, y_jinno}}, ["price"] = the warp cost, ["min_level"] = the minimum level to enter the map, ["max_level"] = the maximum level to enter the map},
                {["name"] = "The name of the second map", ["warp"] = {[1] = {x_shinsoo, y_shinsoo}, [2] = {x_chunjo, y_chunjo}, [3] = {x_jinno, y_jinno}}, ["price"] = the warp cost, ["min_level"] = the minimum level to enter the map, ["max_level"] = the maximum level to enter the map},
                ..
            }
        },
]]
Warp.GetConfig = function()
    local config = {
        [1] = {
            ["section"] = "Map 1", 
            ["data"] = {
                {["name"] = "Chunjo: Joan",    ["warp"] = {[1] = {["x"] = 604,  ["y"] = 1700}, [2] = {["x"] = 604,  ["y"] = 1700}, [3] = {["x"] = 604,  ["y"] = 1700}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Jinno: Pyungmoo", ["warp"] = {[1] = {["x"] = 9529, ["y"] = 2687}, [2] = {["x"] = 9529, ["y"] = 2687}, [3] = {["x"] = 9529, ["y"] = 2687}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Shinsoo: Yongan", ["warp"] = {[1] = {["x"] = 4771, ["y"] = 9537}, [2] = {["x"] = 4771, ["y"] = 9537}, [3] = {["x"] = 4771, ["y"] = 9537}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500}
            }
        },
        [2] = {
            ["section"] = "Map 2", 
            ["data"] = {
                {["name"] = "Chunjo: Bokjung", ["warp"] = {[1] = {["x"] = 1424, ["y"] = 2399}, [2] = {["x"] = 1424, ["y"] = 2399}, [3] = {["x"] = 1424, ["y"] = 2399}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Jinno: Bakra",    ["warp"] = {[1] = {["x"] = 8669, ["y"] = 2447}, [2] = {["x"] = 8669, ["y"] = 2447}, [3] = {["x"] = 8669, ["y"] = 2447}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Shinsoo: Jayang", ["warp"] = {[1] = {["x"] = 3506, ["y"] = 8806}, [2] = {["x"] = 3506, ["y"] = 8806}, [3] = {["x"] = 3506, ["y"] = 8806}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500}
            }
        },
        [3] = {
            ["section"] = "Neutrale Karten",
            ["data"] = {
                {["name"] = "Tal von Seungryong (Orktal)",     ["warp"] = {[1] = {["x"] = 4021,  ["y"] = 6739},  [2] = {["x"] = 2704,  ["y"] = 7399},  [3] = {["x"] = 3213,  ["y"] = 8080}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Hwang-Tempel",                    ["warp"] = {[1] = {["x"] = 5537,  ["y"] = 1450},  [2] = {["x"] = 5537,  ["y"] = 1450},  [3] = {["x"] = 5537,  ["y"] = 1450}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Grotte der Verbannung (Eingang)", ["warp"] = {[1] = {["x"] = 2843,  ["y"] = 8103},  [2] = {["x"] = 2843,  ["y"] = 8103},  [3] = {["x"] = 2843,  ["y"] = 8103}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Yongbi-Wueste (Große Wueste)",    ["warp"] = {[1] = {["x"] = 2178,  ["y"] = 6272},  [2] = {["x"] = 2219,  ["y"] = 5027},  [3] = {["x"] = 3440,  ["y"] = 5025}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Yongbi-Wueste (Oase)",            ["warp"] = {[1] = {["x"] = 2977,  ["y"] = 5470},  [2] = {["x"] = 2977,  ["y"] = 5470},  [3] = {["x"] = 2977,  ["y"] = 5470}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Berg Sohan (Eisland)",            ["warp"] = {[1] = {["x"] = 4342,  ["y"] = 2906},  [2] = {["x"] = 3752,  ["y"] = 1749},  [3] = {["x"] = 4918,  ["y"] = 1736}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Doyyumhwan (Feuerland)",          ["warp"] = {[1] = {["x"] = 5994,  ["y"] = 7563},  [2] = {["x"] = 5978,  ["y"] = 6222},  [3] = {["x"] = 7307,  ["y"] = 6898}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Lungsam (Geisterwald)",           ["warp"] = {[1] = {["x"] = 2887,  ["y"] = 57},    [2] = {["x"] = 2887,  ["y"] = 57},    [3] = {["x"] = 2887,  ["y"] = 57}},    ["price"] = 12000,     ["min_level"] = 60, ["max_level"] = 500},
                {["name"] = "Lungsam (Roter Wald)",            ["warp"] = {[1] = {["x"] = 11196, ["y"] = 700},   [2] = {["x"] = 11196, ["y"] = 700},   [3] = {["x"] = 11196, ["y"] = 700}},   ["price"] = 12000,     ["min_level"] = 60, ["max_level"] = 500},
                {["name"] = "Schlangenfeld",                   ["warp"] = {[1] = {["x"] = 10590, ["y"] = 7267},  [2] = {["x"] = 10590, ["y"] = 7267},  [3] = {["x"] = 10590, ["y"] = 7267}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Land der Riesen",                 ["warp"] = {[1] = {["x"] = 8283,  ["y"] = 7635},  [2] = {["x"] = 8283,  ["y"] = 7635},  [3] = {["x"] = 8283,  ["y"] = 7635}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Donnerberge",                     ["warp"] = {[1] = {["x"] = 11345, ["y"] = 16548}, [2] = {["x"] = 11345, ["y"] = 16548}, [3] = {["x"] = 11345, ["y"] = 16548}}, ["price"] = 18000,     ["min_level"] = 90, ["max_level"] = 500},
                {["name"] = "Gautamakliff",                    ["warp"] = {[1] = {["x"] = 12263, ["y"] = 16811}, [2] = {["x"] = 12263, ["y"] = 16811}, [3] = {["x"] = 12263, ["y"] = 16811}}, ["price"] = 18000,     ["min_level"] = 90, ["max_level"] = 500},
                {["name"] = "Tempel der Ochao (Eingang)",      ["warp"] = {[1] = {["x"] = 13450, ["y"] = 17011}, [2] = {["x"] = 13450, ["y"] = 17011}, [3] = {["x"] = 13450, ["y"] = 17011}}, ["price"] = 10000,     ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Kap des Drachenfeuers",           ["warp"] = {[1] = {["x"] = 10849, ["y"] = 17843}, [2] = {["x"] = 10849, ["y"] = 17843}, [3] = {["x"] = 10849, ["y"] = 17843}}, ["price"] = 18000,     ["min_level"] = 90, ["max_level"] = 500},
                {["name"] = "Nephritbucht",                    ["warp"] = {[1] = {["x"] = 10496, ["y"] = 15104}, [2] = {["x"] = 10496, ["y"] = 15104}, [3] = {["x"] = 10496, ["y"] = 15104}}, ["price"] = 18000,     ["min_level"] = 90, ["max_level"] = 500},
                {["name"] = "Hafen",                           ["warp"] = {[1] = {["x"] = 0000,  ["y"] = 0000},  [2] = {["x"] = 0000,  ["y"] = 0000},  [3] = {["x"] = 0000,  ["y"] = 0000}},  ["price"] = 999999999, ["min_level"] = 1,  ["max_level"] = 500}
            }
        },
        [4] = {
            ["section"] = "Dungeons",
            ["data"] = {
                {["name"] = "Affendungeon (Hasun Don) leicht",    ["warp"] = {[1] = {["x"] = 4061, ["y"] = 8757}, [2] = {["x"] = 4061, ["y"] = 8757}, [3] = {["x"] = 4061, ["y"] = 8757}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Affendungeon (Jungsun Dong) normal", ["warp"] = {[1] = {["x"] = 3062, ["y"] = 6203}, [2] = {["x"] = 3062, ["y"] = 6203}, [3] = {["x"] = 3062, ["y"] = 6203}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Affendungeon (Sangsun Dong) schwer", ["warp"] = {[1] = {["x"] = 2880, ["y"] = 5407}, [2] = {["x"] = 2880, ["y"] = 5407}, [3] = {["x"] = 2880, ["y"] = 5407}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500}
                {["name"] = "Spinnendungeon (Eingang)",           ["warp"] = {[1] = {["x"] = 3447, ["y"] = 6304}, [2] = {["x"] = 3447, ["y"] = 6304}, [3] = {["x"] = 3447, ["y"] = 6304}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Daemonenturm (Eingang)",             ["warp"] = {[1] = {["x"] = 5906, ["y"] = 1110}, [2] = {["x"] = 5906, ["y"] = 1110}, [3] = {["x"] = 5906, ["y"] = 1110}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500}
            }
        },
    };
    return config;
end -- function
--[[
    Returns:
        An array containing all the existent Warp.GetConfigs' ["section"].
]]
Warp.GetSection = function()
    local section = {};
    local config = Warp.GetConfig();
    for _, data in ipairs(config) do
        table.insert(section, data["section"]);
    end -- for
    return section;
end -- function
--[[
    Returns:
        name, coordinates, price and minimum level of the selected map.
    Explanation:
        The selected map is given by the number inserted in the 'section' argument
        which gets the section_key from the Warp.GetConfig array. (see the Warp.GetConfigs' structure)
]]
Warp.GetBuildSection = function(section)
    local names, warp, price, min_level, max_level = {}, {}, {}, {}, {};
    local data = Warp.GetConfig()[section]["data"];
    for _, subdata in ipairs(data) do
        table.insert(names, subdata["name"]);
        table.insert(warp,  subdata["warp"][pc.get_empire()]);
        table.insert(price, subdata["price"]);
        table.insert(min_level, subdata["min_level"]);
        table.insert(max_level, subdata["max_level"]);
    end -- for
    return names, warp, price, min_level, max_level;
end -- function

And by this, i get Login Error:

--[[
    Inizializes:
        The 'Warp' class.
]]
Warp = {};
--[[
    Returns:
        The full warp config.
    Structure:
        [section_key] = {
            ["section"] = "The section name", 
            ["data"] = {
                {["name"] = "The name of the first map", ["warp"] = {[1] = {x_shinsoo, y_shinsoo}, [2] = {x_chunjo, y_chunjo}, [3] = {x_jinno, y_jinno}}, ["price"] = the warp cost, ["min_level"] = the minimum level to enter the map, ["max_level"] = the maximum level to enter the map},
                {["name"] = "The name of the second map", ["warp"] = {[1] = {x_shinsoo, y_shinsoo}, [2] = {x_chunjo, y_chunjo}, [3] = {x_jinno, y_jinno}}, ["price"] = the warp cost, ["min_level"] = the minimum level to enter the map, ["max_level"] = the maximum level to enter the map},
                ..
            }
        },
]]
Warp.GetConfig = function()
    local config = {
        [1] = {
            ["section"] = "Map 1", 
            ["data"] = {
                {["name"] = "Chunjo: Joan",    ["warp"] = {[1] = {["x"] = 604,  ["y"] = 1700}, [2] = {["x"] = 604,  ["y"] = 1700}, [3] = {["x"] = 604,  ["y"] = 1700}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Jinno: Pyungmoo", ["warp"] = {[1] = {["x"] = 9529, ["y"] = 2687}, [2] = {["x"] = 9529, ["y"] = 2687}, [3] = {["x"] = 9529, ["y"] = 2687}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Shinsoo: Yongan", ["warp"] = {[1] = {["x"] = 4771, ["y"] = 9537}, [2] = {["x"] = 4771, ["y"] = 9537}, [3] = {["x"] = 4771, ["y"] = 9537}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500}
            }
        },
        [2] = {
            ["section"] = "Map 2", 
            ["data"] = {
                {["name"] = "Chunjo: Bokjung", ["warp"] = {[1] = {["x"] = 1424, ["y"] = 2399}, [2] = {["x"] = 1424, ["y"] = 2399}, [3] = {["x"] = 1424, ["y"] = 2399}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Jinno: Bakra",    ["warp"] = {[1] = {["x"] = 8669, ["y"] = 2447}, [2] = {["x"] = 8669, ["y"] = 2447}, [3] = {["x"] = 8669, ["y"] = 2447}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Shinsoo: Jayang", ["warp"] = {[1] = {["x"] = 3506, ["y"] = 8806}, [2] = {["x"] = 3506, ["y"] = 8806}, [3] = {["x"] = 3506, ["y"] = 8806}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500}
            }
        },
        [3] = {
            ["section"] = "Neutrale Karten",
            ["data"] = {
                {["name"] = "Tal von Seungryong (Orktal)",     ["warp"] = {[1] = {["x"] = 4021,  ["y"] = 6739},  [2] = {["x"] = 2704,  ["y"] = 7399},  [3] = {["x"] = 3213,  ["y"] = 8080}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Hwang-Tempel",                    ["warp"] = {[1] = {["x"] = 5537,  ["y"] = 1450},  [2] = {["x"] = 5537,  ["y"] = 1450},  [3] = {["x"] = 5537,  ["y"] = 1450}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Grotte der Verbannung (Eingang)", ["warp"] = {[1] = {["x"] = 2843,  ["y"] = 8103},  [2] = {["x"] = 2843,  ["y"] = 8103},  [3] = {["x"] = 2843,  ["y"] = 8103}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Yongbi-Wueste (Große Wueste)",    ["warp"] = {[1] = {["x"] = 2178,  ["y"] = 6272},  [2] = {["x"] = 2219,  ["y"] = 5027},  [3] = {["x"] = 3440,  ["y"] = 5025}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Yongbi-Wueste (Oase)",            ["warp"] = {[1] = {["x"] = 2977,  ["y"] = 5470},  [2] = {["x"] = 2977,  ["y"] = 5470},  [3] = {["x"] = 2977,  ["y"] = 5470}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Berg Sohan (Eisland)",            ["warp"] = {[1] = {["x"] = 4342,  ["y"] = 2906},  [2] = {["x"] = 3752,  ["y"] = 1749},  [3] = {["x"] = 4918,  ["y"] = 1736}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Doyyumhwan (Feuerland)",          ["warp"] = {[1] = {["x"] = 5994,  ["y"] = 7563},  [2] = {["x"] = 5978,  ["y"] = 6222},  [3] = {["x"] = 7307,  ["y"] = 6898}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Lungsam (Geisterwald)",           ["warp"] = {[1] = {["x"] = 2887,  ["y"] = 57},    [2] = {["x"] = 2887,  ["y"] = 57},    [3] = {["x"] = 2887,  ["y"] = 57}},    ["price"] = 12000,     ["min_level"] = 60, ["max_level"] = 500},
                {["name"] = "Lungsam (Roter Wald)",            ["warp"] = {[1] = {["x"] = 11196, ["y"] = 700},   [2] = {["x"] = 11196, ["y"] = 700},   [3] = {["x"] = 11196, ["y"] = 700}},   ["price"] = 12000,     ["min_level"] = 60, ["max_level"] = 500},
                {["name"] = "Schlangenfeld",                   ["warp"] = {[1] = {["x"] = 10590, ["y"] = 7267},  [2] = {["x"] = 10590, ["y"] = 7267},  [3] = {["x"] = 10590, ["y"] = 7267}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Land der Riesen",                 ["warp"] = {[1] = {["x"] = 8283,  ["y"] = 7635},  [2] = {["x"] = 8283,  ["y"] = 7635},  [3] = {["x"] = 8283,  ["y"] = 7635}},  ["price"] = 1000,      ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Donnerberge",                     ["warp"] = {[1] = {["x"] = 11345, ["y"] = 16548}, [2] = {["x"] = 11345, ["y"] = 16548}, [3] = {["x"] = 11345, ["y"] = 16548}}, ["price"] = 18000,     ["min_level"] = 90, ["max_level"] = 500},
                {["name"] = "Gautamakliff",                    ["warp"] = {[1] = {["x"] = 12263, ["y"] = 16811}, [2] = {["x"] = 12263, ["y"] = 16811}, [3] = {["x"] = 12263, ["y"] = 16811}}, ["price"] = 18000,     ["min_level"] = 90, ["max_level"] = 500},
                {["name"] = "Tempel der Ochao (Eingang)",      ["warp"] = {[1] = {["x"] = 13450, ["y"] = 17011}, [2] = {["x"] = 13450, ["y"] = 17011}, [3] = {["x"] = 13450, ["y"] = 17011}}, ["price"] = 10000,     ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Kap des Drachenfeuers",           ["warp"] = {[1] = {["x"] = 10849, ["y"] = 17843}, [2] = {["x"] = 10849, ["y"] = 17843}, [3] = {["x"] = 10849, ["y"] = 17843}}, ["price"] = 18000,     ["min_level"] = 90, ["max_level"] = 500},
                {["name"] = "Nephritbucht",                    ["warp"] = {[1] = {["x"] = 10496, ["y"] = 15104}, [2] = {["x"] = 10496, ["y"] = 15104}, [3] = {["x"] = 10496, ["y"] = 15104}}, ["price"] = 18000,     ["min_level"] = 90, ["max_level"] = 500},
                {["name"] = "Hafen",                           ["warp"] = {[1] = {["x"] = 0000,  ["y"] = 0000},  [2] = {["x"] = 0000,  ["y"] = 0000},  [3] = {["x"] = 0000,  ["y"] = 0000}},  ["price"] = 999999999, ["min_level"] = 1,  ["max_level"] = 500}
            }
        },
        [4] = {
            ["section"] = "Dungeons",
            ["data"] = {
                {["name"] = "Affendungeon (Hasun Don) leicht",    ["warp"] = {[1] = {["x"] = 4061, ["y"] = 8757}, [2] = {["x"] = 4061, ["y"] = 8757}, [3] = {["x"] = 4061, ["y"] = 8757}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Affendungeon (Jungsun Dong) normal", ["warp"] = {[1] = {["x"] = 3062, ["y"] = 6203}, [2] = {["x"] = 3062, ["y"] = 6203}, [3] = {["x"] = 3062, ["y"] = 6203}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Affendungeon (Sangsun Dong) schwer", ["warp"] = {[1] = {["x"] = 2880, ["y"] = 5407}, [2] = {["x"] = 2880, ["y"] = 5407}, [3] = {["x"] = 2880, ["y"] = 5407}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500}
                {["name"] = "Spinnendungeon (Eingang)",           ["warp"] = {[1] = {["x"] = 3447, ["y"] = 6304}, [2] = {["x"] = 3447, ["y"] = 6304}, [3] = {["x"] = 3447, ["y"] = 6304}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Daemonenturm (Eingang)",             ["warp"] = {[1] = {["x"] = 5906, ["y"] = 1110}, [2] = {["x"] = 5906, ["y"] = 1110}, [3] = {["x"] = 5906, ["y"] = 1110}}, ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500}
            }
        },
        [5] = {
            ["section"] = "Gesperrt",
            ["data"] = {
                {["name"] = "Rotdrachen-Festung",             ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000},  [2] = {["x"] = 0000, ["y"] = 0000},  [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Bruthoehle der Spinnenbaroness", ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000},  [2] = {["x"] = 0000, ["y"] = 0000},  [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Erebos (Bossraum)",              ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000},  [2] = {["x"] = 0000, ["y"] = 0000},  [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Zodiak-Tempel",                  ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000},  [2] = {["x"] = 0000, ["y"] = 0000},  [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 10, ["max_level"] = 500},
                {["name"] = "Nemeres Warte",                  ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000},  [2] = {["x"] = 0000, ["y"] = 0000},  [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 10, ["max_level"] = 500},
                {["name"] = "Verwunschener Wald",             ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000},  [2] = {["x"] = 0000, ["y"] = 0000},  [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "The Devil's Catacomb",           ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000},  [2] = {["x"] = 0000, ["y"] = 0000},  [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Drachenraum",                    ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000},  [2] = {["x"] = 0000, ["y"] = 0000},  [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Meleys Hort",                    ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000},  [2] = {["x"] = 0000, ["y"] = 0000},  [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Schiffsverteidigung",            ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000},  [2] = {["x"] = 0000, ["y"] = 0000},  [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Palast des Drachenkoenig",       ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000},  [2] = {["x"] = 0000, ["y"] = 0000},  [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Anderwelt",                      ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000},  [2] = {["x"] = 0000, ["y"] = 0000},  [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 1,  ["max_level"] = 500},
                {["name"] = "Erloesung",                      ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000},  [2] = {["x"] = 0000, ["y"] = 0000},  [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 1,  ["max_level"] = 500}
            }
        },
        [6] = {
            ["section"] = "Gildenzonen",
            ["data"] = {
                {["name"] = "Chunjo: Waryong",   ["warp"] = {[1] = {["x"] = 2219, ["y"] = 93},   [2] = {["x"] = 2219, ["y"] = 93},   [3] = {["x"] = 2219, ["y"] = 93}},    ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Jinno: Imha",       ["warp"] = {[1] = {["x"] = 2718, ["y"] = 130},  [2] = {["x"] = 2718, ["y"] = 130},  [3] = {["x"] = 2718, ["y"] = 130}},   ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Shinsoo: Jungrang", ["warp"] = {[1] = {["x"] = 1356, ["y"] = 43},   [2] = {["x"] = 1356, ["y"] = 43},   [3] = {["x"] = 1356, ["y"] = 43}},    ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Chunjo: Songpa",    ["warp"] = {[1] = {["x"] = 6144, ["y"] = 3840}, [2] = {["x"] = 6144, ["y"] = 3840}, [3] = {["x"] = 6144, ["y"] = 3840}},  ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Jinno: Daeyam",     ["warp"] = {[1] = {["x"] = 2560, ["y"] = 8192}, [2] = {["x"] = 2560, ["y"] = 8192}, [3] = {["x"] = 2560, ["y"] = 8192}},  ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500},
                {["name"] = "Shinsoo: Miryang",  ["warp"] = {[1] = {["x"] = 2048, ["y"] = 2048}, [2] = {["x"] = 2048, ["y"] = 2048}, [3] = {["x"] = 2048, ["y"] = 2048}},  ["price"] = 1000, ["min_level"] = 1, ["max_level"] = 500}
            }
        },
        [7] = {
            ["section"] = "Yohara",
            ["data"] = {
                {["name"] = "-",  ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000}, [2] = {["x"] = 0000, ["y"] = 0000}, [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 90, ["max_level"] = 500},
                {["name"] = "-",  ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000}, [2] = {["x"] = 0000, ["y"] = 0000}, [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 90, ["max_level"] = 500},
                {["name"] = "-",  ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000}, [2] = {["x"] = 0000, ["y"] = 0000}, [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 90, ["max_level"] = 500},
                {["name"] = "-",  ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000}, [2] = {["x"] = 0000, ["y"] = 0000}, [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 90, ["max_level"] = 500},
                {["name"] = "-",  ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000}, [2] = {["x"] = 0000, ["y"] = 0000}, [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 90, ["max_level"] = 500},
                {["name"] = "-",  ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000}, [2] = {["x"] = 0000, ["y"] = 0000}, [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 90, ["max_level"] = 500},
                {["name"] = "-",  ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000}, [2] = {["x"] = 0000, ["y"] = 0000}, [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 90, ["max_level"] = 500},
                {["name"] = "-",  ["warp"] = {[1] = {["x"] = 0000, ["y"] = 0000}, [2] = {["x"] = 0000, ["y"] = 0000}, [3] = {["x"] = 0000, ["y"] = 0000}}, ["price"] = 999999999, ["min_level"] = 90, ["max_level"] = 500}
            }
        }
    };
    return config;
end -- function
--[[
    Returns:
        An array containing all the existent Warp.GetConfigs' ["section"].
]]
Warp.GetSection = function()
    local section = {};
    local config = Warp.GetConfig();
    for _, data in ipairs(config) do
        table.insert(section, data["section"]);
    end -- for
    return section;
end -- function
--[[
    Returns:
        name, coordinates, price and minimum level of the selected map.
    Explanation:
        The selected map is given by the number inserted in the 'section' argument
        which gets the section_key from the Warp.GetConfig array. (see the Warp.GetConfigs' structure)
]]
Warp.GetBuildSection = function(section)
    local names, warp, price, min_level, max_level = {}, {}, {}, {}, {};
    local data = Warp.GetConfig()[section]["data"];
    for _, subdata in ipairs(data) do
        table.insert(names, subdata["name"]);
        table.insert(warp,  subdata["warp"][pc.get_empire()]);
        table.insert(price, subdata["price"]);
        table.insert(min_level, subdata["min_level"]);
        table.insert(max_level, subdata["max_level"]);
    end -- for
    return names, warp, price, min_level, max_level;
end -- function

First i have Section 1-4

Second 1-7

I don't know, but i think 1-7 is to long for the NPC-Window.

Maybe when i have 1-4 on first side and 5-7 on second side

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.