228836 228838

SDQL query


Raw Data
{
    "data": {
        "xzero314": {
            "sdql2-query \n\nlocal BE_SPECIAL = \"Heretic\"\n\nfunction selectRandomPlayer(be_special)\n\n    local players = dm.global_vars:get_var(\"GLOB\"):get_var(\"alive_player_list\")\n    local playerTable = {}\n\n    for _, player in players do\n        local client = player:get_var(\"client\")\n        if not client then continue end\n        local be_special_client = client:get_var(\"prefs\"):get_var(\"be_special\")\n        for _, special in be_special_client do\n            if special == be_special then\n                table.insert(playerTable, player)\n                break\n            end\n        end\n    end\n\n    if #playerTable == 0 then \n        dm.global_proc(\"message_admins\", \"Unable to select a player for the role of \" .. be_special)\n        return \n    end\n\n    local player = playerTable[math.random( #playerTable )]\n    dm.global_proc(\"message_admins\", \"Selected player \" .. dm.global_proc(\"key_name_admin\", player) .. \" for the role of \" .. be_special)\nend\n\nsleep()\nselectRandomPlayer(BE_SPECIAL)": 1,
            "\\": 1,
            "local BE_SPECIAL = \"Heretic\"\n\nfunction selectRandomPlayer(be_special)\n\n    local players = dm.global_vars:get_var(\"GLOB\"):get_var(\"alive_player_list\")\n    local playerTable = {}\n\n    for _, player in players do\n        local client = player:get_var(\"client\")\n        if not client then continue end\n        local be_special_client = client:get_var(\"prefs\"):get_var(\"be_special\")\n        for _, special in be_special_client do\n            if special == be_special then\n                table.insert(playerTable, player)\n                break\n            end\n        end\n    end\n\n    if #playerTable == 0 then \n        dm.global_proc(\"message_admins\", \"Unable to select a player for the role of \" .. be_special)\n        return \n    end\n\n    local player = playerTable[math.random( #playerTable )]\n    dm.global_proc(\"message_admins\", \"Selected player \" .. dm.global_proc(\"key_name_admin\", player) .. \" for the role of \" .. be_special)\nend\n\nsleep()\nselectRandomPlayer(BE_SPECIAL)": 1
        }
    },
    "parser": null,
    "id": 9820678,
    "datetime": {
        "date": "2024-05-14 05:02:32.000000",
        "timezone_type": 3,
        "timezone": "UTC"
    },
    "round": 228837,
    "key": "SDQL query",
    "type": "nested tally",
    "version": 1,
    "json": "{\"data\":{\"xzero314\":{\"sdql2-query \\n\\nlocal BE_SPECIAL = \\\"Heretic\\\"\\n\\nfunction selectRandomPlayer(be_special)\\n\\n    local players = dm.global_vars:get_var(\\\"GLOB\\\"):get_var(\\\"alive_player_list\\\")\\n    local playerTable = {}\\n\\n    for _, player in players do\\n        local client = player:get_var(\\\"client\\\")\\n        if not client then continue end\\n        local be_special_client = client:get_var(\\\"prefs\\\"):get_var(\\\"be_special\\\")\\n        for _, special in be_special_client do\\n            if special == be_special then\\n                table.insert(playerTable, player)\\n                break\\n            end\\n        end\\n    end\\n\\n    if #playerTable == 0 then \\n        dm.global_proc(\\\"message_admins\\\", \\\"Unable to select a player for the role of \\\" .. be_special)\\n        return \\n    end\\n\\n    local player = playerTable[math.random( #playerTable )]\\n    dm.global_proc(\\\"message_admins\\\", \\\"Selected player \\\" .. dm.global_proc(\\\"key_name_admin\\\", player) .. \\\" for the role of \\\" .. be_special)\\nend\\n\\nsleep()\\nselectRandomPlayer(BE_SPECIAL)\":1,\"\\\\\":1,\"local BE_SPECIAL = \\\"Heretic\\\"\\n\\nfunction selectRandomPlayer(be_special)\\n\\n    local players = dm.global_vars:get_var(\\\"GLOB\\\"):get_var(\\\"alive_player_list\\\")\\n    local playerTable = {}\\n\\n    for _, player in players do\\n        local client = player:get_var(\\\"client\\\")\\n        if not client then continue end\\n        local be_special_client = client:get_var(\\\"prefs\\\"):get_var(\\\"be_special\\\")\\n        for _, special in be_special_client do\\n            if special == be_special then\\n                table.insert(playerTable, player)\\n                break\\n            end\\n        end\\n    end\\n\\n    if #playerTable == 0 then \\n        dm.global_proc(\\\"message_admins\\\", \\\"Unable to select a player for the role of \\\" .. be_special)\\n        return \\n    end\\n\\n    local player = playerTable[math.random( #playerTable )]\\n    dm.global_proc(\\\"message_admins\\\", \\\"Selected player \\\" .. dm.global_proc(\\\"key_name_admin\\\", player) .. \\\" for the role of \\\" .. be_special)\\nend\\n\\nsleep()\\nselectRandomPlayer(BE_SPECIAL)\":1}}}",
    "originalUrl": null
}