Jump to content

Recommended Posts

Because wrobot didnt support fights on mounts at the moment, we have to do a lot of changes to get a working fightclass. And this fightclass supports the Nagrand Mounts only in wrotation. But if you want ride and fight, here is what you have to do:

 

Enable fight on Mount in every spell:

      <CastIfMounted>true</CastIfMounted>

And you have to disable fighting, if you are on the wrong mount:

        <FightClassCondition>
          <ContionType>LuaScript</ContionType>
          <Param xsi:type="FightClassConditionLua">
            <LuaScript>
    local goodMountBuff={164222,165803}
    local goodMount=false
    for n=1,#goodMountBuff do goodMount=goodMount or (UnitBuff("player",GetSpellInfo(goodMountBuff[n]))~=nil); end
    if (not IsMounted()) or goodMount then
        result=true
    end
            </LuaScript>
            <VarRet>result</VarRet>
            <ValueRet>true</ValueRet>
          </Param>
        </FightClassCondition>

goodMountBuff = Buffs that we get, if we are mounted. Other mount buffs could be added later.

for n=1....    = check, if one of the buffs are set.

goodMount = true, if so

 

 

But there are a alot of small problems to solve. I.e.:

<CombatOnly>true</CombatOnly>

didn't work . So you have to find another solution, if you needed. Maybe

UnitAffectingCombat("player")

could help.

 

 

 

Also the Build in Buff condition didn't work if mounted. (Droidz want to make it very secure ;-) ). So you have changed this

        <FightClassCondition>
          <ContionType>Buff</ContionType>
          <Param xsi:type="FightClassConditionStringBool">
            <Name>Blade Flurry</Name>
            <Need>true</Need>
          </Param>
        </FightClassCondition>

to a lua script like this:

        local chkValue=true  --[[1784=Stealth,73651=Recuperate]]
        local chkBuffs={1784,false,73651,false};     for n=1,#chkBuffs,2 do chkValue=chkValue and ((UnitBuff("player",GetSpellInfo(chkBuffs[n]))~=nil)==chkBuffs[n+1]); end
        result=chkValue

chkBuffs contains the buff and the value that the Buff should have. false=buff no set, true, buff is set.

 

 

 

At last HealthPercent and TargetHealthPercent didnt work. A solution is

((UnitHealth("player") / UnitHealthMax("player") * 100) &lt; 75)

(means Health>75 % )

 

 

So, a lua code, that must contain all the conditions could be look like that:

        ...
        ...
        <FightClassCondition>
          <ContionType>LuaScript</ContionType>
          <Param xsi:type="FightClassConditionLua">
            <LuaScript>
    local goodMountBuff={164222,165803}
    local goodMount=false
    for n=1,#goodMountBuff do goodMount=goodMount or (UnitBuff("player",GetSpellInfo(goodMountBuff[n]))~=nil); end
    if (not IsMounted()) or goodMount then
        local chkValue=true  --[[1784=Stealth,73651=Recuperate]]
        local chkBuffs={1784,false,73651,false};     for n=1,#chkBuffs,2 do chkValue=chkValue and ((UnitBuff("player",GetSpellInfo(chkBuffs[n]))~=nil)==chkBuffs[n+1]); end
        result=chkValue and ((UnitHealth("player") / UnitHealthMax("player") * 100) &lt; 75)
    end
            </LuaScript>
            <VarRet>result</VarRet>
            <ValueRet>true</ValueRet>
          </Param>
        </FightClassCondition>
      </FightClassConditions>
      <CombatOnly>false</CombatOnly>
      <CastIfMounted>true</CastIfMounted>
...

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...