Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(1 Kb)
Download
Updated: 11-02-14 10:17 AM
Pictures
File Info
Updated:11-02-14 10:17 AM
Created:01-05-14 12:12 PM
Downloads:537
Favorites:21
MD5:

Darkmoon Faire Cannon

Version: 1.2
by: AlleyKat [More]

Automatically cancels "Wings" buff in Darkmoon Faire Cannon daily quest.
Because of latency defects, does not grant 100% hit.
Experimental. No slash commands, no settings.

Optional Files (0)


Archived Files (2)
File Name
Version
Size
Author
Date
1.1
1kB
AlleyKat
01-06-14 10:24 AM
1.0
1kB
AlleyKat
01-05-14 12:12 PM


Post A Reply Comment Options
Unread 03-05-15, 10:16 AM  
fuba
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
the code itself still works, bur some "(" are missing

just replace the whole DarkmoonFaireCannon.lua with the code below.

Lua Code:
  1. local GetPlayerMapPosition = GetPlayerMapPosition;
  2. local spellName = GetSpellInfo(102116);
  3. local CancelUnitBuff = CancelUnitBuff;
  4. local frame = CreateFrame("Frame");
  5. local watch = CreateFrame("Frame");
  6. local GetNetStats = GetNetStats;
  7. local After = C_Timer.After;
  8. local UnitAura = UnitAura;
  9. local running = false;
  10. local enabled = false;
  11. local xPos, yPos;
  12. frame:Hide();
  13.  
  14. local stop = function()
  15.     CancelUnitBuff("player", spellName);
  16.     running = false;
  17. end
  18.    
  19. frame:SetScript("OnUpdate", function(self)
  20.     local newxPos, newyPos = GetPlayerMapPosition("player");
  21.  
  22.     if newxPos ~= xPos or newyPos ~= yPos then
  23.         local _, _, l = GetNetStats();
  24.         l = 7.5 - l/2000;
  25.         After(l, stop);
  26.         self:Hide();
  27.         print("|cff7F4DACWings|r: "..l.."|cffddddddsec|r");
  28.     end
  29. end);
  30.    
  31. frame:SetScript("OnEvent", function(self, event, unit)
  32.     if not running and (unit == "player") and UnitAura(unit, spellName) then
  33.         running = true;
  34.         xPos, yPos = GetPlayerMapPosition("player");
  35.         self:Show();
  36.     end
  37. end);
  38.    
  39. local delay = function()
  40.     local id = GetCurrentMapAreaID();
  41.        
  42.     if id == -1 then
  43.         return;
  44.     end
  45.        
  46.     if id == 823 and not enabled then
  47.         enabled = true;
  48.         frame:RegisterEvent("UNIT_AURA");
  49.     elseif enabled then
  50.         enabled = false;
  51.         frame:UnregisterEvent("UNIT_AURA");
  52.     end
  53. end
  54.    
  55. watch:RegisterEvent("PLAYER_ENTERING_WORLD");
  56. watch:SetScript("OnEvent", function(self)
  57.     After(2, delay);
  58. end);
fuba is offline Report comment to moderator  
Reply With Quote
Unread 12-10-14, 04:36 PM  
Artick
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
This mod doesn't work at this moment. I tried it with all my chars and nothing. Hope you cant fix it. Thks in advance.
Artick is offline Report comment to moderator  
Reply With Quote
Unread 01-08-14, 08:22 AM  
pinderhughes
A Defias Bandit

Forum posts: 2
File comments: 1
Uploads: 0
Warning, questhelperlite breaks it, disable that or else it delays the trigger or something.
Last edited by pinderhughes : 01-08-14 at 02:12 PM.
pinderhughes is offline Report comment to moderator  
Reply With Quote
Unread 01-07-14, 04:54 AM  
theslyrover
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Thumbs up Works Perfectly!

I fail so hard at the darn cannon. This works perfectly, thank you!
theslyrover is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: