Reflect script menu

User Tag List

Results 1 to 12 of 12
  1. #1
    Rextown's Avatar Member
    Reputation
    1
    Join Date
    Jun 2016
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reflect script

    Hello
    Does anybody can to prompt where is an error in code?And will there be he in general to work?


    local f, t, p, s = CreateFrame(“Frame”),{[“Polymorph”] = true, [“Fear”] = true, [“Сyclone”] = true},
    UnitGUID(“player”),“Spell Reflection”
    f:RegisterEvent(“COMBAT_LOG_EVENT_UNFILTERED”)
    f:SetScript(“OnEvent”, function(_,_,_.e,_,_,_,tg,_,_,_,sn)
    if e == “SPELL_CAST_START” and tg == p and GetSpellCooldown(“Spell Reflection”) == 0 and t[sn] then
    CastSpellByName(“Spell Reflection”)
    end
    end)

    Reflect script
  2. #2
    Rextown's Avatar Member
    Reputation
    1
    Join Date
    Jun 2016
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nobody will help?

  3. #3
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1511
    Join Date
    May 2008
    Posts
    2,432
    Thanks G/R
    81/333
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Nobody understands the question or this random code snippet. What are you trying to accomplish in this post? Where's the problem?

  4. #4
    Rextown's Avatar Member
    Reputation
    1
    Join Date
    Jun 2016
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes I already understood. That that I want, it is impossible to realize
    It was necessary for me that reflect it was used when in me cast through focus or a mausover

  5. #5
    GentleTouch's Avatar Member
    Reputation
    4
    Join Date
    Oct 2009
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    local logframe = CreateFrame("Frame")
    logframe:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
    logframe:SetScript("OnEvent", function(self, event, ...)
    	local ticktime,event_name,_,_,sourceName,_,_,_,destName,_,_,LastCastID,spellName,spellSchool = ...
    	
    	local SpellsToReflect = 
    	{
    		["Polymorph"] = true,
    		["Fear"] = true,
    		["Cyclone"] = true,
    	}
    	
    	if event_name == "SPELL_CAST_START" then
    	
    		if SpellsToReflect[spellName] == true then
    			if select(2,GetSpellCooldown("Spell Reflection")) < 2 then
    				CastSpellByName("Spell Reflection")
    			end
    		end
    	end
    end)
    Seems to be what you are looking for.
    Last edited by GentleTouch; 03-06-2017 at 05:31 PM.

  6. #6
    dklfcheat's Avatar Member
    Reputation
    1
    Join Date
    Sep 2016
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by GentleTouch View Post
    Code:
    local logframe = CreateFrame("Frame")
    logframe:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
    logframe:SetScript("OnEvent", function(self, event, ...)
    	local ticktime,event_name,_,_,sourceName,_,_,_,destName,_,_,LastCastID,spellName,spellSchool = ...
    	
    	local SpellsToReflect = 
    	{
    		["Polymorph"] = true,
    		["Fear"] = true,
    		["Cyclone"] = true,
    	}
    	
    	if event_name == "SPELL_CAST_START" then
    	
    		if SpellsToReflect[spellName] == true then
    			if select(2,GetSpellCooldown("Spell Reflection")) < 2 then
    				CastSpellByName("Spell Reflection")
    			end
    		end
    	end
    end)
    Seems to be what you are looking for.
    how to "translate" all that stuff to simple lua? so i can use it with super duper macro?

  7. #7
    GentleTouch's Avatar Member
    Reputation
    4
    Join Date
    Oct 2009
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by dklfcheat View Post
    how to "translate" all that stuff to simple lua? so i can use it with super duper macro?
    Open literally any addon folder you already use, find a file called .lua,open the .lua file in notepad.exe, paste what i wrote at the very bottom, save, /reload;

    Otherwise, you want to use it with super duper macro, put it all on one line.
    Last edited by GentleTouch; 03-06-2017 at 05:57 PM.

  8. #8
    dklfcheat's Avatar Member
    Reputation
    1
    Join Date
    Sep 2016
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by GentleTouch View Post
    Open literally any addon folder you already use, find a file called .lua,open the .lua file in notepad.exe, paste what i wrote at the very bottom, save, /reload;

    Otherwise, you want to use it with super duper macro, put it all on one line.
    have you actually tested it ingame and seen it work? because even with a lua unlocker i been unable to make addons use abilities, some message pop ups about protection, if you have what expansion was it and did you use a third party software to bypass this protection?

  9. #9
    Ravenh's Avatar Member
    Reputation
    3
    Join Date
    Jul 2013
    Posts
    23
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by dklfcheat View Post
    how to "translate" all that stuff to simple lua? so i can use it with super duper macro?
    SpellBase = {"33786", "12826", "12824", "12825", "118", "61305", "28272", "61721", "61780", "28271", "59172", "51514", "60043", "48160", "47843"}

    AutoKick = CreateFrame("Frame", "AutoKick", UIParent);
    AutoKick:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
    AutoKick:SetScript("OnEvent", function(self, event, arg1, arg2, ...)
    if(event=="COMBAT_LOG_EVENT_UNFILTERED") then
    local spell, _, _, _, _, endTime, _, _, interrupt = UnitCastingInfo("target")
    for _, v in ipairs(SpellBase) do
    if GetSpellInfo(v) == spell then
    local finish = endTime/1000 - GetTime()
    if finish <= 0.5 then
    if interrupt == false then
    RunMacro("1h")
    RunMacroText("/cast Spell Reflection")
    end
    end
    end
    end
    end
    end)

  10. #10
    d2207's Avatar Member
    Reputation
    1
    Join Date
    Jan 2018
    Posts
    2
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi guys, I need some help.
    I have a script for reflection, but it does not work correctly, to be honest it does not work at all, and I do not understand what I'm doing wrong?

    if macros["spellreflect"]
    and cdRemains(23920) > 4
    and not UnitBuffID("player", 23920) then
    ResetMacros()
    MacroStatusFrameUpdate()
    if not IsTwoHanderEquiped() then
    EquipTwoHander()
    end
    end
    if cdRemains(23920) == 0
    and macros["spellreflect"] then
    local t = StringSplicer(GetCVar("SRtargs"))
    for i=0,#t do
    local SRTarget = t[i]

    if SRTarget == "debug"
    and rage >= 10 then
    if not IsOneHandAndShieldEquiped() then
    EquipOneHandAndShield()
    end
    _castSpell(23920)
    end

    if UnitExists(SRTarget )
    and UnitCanAttack("player", SRTarget ) ~= nil
    and UnitCastingInfo(SRTarget)
    and rage >= 10 then

    local castName,_,_,_,castStartTime,castEndTime,_,_,castNotInterruptable = UnitCastingInfo(SRTarget)
    local timeSinceStart = (GetTime() * 1000 - castStartTime) / 1000
    local castTime = castEndTime - castStartTime
    local currentPercent = timeSinceStart / castTime * 100000

    if currentPercent >= 70 then
    if not IsOneHandAndShieldEquiped() then
    EquipOneHandAndShield()
    end
    _castSpell(23920)
    end
    end
    end
    end


    What do I see here? Macros["spellreflect"] that checks for the presence of OneHandAndShield. Equiping them or two-handed. And script that checks for distance, interrupt, cast time, and finally uses reflection. Where is the mistake? Need to specify the ID spell that it reflects? I read that it is written -
    //if currentPercent> = 70 then equip OneHandAndShield and use reflection!!! One-handed shield and two-handed are indicated in a separate script.
    Last edited by d2207; 01-14-2018 at 08:20 AM.

  11. #11
    Numba1stunna1's Avatar Active Member
    Reputation
    70
    Join Date
    Dec 2013
    Posts
    182
    Thanks G/R
    1/34
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The "macros["spellreflect"] is a table of keys for macros of the rotation. A specific macro is pressed for the spell reflect, and thus the key in the table is set to "true", making the "macros["spellreflect"] true. The "macros" table most likely has other macros such as "shield wall".
    To answer your question, this script is written to turn off macros if the spell cooldown of the specific macro is greater than 4 seconds and the player does not have spell reflection (the first block of the script). If so, the script checks if you have a 1 hander, and equips a 2 hander. The 2nd part check if the macro is enabled and the cooldown is 0, then it uses a string slicer to break a string up into components and put them in a table, in this case for targets (ex "target, focus" ---> {"target","focus"}. This is because the macro function takes only 1 string, so the saved variable is one string. The script then iterates over a table of target (can be 1 target, ofc). The script has the option to set the string to "debug", which casts the ability regardless of checking a target. Finally, the script checks if the unit in the list exists, if you can attack (an enemy), the unit is casting anything, and if the rage is greater than or equal to 10. The script then localizes a bunch of unnecessary variables, because it only uses currentPercent. After the enemy's cast is 70% or higher, the script equips a shield and casts spell reflect.

    You probably forgot to put a string of targets in your macro. It probably looks something like this /SpellReflect target, focus, mouseover (you can remove or add any targets).

  12. Thanks d2207 (1 members gave Thanks to Numba1stunna1 for this useful post)
  13. #12
    d2207's Avatar Member
    Reputation
    1
    Join Date
    Jan 2018
    Posts
    2
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the help. I to put a string of targets by analogy with the script "FastKick"(_castSpell(23920,"target"))
    but it did not help, I think the error occurs in the first block - after pressing specific macro ["spellreflect"] the key in the table is not set to true.

Similar Threads

  1. [Selling] 3100 player WTS scripts for dmg/coil/reflect/grounding/interrupt
    By swndic in forum World of Warcraft Buy Sell Trade
    Replies: 0
    Last Post: 02-15-2015, 06:49 AM
  2. [Selling] 3100 player WTS scripts for dmg/coil/reflect/grounding/interrupt
    By swndic in forum World of Warcraft Buy Sell Trade
    Replies: 0
    Last Post: 01-03-2015, 05:33 PM
  3. [Selling] 3100 player WTS scripts for dmg/coil/reflect/grounding/interrupt
    By swndic in forum World of Warcraft Buy Sell Trade
    Replies: 0
    Last Post: 11-04-2014, 03:55 PM
  4. [Selling] 3100 player WTS scripts for dmg/coil/reflect/grounding/interrupt
    By swndic in forum World of Warcraft Buy Sell Trade
    Replies: 0
    Last Post: 10-15-2014, 06:51 AM
  5. [Selling] 3100 player WTS scripts for dmg/coil/reflect/grounding/interrupt
    By swndic in forum World of Warcraft Buy Sell Trade
    Replies: 0
    Last Post: 09-19-2014, 02:08 AM
All times are GMT -5. The time now is 03:57 AM. 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