Advertisement
Translit

besit

May 11th, 2016
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.85 KB | None | 0 0
  1. TRINKET1 AURA
  2. --COMBAT_LOG_EVENT_UNFILTERED, ENCOUNTER_END
  3. --TRIGGER
  4. function(event, timestamp, message, hideCaster, srcGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
  5.     local player = UnitGUID("player")
  6.     PoFcounter = PoFcounter or 0
  7.     aura_env.time = aura_env.time or 0    
  8.     if event=="COMBAT_LOG_EVENT_UNFILTERED" and message == "SPELL_AURA_APPLIED" then
  9.         local spellId, spellName, spellSchool = ...
  10.         if spellId == 31589 and srcGUID==player and PoFcounter == 0  then
  11.             aura_env.PoF = destGUID
  12.             aura_env.Name = destName
  13.             aura_env.time = GetTime() + 10
  14.             PoFcounter = PoFcounter + 1
  15.             return true
  16.         end
  17.     elseif event=="COMBAT_LOG_EVENT_UNFILTERED" and message == "SPELL_AURA_REFRESH" then
  18.         local spellId, spellName, spellSchool = ...
  19.         if spellId == 31589 and srcGUID==player and destGUID== aura_env.PoF then
  20.             aura_env.time = GetTime() + 10
  21.             return true
  22.         end
  23.     end
  24. end
  25.  
  26. --UNTRIGGER
  27. function(event, timestamp, message, hideCaster, srcGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
  28.     local player = UnitGUID("player")
  29.     aura_env.time = aura_env.time or 0
  30.     PoFcounter = PoFcounter or 0
  31.     if event=="COMBAT_LOG_EVENT_UNFILTERED" and message == "SPELL_AURA_REMOVED" then
  32.         local spellId, spellName, spellSchool = ...
  33.         if spellId == 31589 and srcGUID==player and destGUID == aura_env.PoF  then
  34.             aura_env.time = 0
  35.             PoFcounter = 0
  36.             return true
  37.         end
  38.     elseif event=="ENCOUNTER_END" then
  39.         aura_env.time = 0
  40.         PoFcounter = 0
  41.         return true
  42.     end
  43. end
  44.  
  45. --DURATION INFO
  46. function()
  47.     if aura_env.time ~=0 then
  48.         return 10, aura_env.time
  49.     end
  50. end
  51.  
  52. ===================================================================
  53.  
  54. TRINKET2 AURA
  55. --COMBAT_LOG_EVENT_UNFILTERED
  56. --TRIGGER
  57. function(event, timestamp, message, hideCaster, srcGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
  58.     local player = UnitGUID("player")
  59.     PoFcounter = PoFcounter or 0
  60.     PoFTrigger = PoFTrigger or 0
  61.     aura_env.time = aura_env.time or 0
  62.     if event=="COMBAT_LOG_EVENT_UNFILTERED" and message == "SPELL_AURA_APPLIED" then
  63.         local spellId, spellName, spellSchool = ...
  64.         if (spellId == 31589 and srcGUID==player and PoFcounter == 1 and PoFTrigger == 0) or (spellId == 31589 and srcGUID==player and PoFcounter == 2 and PoFTrigger2 == 1) then
  65.             aura_env.PoF = destGUID
  66.             aura_env.Name = destName
  67.             PoFcounter = PoFcounter + 1
  68.             PoFTrigger = 1
  69.             aura_env.time = GetTime() + 10
  70.             return true
  71.         end
  72.     elseif event=="COMBAT_LOG_EVENT_UNFILTERED" and message == "SPELL_AURA_REFRESH" then
  73.         local spellId, spellName, spellSchool = ...
  74.         if spellId == 31589 and srcGUID==player and destGUID== aura_env.PoF then
  75.             aura_env.time = GetTime() + 10
  76.             return true
  77.         end
  78.     end
  79. end
  80.  
  81. --UNTRIGGER
  82. function(event, timestamp, message, hideCaster, srcGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
  83.     local player = UnitGUID("player")
  84.     aura_env.time = aura_env.time or 0
  85.     PoFcounter = PoFcounter or 0
  86.     PoFTrigger = PoFTrigger or 0
  87.     if event=="COMBAT_LOG_EVENT_UNFILTERED" and message == "SPELL_AURA_REMOVED" then
  88.         local spellId, spellName, spellSchool = ...
  89.         if spellId == 31589 and srcGUID==player and destGUID == aura_env.PoF  then
  90.             if PoFcounter > 1 then
  91.                 aura_env.time = 0
  92.                 PoFcounter = PoFcounter - 1
  93.                 PoFTrigger = 0
  94.                 return true
  95.             elseif PoFcounter == 0 then
  96.                 aura_env.time = 0
  97.                 PoFTrigger = 0
  98.                 return true
  99.             end
  100.         end
  101.     end
  102. end
  103.  
  104. --DURATION INFO
  105. function()
  106.     if aura_env.time ~=0 then
  107.         return 10, aura_env.time
  108.     end
  109. end
  110.  
  111. ===================================================================
  112.  
  113. TRINKET3 AURA
  114. COMBAT_LOG_EVENT_UNFILTERED
  115. --TRIGGER
  116. function(event, timestamp, message, hideCaster, srcGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
  117.     local player = UnitGUID("player")
  118.     aura_env.time = aura_env.time or 0
  119.     PoFcounter = PoFcounter or 0
  120.     PoFTrigger2 = PoFTrigger2 or 0
  121.     if event=="COMBAT_LOG_EVENT_UNFILTERED" and message == "SPELL_AURA_APPLIED" then
  122.         local spellId, spellName, spellSchool = ...
  123.         if spellId == 31589 and srcGUID==player and PoFcounter == 2 and PoFTrigger2 == 0  then
  124.             aura_env.time = GetTime() + 10
  125.             aura_env.PoF = destGUID
  126.             aura_env.Name = destName
  127.             PoFcounter = PoFcounter + 1
  128.             PoFTrigger2 = 1
  129.             return true
  130.         end
  131.     elseif event=="COMBAT_LOG_EVENT_UNFILTERED" and message == "SPELL_AURA_REFRESH" then
  132.         local spellId, spellName, spellSchool = ...
  133.         if spellId == 31589 and srcGUID==player and destGUID== aura_env.PoF then
  134.             aura_env.time = GetTime() + 10
  135.             return true
  136.         end
  137.     elseif event=="COMBAT_LOG_EVENT_UNFILTERED" and message == "SPELL_AURA_REMOVED" then
  138.         local spellId, spellName, spellSchool = ...
  139.         if spellId == 31589 and srcGUID==player and destGUID == aura_env.PoF  then
  140.             if PoFcounter > 1 then
  141.                 aura_env.time = 0
  142.                 PoFcounter = PoFcounter - 1
  143.                 PoFTrigger2 = 0
  144.                 return true
  145.             elseif PoFcounter == 0 then
  146.                 aura_env.time = 0
  147.                 PoFTrigger2 = 0
  148.                 return true
  149.             end
  150.         end
  151.     end
  152. end
  153.  
  154. --UNTRIGGER
  155. function(event, timestamp, message, hideCaster, srcGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
  156.     local player = UnitGUID("player")
  157.     aura_env.time = aura_env.time or 0
  158.     PoFcounter = PoFcounter or 0
  159.     PoFTrigger2 = PoFTrigger2 or 0
  160.     if event=="COMBAT_LOG_EVENT_UNFILTERED" and message == "SPELL_AURA_REMOVED" then
  161.         local spellId, spellName, spellSchool = ...
  162.         if spellId == 31589 and srcGUID==player and destGUID == aura_env.PoF  then
  163.             if PoFcounter > 1 then
  164.                 aura_env.time = 0
  165.                 PoFcounter = PoFcounter - 1
  166.                 PoFTrigger2 = 0
  167.                 return true
  168.             elseif PoFcounter == 0 then
  169.                 aura_env.time = 0
  170.                 PoFTrigger2 = 0
  171.                 return true
  172.             end
  173.         end
  174.     end
  175. end
  176.  
  177. --DURATION INFO
  178. function()
  179.     if aura_env.time ~=0 then
  180.         return 10, aura_env.time
  181.     end
  182. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement