Advertisement
Guest User

Untitled

a guest
Sep 8th, 2014
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.22 KB | None | 0 0
  1. ---------------
  2. -- Null System Daemon --
  3. ---------------
  4. local Locales = {
  5. ["Null System Daemon"] = {
  6. [1] = "Null System Daemon",
  7. [2] = "Phagenschlund",
  8. [3] = "Phagegueule",
  9. },
  10. ["Binary System Daemon"] = {
  11. [1] = "Binary System Daemon",
  12. [2] = "Phagenschlund",
  13. [3] = "Phagegueule",
  14. },
  15. ["Disconnect"] = {
  16. [1] = "Disconnect",
  17. [2] = "Sprengbomben",
  18. [3] = "Bombes explosives",
  19. },
  20. ["Power Surge"] = {
  21. [1] = "Power Surge",
  22. [2] = "Flugphase",
  23. [3] = "Envol",
  24. },
  25. ["Adds"] = {
  26. [1] = "Adds",
  27. [2] = "Flugphase",
  28. [3] = "Envol",
  29. },
  30. ["Purge"] = {
  31. [1] = "Purge",
  32. [2] = "Flugphase",
  33. [3] = "Envol",
  34. },
  35. ["Basement Adds Spawning!"] = {
  36. [1] = "Basement Adds Spawning!",
  37. [2] = "Flugphase",
  38. [3] = "Envol",
  39. },
  40. ["Pillar Phase Duration"] = {
  41. [1] = "Pillar Phase Duration",
  42. [2] = "Flugphase",
  43. [3] = "Envol",
  44. },
  45. ["Enhancement Module"] = {
  46. [1] = "Pillar Phase Duration",
  47. [2] = "Flugphase",
  48. [3] = "Envol",
  49. },
  50. }
  51. local transition = 0
  52. local function NullSystemDaemon(tUnits)
  53. local currTime = GameLib.GetGameTime()
  54. for unitid, unitdata in pairs(tUnits) do
  55. local unitname = unitdata.unit:GetName()
  56. if unitname == Raiderino.L["Null System Daemon"] then
  57. local castname = Raiderino:GetCast(unitid,unitdata.unit)
  58. if castname then
  59. if castname == Raiderino.L["Disconnect"] then
  60. if Raiderino:FeatureCheck("Null System Daemon","Disconnect") then
  61. local msg = {text = "Disconnect", maxtime = 45, icon = nil, destroyAtEnd = true}
  62. Raiderino.timers:AddTimer(msg)
  63. end
  64. elseif castname == Raiderino.L["Purge"] then
  65. if Raiderino:FeatureCheck("Null System Daemon","Purge") then
  66. local msg = {text = "Purge", maxtime = 25, icon = nil, destroyAtEnd = true}
  67. Raiderino.timers:AddTimer(msg)
  68. end
  69. Raiderino:UntimedCastAdd(unitname,castname)
  70. else
  71. end
  72.  
  73. if not Raiderino:GetPhase("Null System Daemon") == 2 and Raiderino:GetHealthPercent(unitdata.unit) < 70 and transition == 0 then
  74. Raiderino:PhaseSwitch("Null System Daemon",2)
  75. end
  76.  
  77. if not Raiderino:GetPhase("Null System Daemon") == 2 and Raiderino:GetHealthPercent(unitdata.unit) < 30 then
  78. Raiderino:PhaseSwitch("Null System Daemon",2)
  79. end
  80.  
  81. elseif unitname == Raiderino.L["Binary System Daemon"] then
  82. if castname then
  83. local castname = Raiderino:GetCast(unitid,unitdata.unit)
  84. Raiderino:UntimedCastAdd(unitname,castname)
  85. else
  86. end
  87. elseif unitname == Raiderino.L["Enhancement Module"] then
  88. if castname then
  89. local castname = Raiderino:GetCast(unitid,unitdata.unit)
  90. Raiderino:UntimedCastAdd(unitname,castname)
  91. end
  92. else
  93. end
  94. end
  95. end
  96. end
  97.  
  98.  
  99.  
  100. local function StartNull()
  101. Apollo.RegisterTimerHandler("NullTimer", "OnNullTimer", self)
  102. Apollo.RegisterTimerHandler("NullPhaseTimer", "OnNullPhaseTimer", self)
  103. -- if Raiderino:FeatureCheck("Null System Daemon","Disconnect") then
  104. -- local msg = {text = "Disconnect", maxtime = 40, icon = nil, destroyAtEnd = true}
  105. -- Raiderino.timers:AddTimer(msg)
  106. -- end
  107. -- if Raiderino:FeatureCheck("Null System Daemon","Adds") then
  108. -- local msg = {text = "Basement Adds Spawning!", maxtime = 15, icon = nil, destroyAtEnd = true}
  109. -- Raiderino.timers:AddTimer(msg)
  110. -- Apollo.CreateTimer("NullTimer", 15.0, false)
  111. -- Apollo.StartTimer("NullTimer")
  112. -- end
  113. Raiderino:PhaseSwitch("Null System Daemon",1)
  114. -- Print("Phase: " .. Raiderino:GetPhase("Null System Daemon"))
  115. end
  116. function OnNullTimer()
  117. if GameLib.GetPlayerUnit():IsInCombat() then
  118. local msg = {text = "Basement Adds Spawning!", maxtime = 50, icon = nil, destroyAtEnd = true}
  119. Raiderino.timers:AddTimer(msg)
  120. Apollo.CreateTimer("NullTimer", 50, false)
  121. else
  122. end
  123. end
  124.  
  125. function OnNullPhaseTimer()
  126. Raiderino:PhaseSwitch("Null System Daemon",1)
  127. end
  128.  
  129. local function PhaseNull(phase)
  130. if phase == 2 then
  131. local msg = {text = "Pillar Phase Duration", maxtime = 90, icon = nil, destroyAtEnd = true}
  132. transition = 1
  133. Raiderino.timers:AddTimer(msg)
  134. Apollo.StopTimer("NullTimer")
  135. Apollo.CreateTimer("NullTimer", 90, false)
  136. if Raiderino.timers.content["Basement Adds Spawning!"] then
  137. Raiderino.timers.content["Basement Adds Spawning!"].Frame:Destroy()
  138. Raiderino.timers.content["Basement Adds Spawning!"] = nil
  139. end
  140. if Raiderino.notifications.content["Disconnect"] then
  141. Raiderino.notifications.content["Disconnect"].Frame:Destroy()
  142. Raiderino.notifications.content["Disconnect"] = nil
  143. end
  144. elseif phase == 1 then
  145.  
  146. if Raiderino.timers.content["Enhancement Module"] then
  147. Raiderino.timers.content["Enhancement Module"].Frame:Destroy()
  148. Raiderino.timers.content["Enhancement Module"] = nil
  149. end
  150. if Raiderino:FeatureCheck("Null System Daemon","Disconnect") then
  151. local msg = {text = "Disconnect", maxtime = 40, icon = nil, destroyAtEnd = true}
  152. Raiderino.timers:AddTimer(msg)
  153. end
  154. if Raiderino:FeatureCheck("Null System Daemon","Adds") then
  155. local msg = {text = "Basement Adds Spawning!", maxtime = 15, icon = nil, destroyAtEnd = true}
  156. Raiderino.timers:AddTimer(msg)
  157. Apollo.CreateTimer("NullTimer", 15.0, false)
  158. Apollo.StartTimer("NullTimer")
  159. end
  160.  
  161. else
  162. end
  163. end
  164.  
  165. ----------------
  166. -- /Null System Daemon --
  167. ----------------
  168.  
  169. local encounteroptions = {
  170. enabled = true,
  171. position = 1,
  172. zone = "Halls of the Infinite Mind",
  173. fBossFunction = NullSystemDaemon,
  174. fPhaseFunction = PhaseNull,
  175. fOnStartCombat = StartNull,
  176. features = {
  177. ["Disconnect"] = {
  178. displayname = "Disconnect",
  179. enabled = true
  180. },
  181. ["Purge"] = {
  182. displayname = "Purge",
  183. enabled = true
  184. },
  185. ["Adds"] = {
  186. displayname = "Adds",
  187. enabled = true
  188. },
  189. },
  190. }
  191.  
  192. if _G["RaiderinoLibs"] == nil then
  193. _G["RaiderinoLibs"] = { }
  194. end
  195. if _G["RaiderinoLibs"]["Encounters"] == nil then
  196. _G["RaiderinoLibs"]["Encounters"] = { }
  197. end
  198.  
  199. _G["RaiderinoLibs"]["Encounters"]["Null System Daemon"] = encounteroptions
  200.  
  201. if _G["RaiderinoLibs"]["Locales"] == nil then
  202. _G["RaiderinoLibs"]["Locales"] = { }
  203. end
  204. for locale, localedata in pairs(Locales) do
  205. if not RaiderinoLibs.Locales[locale] then
  206. RaiderinoLibs.Locales[locale] = {}
  207. for i,localestring in pairs(localedata) do
  208. RaiderinoLibs.Locales[locale][i] = localestring
  209. end
  210. end
  211. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement