Womble 9 Posted February 24, 2014 Share Posted February 24, 2014 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. Link to comment Share on other sites More sharing options...
Droidz 2737 Posted February 25, 2014 Share Posted February 25, 2014 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 Link to comment Share on other sites More sharing options...
Womble 9 Posted February 25, 2014 Author Share Posted February 25, 2014 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? Link to comment Share on other sites More sharing options...
Droidz 2737 Posted February 25, 2014 Share Posted February 25, 2014 Try this, tell me if this works HSProt.xml Link to comment Share on other sites More sharing options...
Womble 9 Posted February 25, 2014 Author Share Posted February 25, 2014 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' Link to comment Share on other sites More sharing options...
Womble 9 Posted February 25, 2014 Author Share Posted February 25, 2014 Also, what does 'local threat = UnitDetailedThreatSituation("player", "target")' do? Link to comment Share on other sites More sharing options...
Bugreporter 93 Posted February 26, 2014 Share Posted February 26, 2014 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 Link to comment Share on other sites More sharing options...
Droidz 2737 Posted February 26, 2014 Share Posted February 26, 2014 ... 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 Link to comment Share on other sites More sharing options...
Droidz 2737 Posted February 26, 2014 Share Posted February 26, 2014 You can found wow lua functions here: http://wowpedia.org/World_of_Warcraft_API Link to comment Share on other sites More sharing options...
Womble 9 Posted February 26, 2014 Author Share Posted February 26, 2014 I put the code you fixed into Notepad++ it shows this: - I assume the red line form top to bottom indicates an error? Link to comment Share on other sites More sharing options...
Bugreporter 93 Posted February 26, 2014 Share Posted February 26, 2014 no, it covers (show) only the if-then-end block Link to comment Share on other sites More sharing options...
Womble 9 Posted February 26, 2014 Author Share Posted February 26, 2014 I think 'UnitBuff("player",GetSpellInfo(122510))' should be 'UnitBuff("player"),GetSpellInfo(122510))' ? At least the error goes away then. Link to comment Share on other sites More sharing options...
Womble 9 Posted February 26, 2014 Author Share Posted February 26, 2014 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. Link to comment Share on other sites More sharing options...
Bugreporter 93 Posted February 26, 2014 Share Posted February 26, 2014 NO !. You make a additional error. UnitBuff("player",GetSpellInfo(122510)) is the right one. notepad doesn't make syntax checks. It only shows blocks Link to comment Share on other sites More sharing options...
Womble 9 Posted February 26, 2014 Author Share Posted February 26, 2014 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. Link to comment Share on other sites More sharing options...
Bugreporter 93 Posted February 26, 2014 Share Posted February 26, 2014 maybe bracket around UnitPower("player") >= 85 . but one a the first view the syntax looks good. Link to comment Share on other sites More sharing options...
Bear T.O.E. 63 Posted March 18, 2014 Share Posted March 18, 2014 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. Link to comment 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