Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local fileroot = ".\\modules\\ScoreboardServer"
- function make_key(ctx, filename)
- tid = ctx.tournament_id
- home = ctx.home_team
- away = ctx.away_team
- if tid == 2 or tid == 3 or tid == 4 or tid == 400 or tid == 401 or tid == 402 or tid == 403 or tid == 404 or tid == 405 or tid == 406 or tid == 600 or tid == 601 or tid == 602 or tid == 603 or tid == 604 or tid == 605 or tid == 606 or tid == 607 then
- ScoreboardServer = "UCL"
- elseif tid == 5 or tid == 1000 or tid == 1001 or tid == 1002 or tid == 1003 or tid == 1004 or tid == 1005 or tid == 1006 or tid == 1007 or tid == 1008 or tid == 1009 or tid == 1010 or tid == 1011 or tid == 6 then
- ScoreboardServer = "UEL"
- elseif tid == 17 then
- ScoreboardServer = "PremierLeague"
- elseif tid == 19 then
- ScoreboardServer = "LaLiga"
- elseif tid == 18 then
- ScoreboardServer = "SerieA"
- elseif tid == 20 then
- ScoreboardServer = "Ligue1"
- elseif tid == 118 then
- ScoreboardServer = "STSL"
- else
- ScoreboardServer = "None"
- end
- if tid then
- return string.format("%s:%s", ScoreboardServer, filename)
- end
- end
- local function get_filepath(ctx, filename, key)
- if key then
- return string.format("%s\\%s\\%s", fileroot, ScoreboardServer, filename)
- end
- end
- local function trophy_rewrite(ctx, tournament_id)
- log("----- " .. ScoreboardServer)
- end
- local function init(ctx)
- if fileroot:sub(1,1)=='.' then
- fileroot = ctx.sider_dir .. fileroot
- end
- ctx.register("livecpk_make_key", make_key)
- ctx.register("livecpk_get_filepath", get_filepath)
- ctx.register("trophy_rewrite", trophy_rewrite)
- end
- return { init = init }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement