February 24, 201412 yr Today I have something new, none rogue related. Until I get help regarding a couple of my rogue threads I decided to leave that rather than do further damage trying to improve it. I've now decided to make a protection warrior one to (the aim) a high level. Very simple problem I have, the proc, buff 'Ultimatum' doesn't seem to work at all when placed alongside Heroic Strike or Cleave. The buff gives you a rage free Heroic Strike or Cleave but doesn't work whether with a normal HS / Cleave or one using an lua script for either condition. I noticed someone who created one of the other protection warrior profiles also said he had the same issue.
February 25, 201412 yr Hello, I don't have warrior, but I have found it: http://dl.dropboxusercontent.com/s/dng7cwknxh52nh4/AzN_WARRIOR_Abilities.xml (pqr profile): http://www.wowhead.com/spell=122510 ID = 122510 http://www.wowhead.com/spell=2565 ID = 2565 http://www.wowhead.com/spell=122016 ID = 122016 http://www.wowhead.com/spell=845 ID = 845 http://www.wowhead.com/spell=78 ID = 78 Ability: Prot Heroic Strike local playerhealth = 100 * UnitHealth("player") / UnitHealthMax("player") local targethealth = 100 * UnitHealth("target") / UnitHealthMax("target") local threat = UnitDetailedThreatSituation("player", "target") local start, duration, enabled = GetSpellCooldown(2565) if (start + duration - GetTime() > 0 and UnitPower("player") >= 85) or UnitBuffID("player",122510) or UnitBuffID("player",122016) then if AoE == true then CastSpellByName(GetSpellInfo(845)) else CastSpellByName(GetSpellInfo(78)) end end
February 25, 201412 yr Author So I could just use the code you provided and it would work? What about the 'research' and 'var' values? Can these be left blank?
February 25, 201412 yr Author Hi. Your code doesn't work: - condiok = 0; local playerhealth = 100 * UnitHealth("player") / UnitHealthMax("player") local targethealth = 100 * UnitHealth("target") / UnitHealthMax("target") local threat = UnitDetailedThreatSituation("player", "target") local start, duration, enabled = GetSpellCooldown(2565) if (start + duration - GetTime() > 0 and UnitPower("player") >= 85) or UnitBuff ("player",GetSpellInfo(122510)) or UnitBuff("player",GetSpellInfo(122016)) then condiok = 1; end but I decided to play around with it and can get it to work: - condiok = 0; local playerhealth = 100 * UnitHealth("player") / UnitHealthMax("player") local targethealth = 100 * UnitHealth("target") / UnitHealthMax("target") local threat = UnitDetailedThreatSituation("player", "target") local start, duration, enabled = GetSpellCooldown(2565) if UnitPower("player") >= 85) or UnitBuffID("player",122510) then condiok = 1; end The only difference is I took out 'if (start + duration - GetTime() >0' and then deleted the ')' after the UnitPower check since that closed bracket wasn't needed any more. I also removed the Incite check because I didn't want that in. It works like this, been watching it carefully. Out of curiosity though, why doesn't the Shield Block part of your 'HSProt.xml' work, any idea? These parts: 'local start, duration, enabled = GetSpellCooldown(2565) if (start + duration - GetTime() > 0'
February 25, 201412 yr Author Also, what does 'local threat = UnitDetailedThreatSituation("player", "target")' do?
February 26, 201412 yr In this case: nothing. It isn't used. in other cases you could test, if you are the main tank and your aggro status http://www.wowwiki.com/API_UnitDetailedThreatSituation
February 26, 201412 yr ... condiok = 0; local playerhealth = 100 * UnitHealth("player") / UnitHealthMax("player") local targethealth = 100 * UnitHealth("target") / UnitHealthMax("target") local threat = UnitDetailedThreatSituation("player", "target") local start, duration, enabled = GetSpellCooldown(2565) if UnitPower("player") >= 85) or UnitBuffID("player",122510) then condiok = 1; end The only difference is I took out 'if (start + duration - GetTime() >0' and then deleted the ')' after the UnitPower check since that closed bracket wasn't needed any more. I also removed the Incite check because I didn't want that in. It works like this, been watching it carefully. Out of curiosity though, why doesn't the Shield Block part of your 'HSProt.xml' work, any idea? These parts: 'local start, duration, enabled = GetSpellCooldown(2565) if (start + duration - GetTime() > 0' You code has errors. - Before "UnitPower("player")" add "(". - "UnitBuffID("player",122510)" is an PQR function (no wow function), replace it by "UnitBuff("player",GetSpellInfo(122510))". - I have also removed unused variables. Result: condiok = 0; if (UnitPower("player") >= 85) or UnitBuff("player",GetSpellInfo(122510)) then condiok = 1; end
February 26, 201412 yr You can found wow lua functions here: http://wowpedia.org/World_of_Warcraft_API
February 26, 201412 yr Author I put the code you fixed into Notepad++ it shows this: - I assume the red line form top to bottom indicates an error?
February 26, 201412 yr Author I think 'UnitBuff("player",GetSpellInfo(122510))' should be 'UnitBuff("player"),GetSpellInfo(122510))' ? At least the error goes away then.
February 26, 201412 yr Author no, it covers (show) only the if-then-end block Yea, to show there is an error between that piece of code I think. At least see my previous post, it 'fixes' it.
February 26, 201412 yr NO !. You make a additional error. UnitBuff("player",GetSpellInfo(122510)) is the right one. notepad doesn't make syntax checks. It only shows blocks
February 26, 201412 yr Author Right, it just looks like its pointing out an error, guess not. So, my finished HS is: - condiok = 0; local playerhealth = 100 * UnitHealth("player") / UnitHealthMax("player") if UnitPower("player") >= 85 or UnitBuff ("player",GetSpellInfo(122510)) and (playerhealth >= 75) then condiok = 1; end and my finished Cleave: - condiok = 0; local playerhealth = 100 * UnitHealth("player") / UnitHealthMax("player") if (UnitBuff ("player",GetSpellInfo(2565)) and (playerhealth >= 50) and UnitPower("player") >= 30) or UnitBuff ("player",GetSpellInfo(122510)) then condiok = 1; end I tried to play around and get '(playerhealth >= 50)' to work - at first I had no luck but then I managed to get it to work. The local playerhealth line basically works out the % of the players health if you do the math so I then attempted to get it to work at certain values. I assume the code is correct? They both seem to work properly with the AND's / OR's at least.
February 26, 201412 yr maybe bracket around UnitPower("player") >= 85 . but one a the first view the syntax looks good.
March 18, 201412 yr so based off this you could have the bot recognize the lvl of threat the tank has on a target and then react accordingly? If this is so then why not have the bot when tanking multiple mobs sift through the targets within the melee range. And if the Mob runs out of this melee range and have aggro on a party member then the bot will act accordingly to taunt the mob off the team mate. This can also be set to work solo tanking, with the acception of having to taunt. The tanks DPS would increase as well. Im sure there will have to be some C+ code in this somewhere do to protected API and LUA Commands.
Create an account or sign in to comment