Jump to content

Stealth (a solution)


Bugreporter

Recommended Posts

Use Stealth if hostile 30 Yards away but only in pvp or solo

    <FightClassSpell>
      <SpellName>Stealth</SpellName>
      <FightClassConditions>
        <FightClassCondition>
          <ContionType>HostileUnitNear</ContionType>
          <Param xsi:type="FightClassConditionUnitNear">
            <Type>Bigger</Type>
            <Radius>30</Radius>
          </Param>
        </FightClassCondition>
        <FightClassCondition>
          <ContionType>LuaScript</ContionType>
          <Param xsi:type="FightClassConditionLua">
            <LuaScript>
			--[[ PvP or solo AND No Casting and Stealth off and ready ? ]]
			local idStealth=1784
			local start, duration, enabled = GetSpellCooldown(idStealth); 
			result=((UnitIsPVP("player") or (UnitInParty("player")==nil)) and (duration==0) and (enabled==1) and not (UnitCastingInfo("player")) and not (UnitChannelInfo("player"))) 
			</LuaScript>
            <VarRet>result</VarRet>
            <ValueRet>true</ValueRet>
          </Param>
        </FightClassCondition>
        <FightClassCondition>
          <ContionType>MeInCombat</ContionType>
          <Param xsi:type="FightClassConditionBool" />
        </FightClassCondition>
        <FightClassCondition>
          <ContionType>MeIsFlying</ContionType>
          <Param xsi:type="FightClassConditionBool" />
        </FightClassCondition>
      </FightClassConditions>
      <Priority>11</Priority>
      <CombatOnly>false</CombatOnly>
      <CheckIfKnowUsableDistance>false</CheckIfKnowUsableDistance>
      <CheckIfView>false</CheckIfView>
      <AddToSettings>true</AddToSettings>
      <DescriptionSpell>Stealth. If hostile 30 Yards away. only pvp or solo</DescriptionSpell>
    </FightClassSpell>

based on WoW 5.4.2.

 

Link to comment
Share on other sites

  • 9 months later...

This is not working for me.

 

I get this in debug mode

 

[D] 18:37:57 - Stealth (Stealth. If hostile 30 Yards away. only pvp or solo) - NeedToRun = false - condition
[D] 18:37:57 - Stealth (Stealth. If hostile 30 Yards away. only pvp or solo) - NeedToRun time to execute: 0
[D] 18:37:58 - Stealth (Stealth. If hostile 30 Yards away. only pvp or solo) - NeedToRun = false - condition
[D] 18:37:58 - Stealth (Stealth. If hostile 30 Yards away. only pvp or solo) - NeedToRun ....
Link to comment
Share on other sites

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...