August 29, 20187 yr 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
August 29, 20187 yr 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
August 29, 20187 yr Author 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
August 29, 20187 yr Author When I add a second condition apart from the Lua Code, "Target Distance, Bigger or Equal 8", it stops working :x
August 29, 20187 yr 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.
Create an account or sign in to comment