Advertisement
cnl_cnl_cnl

Untitled

Oct 5th, 2022
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.57 KB | None | 0 0
  1. r = r or {}
  2. r.col = {
  3. red = "\\d02",
  4. green = "\\d03",
  5. yellow = "\\d04",
  6. blue = "\\d05",
  7. purple = "\\d06",
  8. cyan = "\\d07",
  9. white = "\\d08",
  10. bold = "\\a02",
  11. unbold = "\\a03",
  12. underline = "\\a05",
  13. reset = "\\a10",
  14. }
  15.  
  16. cnl_core = cnl_core or {}
  17. cnl_core.epics = cnl_core.epics or {}
  18. cnl_core.epics.list = {
  19. VK = {
  20. --["fafnir"] = "fafnir",
  21. },
  22.  
  23. BH = {
  24. ["lucifer"] = "luci",
  25. ["telebrion"] = "teleb",
  26. ["iggwilv"] = "iggwilv",
  27. ["uhhhl"] = "uhhhl",
  28. ["atlas"] = "atlas",
  29. ["kzartaxen"] = "kzar",
  30. ["helios-sun-god"] = "helios",
  31. ["takhisis"] = "takh",
  32. ["tasha"] = "tasha",
  33. ["baraneth"] = "bara",
  34. ["lupine"] = "lupine",
  35. ["klklklpa"] = "klklklpa",
  36. ["oth"] = "oth",
  37. ["lo-hoal-rose"] = "lo-haol",
  38. },
  39.  
  40. AH = {
  41. ["Angzakstigilrash"] = "carp",
  42. ["bazg"] = "bazg",
  43. ["breath-death"] = "breath",
  44. ["contagion-epic"] = "contagion",
  45. ["arcane-ooze"] = "ooze",
  46. ["maleficent"] = "malef",
  47. ["omnimental"] = "omni",
  48. ["kezthall"] = "kezthall",
  49. },
  50.  
  51. SS = {
  52. ["acid-golem"] = "acid",
  53. ["vouhx"] = "vouhx",
  54. ["alhoon"] = "alhoon",
  55. ["skerrit"] = "skerrit",
  56. ["snow-lion"] = "lion",
  57. ["pale-night-mother"] = "pale",
  58. ["miska"] = "miska",
  59. ["keadral"] = "keadral",
  60. ["zallah"] = "zallah",
  61. },
  62.  
  63. IS = {
  64. ["tepeyollotl"] = "tepe",
  65. ["roberts"] = "roberts",
  66. ["roedrig"] = "roedrig",
  67. ["higgins"] = "higgins",
  68. ["hydra-valdh"] = "hydra",
  69. },
  70.  
  71. LY = {
  72. ["xerxes"] = "xerxes",
  73. ["koshey"] = "koshey",
  74. ["ra-fire-god"] = "ra",
  75. },
  76.  
  77. EU = {
  78. ["dispater"] = "dispater",
  79. ["mephistopheles"] = "mephis",
  80. ["moloch-devil-king"] = "moloch",
  81. ["baalzebul"] = "baal",
  82. ["mammon"] = "mammon",
  83. ["asmodeus"] = "asmo",
  84. ["cryonax"] = "cryonax",
  85. },
  86. }
  87.  
  88. function epic()
  89. -- clean up any existing triggers
  90. if cnl_core.epics.trigId then killTrigger(cnl_core.epics.trigId) end
  91.  
  92. -- init the things
  93. cnl_core.epics.counter = 0
  94. cnl_core.epics.hits = {}
  95.  
  96. -- why did I want to do this again?
  97. local trig_prefix = "epic_"..math.random(9999)
  98.  
  99. --
  100. local regex = "^You tell (.*) '"..trig_prefix .."(..)(.*)'$|^No-one by that name here..$"
  101. cnl_core.epics.trigId = tempRegexTrigger(regex,cnl_core.epics.gather)
  102.  
  103. for cont,epics in pairs(cnl_core.epics.list) do
  104. for k,v in pairs(epics) do
  105. cnl_core.epics.counter = cnl_core.epics.counter + 1
  106. send(
  107. "tell "..
  108. k ..
  109. " "..
  110. trig_prefix ..
  111. cont ..
  112. v
  113. )
  114. end
  115. end
  116. end
  117.  
  118. function cnl_core.epics.gather()
  119. cecho("<red>*\n")
  120. cnl_core.epics.counter = cnl_core.epics.counter - 1
  121.  
  122. if matches[2] then
  123. if cnl_core.epics.hits[matches[3]] then
  124. cnl_core.epics.hits[matches[3]] = cnl_core.epics.hits[matches[3]] .. " | "..matches[4]
  125. else
  126. cnl_core.epics.hits[matches[3]] = "[" .. matches[3] .. "] "..matches[4]
  127. end
  128. end
  129.  
  130. if cnl_core.epics.counter == 0 then
  131. cecho("<yellow>killTrigger("..cnl_core.epics.trigId..")\n")
  132. killTrigger(cnl_core.epics.trigId)
  133.  
  134. local found_epics = false
  135.  
  136. for k,v in pairs(cnl_core.epics.hits) do
  137. local v_col = v
  138. v_col = v_col:gsub("%[EU%]",r.col.red..r.col.unbold.."["..r.col.bold.."EU"..r.col.unbold.."]"..r.col.white)
  139. v_col = v_col:gsub("%[SS%]",r.col.yellow..r.col.unbold.."["..r.col.bold.."SS"..r.col.unbold.."]"..r.col.white)
  140. v_col = v_col:gsub("%[BH%]",r.col.green..r.col.unbold.."["..r.col.bold.."BH"..r.col.unbold.."]"..r.col.white)
  141. v_col = v_col:gsub("%[LY%]",r.col.purple..r.col.unbold.."["..r.col.bold.."LY"..r.col.unbold.."]"..r.col.white)
  142. v_col = v_col:gsub("%[AH%]",r.col.cyan..r.col.unbold.."["..r.col.bold.."AH"..r.col.unbold.."]"..r.col.white)
  143. v_col = v_col:gsub("%[IS%]",r.col.blue..r.col.unbold.."["..r.col.bold.."IS"..r.col.unbold.."]"..r.col.white)
  144.  
  145. send("grouptell "..v_col)
  146. found_epics = true
  147. end
  148.  
  149. if not found_epics then
  150. send("grouptell No epics found!")
  151. end
  152. end
  153.  
  154. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement