Advertisement
Guest User

MODULE.LUA

a guest
Aug 12th, 2017
1,382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.71 KB | None | 0 0
  1. -- Credits to Kilay, thnks to Sonofsams (for the scripts of liveloader)
  2. -- and to juce and nesa for sider
  3. -- Works tunnel by Ethan2
  4.  
  5.  
  6. local fileroot = ".\\content\\tunnel"
  7.  
  8. local function make_key(ctx, filename)
  9. if ctx.stadium == 128 and ctx.home_team == 120 then --Juventus
  10. return string.format("%d:%s", 120, filename)
  11. elseif ctx.stadium == 30 and ctx.home_team == 119 then --Inter
  12. return string.format("%d:%s", 119, filename)
  13. elseif ctx.stadium == 21 and ctx.home_team == 327 then --Napoli
  14. return string.format("%d:%s", 327, filename)
  15. elseif ctx.stadium == 30 and ctx.home_team == 121 then --Milan
  16. return string.format("%d:%s", 121, filename)
  17. elseif ctx.stadium == 51 and ctx.home_team == 319 then --Bari
  18. return string.format("%d:%s", 319, filename)
  19. elseif ctx.stadium == 15 and ctx.home_team == 101 then --Arsenal
  20. return string.format("%d:%s", 101, filename)
  21. elseif ctx.stadium == 200 and ctx.home_team == 126 then --Borussia Dortmund
  22. return string.format("%d:%s", 126, filename)
  23. elseif ctx.stadium == 141 and ctx.home_team == 102 then --Chelsea
  24. return string.format("%d:%s", 102, filename)
  25. elseif ctx.stadium == 2 and ctx.home_team == 108 then --Barcellona
  26. return string.format("%d:%s", 108, filename)
  27. elseif ctx.stadium == 95 and ctx.home_team == 109 then --Real Madrid
  28. return string.format("%d:%s", 109, filename)
  29. elseif ctx.stadium == 7 and ctx.home_team == 100 then --Manchester United
  30. return string.format("%d:%s", 100, filename)
  31. elseif ctx.stadium == 110 and ctx.home_team == 103 then --Liverpool
  32. return string.format("%d:%s", 103, filename)
  33. elseif ctx.stadium == 94 and ctx.home_team == 173 then --Manchester City
  34. return string.format("%d:%s", 173, filename)
  35. elseif ctx.stadium == 109 and ctx.home_team == 204 then --Leicester City
  36. return string.format("%d:%s", 204, filename)
  37. elseif ctx.stadium == 131 and ctx.home_team == 191 then --Benfica Lisbona
  38. return string.format("%d:%s", 191, filename)
  39. elseif ctx.stadium == 187 and ctx.home_team == 116 then --Ajax Amsterdam
  40. return string.format("%d:%s", 116, filename)
  41. elseif ctx.stadium == 70 and ctx.home_team == 113 then --Olympique Marseille
  42. return string.format("%d:%s", 113, filename)
  43. elseif ctx.stadium == 11 and ctx.home_team == 2346 then --Bayern Munich
  44. return string.format("%d:%s", 2346, filename)
  45. elseif ctx.stadium == 140 and ctx.home_team == 114 then --Paris Saint Germain
  46. return string.format("%d:%s", 114, filename)
  47. elseif ctx.stadium == 100 and ctx.home_team == 2300 then --Celtic Glasgow
  48. return string.format("%d:%s", 2300, filename)
  49. elseif ctx.stadium == 117 and ctx.home_team == 4146 then --Eibar
  50. return string.format("%d:%s", 4146, filename)
  51. elseif ctx.stadium == 142 and ctx.home_team == 124 then --Fiorentina
  52. return string.format("%d:%s", 124, filename)
  53. elseif ctx.stadium == 33 and ctx.home_team == 238 then --Palermo
  54. return string.format("%d:%s", 238, filename)
  55. elseif ctx.stadium == 47 and ctx.home_team == 336 then --Verona
  56. return string.format("%d:%s", 336, filename)
  57. elseif ctx.stadium == 47 and ctx.home_team == 188 then --Chievo Verona
  58. return string.format("%d:%s", 188, filename)
  59. elseif ctx.stadium == 132 and ctx.home_team == 125 then --Roma
  60. return string.format("%d:%s", 125, filename)
  61. elseif ctx.stadium == 132 and ctx.home_team == 122 then --Lazio
  62. return string.format("%d:%s", 122, filename)
  63. elseif ctx.stadium == 223 and ctx.home_team == 240 then --Sampdoria
  64. return string.format("%d:%s", 240, filename)
  65. elseif ctx.stadium == 222 and ctx.home_team == 323 then --Genoa
  66. return string.format("%d:%s", 323, filename)
  67. elseif ctx.stadium == 47 and ctx.home_team == 235 then --Empoli
  68. return string.format("%d:%s", 235, filename)
  69. end
  70. end
  71.  
  72.  
  73. local function get_filepath(ctx, filename, key)
  74. if ctx.stadium == 128 and ctx.home_team == 120 then --Juventus
  75. return string.format("%s\\%d\\%s", fileroot, 120, filename)
  76. elseif ctx.stadium == 30 and ctx.home_team == 119 then --Inter
  77. return string.format("%s\\%d\\%s", fileroot, 119, filename)
  78. elseif ctx.stadium == 21 and ctx.home_team == 327 then --Napoli
  79. return string.format("%s\\%d\\%s", fileroot, 327, filename)
  80. elseif ctx.stadium == 30 and ctx.home_team == 121 then --Milan
  81. return string.format("%s\\%d\\%s", fileroot, 121, filename)
  82. elseif ctx.stadium == 51 and ctx.home_team == 319 then --Bari
  83. return string.format("%s\\%d\\%s", fileroot, 319, filename)
  84. elseif ctx.stadium == 15 and ctx.home_team == 101 then --Arsenal
  85. return string.format("%s\\%d\\%s", fileroot, 101, filename)
  86. elseif ctx.stadium == 200 and ctx.home_team == 126 then --Dortmund
  87. return string.format("%s\\%d\\%s", fileroot, 126, filename)
  88. elseif ctx.stadium == 141 and ctx.home_team == 102 then --Chelsea
  89. return string.format("%s\\%d\\%s", fileroot, 102, filename)
  90. elseif ctx.stadium == 2 and ctx.home_team == 108 then --Barcellona
  91. return string.format("%s\\%d\\%s", fileroot, 108, filename)
  92. elseif ctx.stadium == 95 and ctx.home_team == 109 then --Real Madrid
  93. return string.format("%s\\%d\\%s", fileroot, 109, filename)
  94. elseif ctx.stadium == 7 and ctx.home_team == 100 then --Manchester United
  95. return string.format("%s\\%d\\%s", fileroot, 100, filename)
  96. elseif ctx.stadium == 110 and ctx.home_team == 103 then --Liverpool
  97. return string.format("%s\\%d\\%s", fileroot, 103, filename)
  98. elseif ctx.stadium == 94 and ctx.home_team == 173 then --Manchester City
  99. return string.format("%s\\%d\\%s", fileroot, 173, filename)
  100. elseif ctx.stadium == 109 and ctx.home_team == 204 then --Leicester City
  101. return string.format("%s\\%d\\%s", fileroot, 204, filename)
  102. elseif ctx.stadium == 131 and ctx.home_team == 191 then --Benfica Lisbona
  103. return string.format("%s\\%d\\%s", fileroot, 191, filename)
  104. elseif ctx.stadium == 187 and ctx.home_team == 116 then --Ajax Amsterdam
  105. return string.format("%s\\%d\\%s", fileroot, 116, filename)
  106. elseif ctx.stadium == 70 and ctx.home_team == 113 then --Olympique Marseille
  107. return string.format("%s\\%d\\%s", fileroot, 113, filename)
  108. elseif ctx.stadium == 11 and ctx.home_team == 2346 then --Bayern Munich
  109. return string.format("%s\\%d\\%s", fileroot, 2346, filename)
  110. elseif ctx.stadium == 140 and ctx.home_team == 114 then --Paris Saint Germain
  111. return string.format("%s\\%d\\%s", fileroot, 114, filename)
  112. elseif ctx.stadium == 100 and ctx.home_team == 2300 then --Celtic Glasgow
  113. return string.format("%s\\%d\\%s", fileroot, 2300, filename)
  114. elseif ctx.stadium == 117 and ctx.home_team == 4146 then --Eibar
  115. return string.format("%s\\%d\\%s", fileroot, 4146, filename)
  116. elseif ctx.stadium == 142 and ctx.home_team == 124 then --Fiorentina
  117. return string.format("%s\\%d\\%s", fileroot, 124, filename)
  118. elseif ctx.stadium == 33 and ctx.home_team == 238 then --Palermo
  119. return string.format("%s\\%d\\%s", fileroot, 238, filename)
  120. elseif ctx.stadium == 47 and ctx.home_team == 336 then --Verona
  121. return string.format("%s\\%d\\%s", fileroot, 336, filename)
  122. elseif ctx.stadium == 47 and ctx.home_team == 188 then --Chievo Verona
  123. return string.format("%s\\%d\\%s", fileroot, 188, filename)
  124. elseif ctx.stadium == 132 and ctx.home_team == 125 then --Roma
  125. return string.format("%s\\%d\\%s", fileroot, 125, filename)
  126. elseif ctx.stadium == 132 and ctx.home_team == 122 then --Lazio
  127. return string.format("%s\\%d\\%s", fileroot, 122, filename)
  128. elseif ctx.stadium == 223 and ctx.home_team == 240 then --Sampdoria
  129. return string.format("%s\\%d\\%s", fileroot, 240, filename)
  130. elseif ctx.stadium == 222 and ctx.home_team == 323 then --Genoa
  131. return string.format("%s\\%d\\%s", fileroot, 323, filename)
  132. elseif ctx.stadium == 47 and ctx.home_team == 235 then --Empoli
  133. return string.format("%s\\%d\\%s", fileroot, 235, filename)
  134. end
  135. end
  136.  
  137. local function init(ctx)
  138. if fileroot:sub(1,1)=='.' then
  139. fileroot = ctx.sider_dir .. fileroot
  140. end
  141. ctx.register("livecpk_make_key", make_key)
  142. ctx.register("livecpk_get_filepath", get_filepath)
  143. end
  144.  
  145. return { init = init }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement