Mage both fire AND frost LUA dps macro menu

User Tag List

Results 1 to 10 of 10
  1. #1
    Thomja's Avatar Almost Legendary User
    Reputation
    538
    Join Date
    Nov 2008
    Posts
    638
    Thanks G/R
    14/38
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mage both fire AND frost LUA dps macro

    Heres a macro that i use for my mage when leveling.... its only made for single target DPS and works really well

    Requirements:
    Toggle key: F
    Program that enables you to use LUA scripts in wow
    then you need an addon for this to work which ill upload and edit it in this post.(CHECK LOAD OUT OF DATE ADDONS IN WOW!!!!!!)

    LINK TO ADDON: http://www.mediafire.com/?tbd69no2hvels91

    VIRUS TOTAL IS DOWN ATM WILL UPLOAD A SCAN LATER!

    How to change between Fire & Frost script:
    - Open the MageGoPewPew.lua in notepad.
    - Find this line: local MODE = "Frost";
    - Type "Fire" if you want to use the fire script or "Frost" if you want to use the frost script.


    Code:
    -------------------------------------------
    --  MageGoPewPew
    -------------------------------------------
    -- Change your key here.
    local PEWPEWKEY = "F";
    local HOLDDOWN = false;-- If this is true, you have to hold the key down.  If it is false, just press it to turn it on, press again to turn off.
    local STOPAFTERCOMBAT = true;-- Disable after combat
    local DEBUGMODE = false;-- debugmode
    local MODE = "Frost";
    -- Frost
    local USEFREEZE = true; -- true if you want pet to cast freeze; false otherwise;
    local CASTWHILEMOVE = true; -- true if you want to cast icelance while moving
    local ICEBARRIER = false; -- set to false to not use ice barrier
    local STOPFROSTBOLTS = false;
    -- Fire
    local FIREBALL_RATE = 100;-- Lower this to cast more scorches, increase it to cast more fireballs.
    local SCORCHMANAPERC = 5;-- Only cast scorch rotation when below this %.
    -----------------------------DO NOT CHANGE ANYTHING BELOW THIS LINE-------------------------------------------
    -----------------------------DO NOT CHANGE ANYTHING BELOW THIS LINE-------------------------------------------
    -----------------------------DO NOT CHANGE ANYTHING BELOW THIS LINE-------------------------------------------
    -----------------------------DO NOT CHANGE ANYTHING BELOW THIS LINE-------------------------------------------
    -----------------------------DO NOT CHANGE ANYTHING BELOW THIS LINE-------------------------------------------
    -----------------------------DO NOT CHANGE ANYTHING BELOW THIS LINE-------------------------------------------
    local pressed = false;
    local f = CreateFrame("Frame");
    f:SetFrameStrata("TOOLTIP");
    f:Show();
    f:SetWidth(1);
    f:SetHeight(1);
    
    local b = CreateFrame("CheckButton", "PewPewBtn", nil, "SecureActionButtonTemplate, ActionButtonTemplate");
    if HOLDDOWN then
    	b:RegisterForClicks("AnyUp", "AnyDown");
    else
    	b:RegisterForClicks("AnyUp");
    end
    b:SetAttribute("downbutton", true);
    
    b:SetAttribute("type", "macro");
    b:SetAttribute("macrotext", "/pewpewmagedps");
    
    
    local lastSpell = "";
    local goCombustion = false;
    local isCauterized = false;
    
    local function PewPewPrint(...)
    	if DEBUGMODE then
    		DEFAULT_CHAT_FRAME:AddMessage(...);
    	end
    end
    
    local function DoesUnitHaveBuff(unit, buff)
    	if UnitBuff(unit, buff) then
    		return true;
    	end
    	return false;
    end
    
    local function DoesUnitHaveDebuff(unit, buff)
    	local name, _, _, _, _, _, _, unitCaster, _, _, spellId = UnitDebuff(unit, buff);
    	if name and unitCaster == "player" then
    		return true;
    	end
    	return false;
    end
    
    local function GetBuffRemainingTime(unit, spell)
    	local name, _, _, count, _, duration, expirationTime, _, _, _, _ = UnitBuff(unit, spell);
    	if name then
    		return (expirationTime - GetTime()), count;
    	end
    	return -1, -1;
    end
    
    local function GetSpellCooldownRemaining(spell)
    	local start, dur, _ = GetSpellCooldown(spell)
    	if start and dur then
    		return (start + dur) - GetTime();
    	end
    	return 0;
    end
    
    local function DoesPlayerHaveManaGems()
    	if (GetItemCount("Mana Gem") == 1 and GetItemCooldown(36799) == 0) then
    		return true;
    	end
    	return false;
    end
    
    local function IsUnitFrozen(unit)
    	if UnitDebuff(unit, "Frost Nova") then
    		return true;
    	end
    	if UnitDebuff(unit, "Deep Freeze") then
    		return true;
    	end
    	if UnitDebuff(unit, "Freeze") then
    		return true;
    	end
    	return false;
    end
    
    local function PewPew(name)
    	lastSpell = name;
    	PewPewPrint("Casting: " .. name);
    	CastSpellByName(name);
    end
    
    local function FindAndUseManaGem()
    	for i=0,4 do
    		local numSlots = GetContainerNumSlots(i);
    		for x=1,numSlots do
    			if GetContainerItemID(i, x) == 36799 then
    				UseContainerItem(i, x, true)
    				return;
    			end
    		end
    	end
    end
    local lastPetHealth = 0;
    local petMoving;
    local function OnUpdate(...)
    	if not pressed then return end;
    	if MODE == "Frost" then
    		-- Pet Check Before Anything Else
    		if not UnitExists("playerpet") then
    			PewPew("Summon Water Elemental");
    			return;
    		end
    		
    		if not IsPetAttackActive() and GetUnitSpeed("playerpet") == 0 and not petMoving then
    			PewPewPrint("PetAttack, Not Attacking");
    			PetAttack();
    		end
    
    		if not UnitCastingInfo("playerpet") and not UnitChannelInfo("playerpet") and IsUsableSpell("Waterbolt")  and GetUnitSpeed("playerpet") == 0 then
    			CastSpellByName("Waterbolt");
    		end
    		
    		if UnitExists("playerpet") and lastPetHealth > UnitHealth("playerpet") then
    			petMoving = true;
    			PetFollow();
    		end
    		
    		if UnitExists("playerpet") and petMoving and GetUnitSpeed("playerpet") == 0 and CheckInteractDistance("playerpet", 3) then
    			petMoving = false;
    		end
    		
    		if UnitExists("playerpet") then
    			lastPetHealth = UnitHealth("playerpet");
    		end
    		
    		if STOPFROSTBOLTS and UnitCastingInfo("player") == "Frostbolt" and DoesUnitHaveBuff("player", "Fingers of Frost") then
    			PewPewPrint("Stopping Frostbolt.");
    			SpellStopCasting();
    		end
    
    		-- GC Check
    		if UnitExists("target") and UnitCanAttack("player", "target") then
    			if IsPetAttackActive() and UnitGUID("pettarget") ~= UnitGUID("playertarget") and not petMoving then
    				PewPewPrint("PetAttack, Different GUID");
    				PetAttack();
    			end
    
    			if (((UnitPower("player") / UnitPowerMax("player")) * 100) <= 80) and DoesPlayerHaveManaGems() then
    				FindAndUseManaGem();
    			end
    			
    			if USEFREEZE and IsUsableSpell("Freeze") and GetSpellCooldown("Freeze") == 0 and not DoesUnitHaveBuff("player", "Fingers of Frost") and (GetSpellCooldown("Deep Freeze") == 0 or GetSpellCooldownRemaining("Deep Freeze") >= 20) and not DoesUnitHaveBuff("player", "Fingers of Frost") then
    				PewPew("Freeze");
    				CameraOrSelectOrMoveStart(); 
    				CameraOrSelectOrMoveStop();
    				SpellStopTargeting();
    			end
    			if GetSpellCooldown("Mage Armor") == 0 and not UnitCastingInfo("player") and not UnitChannelInfo("player") then
    				
    				if (((UnitPower("player") / UnitPowerMax("player")) * 100) <= 15) and not DoesUnitHaveBuff("player", "Mage Armor") then
    					PewPew("Mage Armor");
    				
    				elseif (((UnitPower("player") / UnitPowerMax("player")) * 100) >= 50) and not DoesUnitHaveBuff("player", "Mage Armor") then
    					PewPew("Molten Armor");
    				
    				elseif ICEBARRIER and IsUsableSpell("Ice Barrier") and not DoesUnitHaveBuff("player", "Ice Barrier") and GetSpellCooldown("Ice Barrier") == 0 then
    					PewPew("Ice Barrier");
    
    				elseif IsUsableSpell("Deep Freeze") and GetSpellCooldown("Deep Freeze") == 0 and not IsUnitFrozen("target") then
    					PewPew("Deep Freeze");
    							
    				elseif IsUsableSpell("Mirror Image") and GetSpellCooldown("Mirror Image") == 0 then 
    					PewPew("Mirror Image");
    			
    				elseif IsUsableSpell("Flame Orb") and GetSpellCooldown("Flame Orb") == 0 and GetUnitSpeed("player") == 0 then
    					PewPew("Flame Orb");
    			
    				elseif IsUsableSpell("Frostfire Bolt") and DoesUnitHaveBuff("player", "Brain Freeze") then
    					PewPew("Frostfire Bolt");
    
    				elseif IsUsableSpell("Icy Veins") and not DoesUnitHaveBuff("player", "Icy Veins") and GetSpellCooldown("Icy Veins") == 0 and GetUnitSpeed("player") == 0 then
    					PewPew("Icy Veins");
    
    				elseif IsUsableSpell("Ice Lance") and DoesUnitHaveBuff("player", "Fingers of Frost") and (not IsUsableSpell("Deep Freeze") or GetSpellCooldown("Deep Freeze") > 0) then
    					PewPew("Ice Lance");
    			
    				elseif IsUsableSpell("Ice Lance") and IsUnitFrozen("target") then
    					PewPew("Ice Lance");
    
    				elseif IsUsableSpell("Cold Snap") and GetSpellCooldown("Cold Snap") == 0 and GetSpellCooldownRemaining("Deep Freeze") >= 10 and GetSpellCooldownRemaining("Flame Orb") >= 10 and GetSpellCooldownRemaining("Icy Veins") >= 10 then
    					PewPew("Cold Snap");
    
    				elseif CASTWHILEMOVE and GetUnitSpeed("player") > 0 then
    					PewPew("Ice Lance");
    				
    				else
    					PewPew("Frostbolt");
    				end
    			end
    		end
    
    	elseif MODE == "Fire" then
    		if not DoesUnitHaveBuff("player", "Molten Armor") and GetSpellCooldown("Molten Armor") == 0 then
    			PewPew("Molten Armor");
    		end
    
    		if DoesUnitHaveDebuff("player", "Cauterize") and GetSpellCooldown("Ice Block") == 0 then
    			PewPewPrint("Canceling Spell, Iceblocking Cauterize");
    			SpellStopCasting();
    			isCauterized = true;				
    			PewPew("Ice Block");
    			return;
    		end
    
    		if isCauterized and DoesUnitHaveBuff("player", "Ice Block") then
    			isCauterized = false;
    			CancelUnitBuff("player", "Ice Block");
    			return;
    		end
    	
    		if UnitExists("target") and UnitCanAttack("player", "target") then
    			if (((UnitPower("player") / UnitPowerMax("player")) * 100) <= 80) and DoesPlayerHaveManaGems() then
    				FindAndUseManaGem();
    			end
    
    			if goCombustion and DoesUnitHaveDebuff("target", "Living Bomb") and DoesUnitHaveDebuff("target", "Pyroblast!") and GetSpellCooldown("Combustion") == 0 then
    				SpellStopCasting();
    				PewPew("Combustion");
    				return;
    			end
    
    			if GetSpellCooldown("Molten Armor") == 0 
    			and not UnitCastingInfo("player")
    			and not UnitChannelInfo("player") then
    				if goCombustion and DoesUnitHaveDebuff("target", "Living Bomb") and DoesUnitHaveDebuff("target", "Pyroblast!") and GetSpellCooldown("Combustion") == 0 then
    					SpellStopCasting();
    					PewPew("Combustion");
    					return;
    				end
    				if DoesUnitHaveBuff("player", "Hot Streak") then
    					PewPew("Pyroblast");
    
    				elseif not UnitDebuff("target", "Critical Mass") and not UnitDebuff("target", "Shadow and Flame") and lastSpell ~= "Scorch" then
    					PewPew("Scorch");
    
    				elseif IsUsableSpell("Living Bomb") and not DoesUnitHaveDebuff("target", "Living Bomb") then
    					PewPew("Living Bomb");
    
    				elseif IsUsableSpell("Flame Orb") and GetSpellCooldown("Flame Orb") == 0 and GetUnitSpeed("player") == 0 then
    					PewPew("Flame Orb");
    		
    				elseif IsUsableSpell("Mirror Image") and GetSpellCooldown("Mirror Image") == 0 then
    					PewPew("Mirror Image");
    			
    				elseif (GetUnitSpeed("player") > 0) or (((UnitPower("player") / UnitPowerMax("player")) * 100) <= SCORCHMANAPERC) then
    					PewPew("Scorch");
    
    				elseif DoesUnitHaveBuff("player", "Bloodlust") or DoesUnitHaveBuff("player", "Time Warp") or DoesUnitHaveBuff("player", "Dire Magic") or DoesUnitHaveBuff("player", "Lightweave") or DoesUnitHaveBuff("player", "Battle Magic") or DoesUnitHaveBuff("player", "Volcanic Power") or DoesUnitHaveBuff("player", "Power Torrent") or (DoesUnitHaveDebuff("target", "Pyroblast!") and GetSpellCooldown("Combustion") == 0 and IsUsableSpell("Combustion")) or (((UnitHealth("target") / UnitHealthMax("target")) * 100) <= 35) then
    					PewPew("Fireball");
    
    				else
    					if (random(1,100) >= FIREBALL_RATE) then
    						PewPew("Scorch");
    					else
    						PewPew("Fireball");
    					end
    				end
    			end
    		end
    	end
    end
    
    
    function PlayPewPewSounds(...)
    	DEFAULT_CHAT_FRAME:AddMessage(...);
    	pressed = not pressed;
    	goCombustion = false;
    	if pressed then
    		DEFAULT_CHAT_FRAME:AddMessage("PewPew: ON");
    	else
    		DEFAULT_CHAT_FRAME:AddMessage("PewPew: OFF");
    	end
    end
    
    local combatEvents = {
    	RANGE_DAMAGE = true,
    	SPELL_DAMAGE = true,
    	SPELL_PERIODIC_DAMAGE = true,
    }
    
    
    local function OnEvent(self, event, timestamp, eventType, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags, _, spellName, _, amount, _, school, resisted, _, _, critical)
    	if event == "COMBAT_LOG_EVENT_UNFILTERED" then
    		if not CombatLog_Object_IsA(sourceFlags, COMBATLOG_FILTER_MINE) or not combatEvents[eventType] then 
    			return;
    		end
    		if spellName == "Combustion" then
    			goCombustion = false;
    			return;
    		end
    		if not critical then return end
    
    		if spellName == "Fireball" or spellName == "Pyroblast!" then
    			PewPewPrint("Critical-Go Combustion: " .. spellName);
    			goCombustion = true;
    			return;
    		end
    		goCombustion = false;
    
    	elseif event == "PLAYER_REGEN_ENABLED" then
    		if pressed then
    			DEFAULT_CHAT_FRAME:AddMessage("PewPew: OFF");
    			pressed = false;
    			goCombustion = false;
    		end
    	end
    end
    
    local function OnLoad()
    	f:SetScript("OnUpdate", OnUpdate);
    	f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
    	if STOPAFTERCOMBAT then
    		f:RegisterEvent("PLAYER_REGEN_ENABLED");
    	end
    	f:SetScript("OnEvent", OnEvent);
    	SetOverrideBinding(f, true, PEWPEWKEY, "CLICK PewPewBtn:LeftClick");
    	PewPewPrint("MageGoPewPew Loaded");
    end
    SLASH_PEWPEWMAGEDPS1 = "/pewpewmagedps";
    SlashCmdList["PEWPEWMAGEDPS"] = PlayPewPewSounds;
    OnLoad();
    Its a REALLY long code and it works for both fire and frost spec

    Enjoy!
    Last edited by Thomja; 04-08-2011 at 03:55 AM.

    Mage both fire AND frost LUA dps macro
  2. #2
    Parrky's Avatar Contributor
    Reputation
    146
    Join Date
    Aug 2010
    Posts
    270
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stolen commissioned work from skillhackers, no rep for you just a look of disgust.

  3. #3
    Thomja's Avatar Almost Legendary User
    Reputation
    538
    Join Date
    Nov 2008
    Posts
    638
    Thanks G/R
    14/38
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    O.o skillhackers? never heard of it i found this somewhere else and asked premission to share it

  4. #4
    Sikas's Avatar Active Member
    Reputation
    69
    Join Date
    Feb 2007
    Posts
    386
    Thanks G/R
    6/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do share where you got this from and who and where you got permission to post this.

    This script/macro is originally from skillhackers forums. Please don't post something from that forum unless you got permission from the original author either yourself or whoever you copy/pasted this from.

  5. #5
    Ultraviolence's Avatar Active Member
    Reputation
    15
    Join Date
    Aug 2008
    Posts
    102
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The logic is actually pretty simple (and very similar to my own Frost script), anyone could cook that up in 10 minutes or less.

  6. #6
    Sikas's Avatar Active Member
    Reputation
    69
    Join Date
    Feb 2007
    Posts
    386
    Thanks G/R
    6/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    He literally COPY/PASTED it, word for word from skillhackers.

  7. #7
    isaniac's Avatar Site Donator
    Reputation
    91
    Join Date
    Feb 2007
    Posts
    122
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Arn't LUA automated scripts insto ban?

  8. #8
    Sikas's Avatar Active Member
    Reputation
    69
    Join Date
    Feb 2007
    Posts
    386
    Thanks G/R
    6/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    They can be if the program we use is detected, the scripts themselves aren't a ban. :P

  9. #9
    sed-'s Avatar ★ Elder ★
    Reputation
    1114
    Join Date
    Mar 2010
    Posts
    1,566
    Thanks G/R
    52/151
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ^.^ nice, i wish i had a thing to let me run macros like this =( no lua enable for meh.

  10. #10
    Thomja's Avatar Almost Legendary User
    Reputation
    538
    Join Date
    Nov 2008
    Posts
    638
    Thanks G/R
    14/38
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    w.e remove then if u want

Similar Threads

  1. [Release] Basic Unholy Death Knight protected lua dps macro
    By Clueless_noob in forum WoW UI, Macros and Talent Specs
    Replies: 15
    Last Post: 01-05-2012, 07:06 PM
  2. [Sell] Photoshop Fire and frost styles.
    By Ackl in forum Art & Graphic Design
    Replies: 2
    Last Post: 01-03-2011, 04:57 PM
  3. lazy frost dk dps macro
    By tifaz in forum World of Warcraft Guides
    Replies: 2
    Last Post: 05-22-2009, 10:02 AM
  4. [Request] Green Warlock Fire and Blue Mage Fire for 3.0.3
    By Dark Guild in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 12-31-2008, 07:05 AM
All times are GMT -5. The time now is 04:03 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search