Jump to content

kergudu

Members
  • Posts

    19
  • Joined

  • Last visited

Posts posted by kergudu

  1. Alex007, what you mean the "same situation"?

    1) With wrotation you cant join random BG even manually? or bot cant accept BG when it ready?

    2) with battlegrounder bot rejoins queue?

    3) Does plugin print something to log/console?

    Maybe your log could clarify the situation

  2. On 13.12.2017 at 8:19 PM, clbraver said:

    so making it 1500/1500 all it did was slow the bot down a lot, it still starts the skip "run past mobs" after I few loops. it has to be something to do with the targeting system.

    Simply add LUA code to some points of your path like this:

    lua: Dismount() TargetNearestEnemy() CastSpellByName("Multi-Shot")

    Use any spell to attack nearest enemy, i used AOE "Multi-Shot" in example. This will break circle. No need to increase latency. Or use universal script (for any class):

    lua: Dismount() TargetNearestEnemy() AttackTarget()

    See also 

     

  3. My variant (attacks only units in front of player +-90 degrees):

    public bool multiDot(string spell,int distance){
      WoWUnit target = ObjectManager.GetWoWUnitHostile()
       .Where(o => o.IsAlive && o.IsValid && !o.HaveBuff(spell) && o.GetDistance <= distance)
       .OrderBy(o => o.Health)
       .FirstOrDefault();
      WoWUnit oldFocus = ObjectManager.Target;
      if (target != null) {
        if (!MovementManager.IsFacing(ObjectManager.Me.Position, ObjectManager.Me.Rotation, target.Position, 1.6f)) return false;
        Interact.InteractGameObject(target.GetBaseAddress, true);
        SpellManager.CastSpellByNameOn(spell, "focus");
        Usefuls.WaitIsCasting();
        Interact.InteractGameObject(oldFocus.GetBaseAddress, true);
        return true;
      }
      return false;
    }

     

  4. C# variant (universal)

    public int craft(string profession, string matherial) {
      SpellManager.CastSpellByNameLUA(profession);
      Lua.LuaDoString("CloseTradeSkill()");
      string command = String.Format(
       "toCraft=0 local q,n,_,a=\"{0}\" "+
       "for i=1,GetNumTradeSkills() do n,_,a=GetTradeSkillInfo(i) if(n==q) then toCraft=a DoTradeSkill(i,a) break end end",
       matherial);
      int result = Lua.LuaDoString<int>(command,"toCraft");
      return result;
    }

     

  5. 11 hours ago, Droidz said:

    You can use C# with the condition name "C Sharp Code"

    Indeed. So, no need for 1), and for 3) C# conditions are

    ObjectManager.Me.IsFallingFar && !Me.HaveBuff("Levitate") // for levitate or some other levitate spells/trinkets

    ObjectManager.Me.BuffTimeLeft(new List<uint> {16593}) < 1000 // for Noggenfogger Elixir

     

  6. 52 minutes ago, camelot10 said:

     ObjectManager.Me.IsFallingFar

    It would be nice to have C# conditions in fight class editor, but for now there is only LUA. Of course, in C# fight class ObjectManager.Me.IsFallingFar is the best choice

  7. Some classes has spells to avoid falling damage. For example, priest has "Levitate". Problem is to detect when this spell required

    1) declare global LUA variable in additional C# code 

    string fallTime=Lua.LuaDoString("fallTime=nil","fallTime");

    2) add spell "Levitate", with options:

    Can move during cast = Yes; Cast if mounted = true; Cast spell on = player; Combat only = false

    3) add conditions for this spell:

    - Buff (Name=Levitate, Need=false)

    - Lua script, with return var "falling" and return value research "ok"

    falling="no"
    if(IsFalling()) then
      if (fallTime==nil) then
        fallTime=GetTime()
      elseif (GetTime()-fallTime>=1) then
        falling="ok" 
      end
    else
      fallTime=nil
    end

    Thats all. When priest falls more than 1 second, bot automatically buffs him. Now you can queue Arathi Basin and go def LM :smile:

    But not all

    Spoiler

    Other classes has chance too. Go to Gatzetdan and buy a lot of Noggenfogger Elixir. And now is time to hack it

    1) first step is the same

    2) Instead "Levitate" add LUA code, with the same options and timer=3000

    
    UseItemByName("Noggenfogger Elixir")

    3) Use the same conditions, and 1 more. This is LUA script with return var "need" and return value research "y":

    
    need="y"
    for i=1,40 do
     local n,_,_,_,_,_,x,_,_,_,id=UnitBuff("player",i)
     if n and id==16593 and x>1 then
      need="n"
      fallTime=nil
      break
     end
    end

    Now you have 33% chance to survive. Or acquare strange look. Or both :wacko:

  8. This bot has smelting/milling features, but no the same for crafting top matherials for leatherworking and tailoring. For example, it cant craft bolt of cloth from cloth stack. 

    So, i found some lua scripts and wrote snippets for fight class. Add this snippet to the bottom of fight class profile (with lowest priority), and it alow grind more cloth/leather and keep your bags empty.

    Grind Magnificent Hide (MOP):

    Spoiler
    
        <FightClassSpell>
          <FightClassConditions>
            <FightClassCondition>
              <ContionType>MeInCombat</ContionType>
              <Param xsi:type="FightClassConditionBool" />
            </FightClassCondition>
            <FightClassCondition>
              <ContionType>ItemCount</ContionType>
              <Param xsi:type="FightClassConditionItemNumber">
                <Number>50</Number>
                <Type>BiggerOrEqual</Type>
                <Id>72120</Id>
              </Param>
            </FightClassCondition>
            <FightClassCondition>
              <ContionType>HaveTarget</ContionType>
              <Param xsi:type="FightClassConditionBool" />
            </FightClassCondition>
            <FightClassCondition>
              <ContionType>InBattleground</ContionType>
              <Param xsi:type="FightClassConditionBool" />
            </FightClassCondition>
          </FightClassConditions>
          <SpellName>CastSpellByName("Leatherworking") local q,n,_,a="Magnificent Hide"for i=1,GetNumTradeSkills()do n,_,a=GetTradeSkillInfo(i)if(n==q)then CloseTradeSkill()DoTradeSkill(i,a)break;end;end</SpellName>
          <Priority>1</Priority>
          <CombatOnly>false</CombatOnly>
          <Timer>60000</Timer>
          <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
          <CanMoveDuringCast>No</CanMoveDuringCast>
          <CastOnSelf>true</CastOnSelf>
          <CastOn>player</CastOn>
        </FightClassSpell>

     

    Grind Bolt of Windwool Cloth (MOP)

    Spoiler
    
        <FightClassSpell>
          <FightClassConditions>
            <FightClassCondition>
              <ContionType>InBattleground</ContionType>
              <Param xsi:type="FightClassConditionBool" />
            </FightClassCondition>
            <FightClassCondition>
              <ContionType>MeInCombat</ContionType>
              <Param xsi:type="FightClassConditionBool" />
            </FightClassCondition>
            <FightClassCondition>
              <ContionType>HaveTarget</ContionType>
              <Param xsi:type="FightClassConditionBool" />
            </FightClassCondition>
            <FightClassCondition>
              <ContionType>ItemCount</ContionType>
              <Param xsi:type="FightClassConditionItemNumber">
                <Number>5</Number>
                <Type>BiggerOrEqual</Type>
                <Id>72988</Id>
              </Param>
            </FightClassCondition>
          </FightClassConditions>
          <SpellName>CastSpellByName("Tailoring") local q,n,_,a="Bolt of Windwool Cloth"for i=1,GetNumTradeSkills()do n,_,a=GetTradeSkillInfo(i)if(n==q)then CloseTradeSkill()DoTradeSkill(i,a)break;end;end</SpellName>
          <Priority>1</Priority>
          <CombatOnly>false</CombatOnly>
          <Timer>60000</Timer>
          <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
          <CanMoveDuringCast>No</CanMoveDuringCast>
          <CastOnSelf>true</CastOnSelf>
          <CastOn>player</CastOn>
        </FightClassSpell>

     

    If you want to grind other top crafted matherials, just change it name in lua script and item id and count in FightClassConditionItemNumber condition

×
×
  • Create New...