Naiters 2 Posted August 29, 2018 Share Posted August 29, 2018 Hi, I'm trying to write a simple lua for warrior arms 3.3.5a fightclass that uses intercept when charge is on cooldown. The code is: 1. For berserker stance - intercepting = "no" if GetSpellCooldown("Charge") ~= 0 then intercepting = "yes" end end Return value research: yes Return value var: intercepting Rage greater than 20 and Distance bigger than 8. 2. For Intercept: Buff Berserker Stance, same code as above and disance greater than 8. It doesn't work at all, any suggestions? ? Regards N Garub 1 Link to comment https://wrobot.eu/forums/topic/10012-intercept-macro-arms-pvp-335a-question/ Share on other sites More sharing options...
ScripterQQ 89 Posted August 29, 2018 Share Posted August 29, 2018 You wrote "end" two times instead of one, you need only one "end", because of the "if" statement. That being said, you must add an ability with higher priority that switches the stances (from battle to berserker or from defensive to berserker), otherwise it can't Intercept in Battle/Defensive Stance. Create "Berserker Stance" ability with these conditions:Charge in CD + Intercept not in CD + Stance ~= 2 + Intercept in range Also every stance is not a buff so adding Buff: Berserker Stance will never work. You need to use GetShapeshiftForm(). Greetings Link to comment https://wrobot.eu/forums/topic/10012-intercept-macro-arms-pvp-335a-question/#findComment-46952 Share on other sites More sharing options...
Naiters 2 Posted August 29, 2018 Author Share Posted August 29, 2018 Thanks Scipter! I have rewritten the code for Berserker Stance, but still its not working: intercepting = "no" if GetSpellCooldown("Charge") ~= 0 and GetSpellCooldown("Intercept") == 0 then intercepting = "yes" end Best regards Link to comment https://wrobot.eu/forums/topic/10012-intercept-macro-arms-pvp-335a-question/#findComment-46960 Share on other sites More sharing options...
Naiters 2 Posted August 29, 2018 Author Share Posted August 29, 2018 When I add a second condition apart from the Lua Code, "Target Distance, Bigger or Equal 8", it stops working :x Link to comment https://wrobot.eu/forums/topic/10012-intercept-macro-arms-pvp-335a-question/#findComment-46961 Share on other sites More sharing options...
ScripterQQ 89 Posted August 29, 2018 Share Posted August 29, 2018 You need to do test on a dummy, like manually use charge, switch stance (to berserker), and go away, and see if it intercepts automatically the dummy. If yes, then the code is correct, and you just need to add the automatic Berserker Stance switch. In few words, you need to test step by step, don't try to execute too many spells/combinations, test one at time and see if it works, then proceed to the next spell. What you should test step by step is something like this: Automatically charge if target is away and in charge range > switch to berserker stance if target is away and you don't have charge but you have intercept > Intercept Also don't forget to check on the top right corner the conditions like "combat only (put false)" or "check if target is in view (put false)" and so on. Link to comment https://wrobot.eu/forums/topic/10012-intercept-macro-arms-pvp-335a-question/#findComment-46970 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now