Jump to content

Findeh

Members
  • Posts

    365
  • Joined

  • Last visited

Posts posted by Findeh

  1. This will not work. Bot will move to the closest NPC (that can't repair) and will try to repair from him. After ~10 seconds he will realize that he can't repair here, and will not sell anithing to that vendor as well. Will just quit it.

    The problems are:
    1) Bot first try to repair from vendor (no matter what type of vendor is that)
    2) Bot is not selling stuff if he can't repair from vendor (even is that vendor can't repair items at all)

    Is it should be like that or that's a bug?

  2. If i get it right, in your example

    double cooldownTimer

    Will be a constant, right?

    But the problem is, it may be different, it's not a constant for the same spell. Spell may be different level (lvl 1 heal may be 1,5s cast and the same lvl 6 spell may be 3,5s cast). Spell cast time may be buffed by talants, or may be not buffed, depending on character. Cast time may be hited back by incoming damage or kicked. If it was hitted back, delay should be longer, if it was kicked, it should be shorter. In a word, it's complicated.

     

  3. Okay, it's not working. Not the code itself, it works perfectly. Thank you.

    But not the events. They are not what i expected.
    PLAYER_REGEN_ENABLED happens after every combat, even if you don't need to regen, so it's not like "Am i need to regen?" more like "Lets check do i ned it or not"
    So any action that happenf with condition id==PLAYER_REGEN_ENABLED will happen after every combat. But will not happen after resurection or bot satart.

    The problem is, you may need regen not only after combat. For example after you have buffed or healed or casted something while run or just have resurected. That's what i'd like to check. The only solution that i can imagine right now is to check in a loop: is your current mana less then you regenerate mana setting? And same for health.

    And if it's true, force-regen somehow. Don't know how. Any advices maybe?

  4. Good day, guys.

    Have tried to solve some existing bot problems by listening an events. The idea is, for example,, when bot need to regen, do something.
    So i've tried to listen in loop like this:

    Spoiler
    
    while (_isLaunched)
    {
      try
      {
          #region Events
          EventsLuaWithArgs.OnEventsLuaWithArgs += delegate (LuaEventsId id, List<string> args)
          {
            #region PLAYER_REGEN_ENABLED
            if (id == LuaEventsId.PLAYER_REGEN_ENABLED)
            {
                Lua.LuaDoString("blah-blah-blah");
            }
            #endregion
          };
          #endregion
      {
      catch(Exception)
      {
         // Panic   
      }
      Thread.Sleep(500);
    }

     

    But it's do nothing, and, to be honest, i don't understand how it works, so can't get what am i doing wrong and it how to fix this. Maybe the problem is like: "everithing wrong", sorry for that, i'm writing shit-code not on purpos, just because of my stupidity.

  5. Got exactly the same problem with different classes. Have anyone solved it already? Or maybe any advices for solving it? Sometimes this issue causes unending loop of death, resurrect -> engage fight with no mana / health -> realise spirit -> repeat. So it's kind of annoying.

    Food options: 40-80%
    Drink options: 20-80% Use Drink true

    UPD have tryed to turn Attack Before Been Attacked to false, it's not helping. It seems like the Regen happens only on fight end, but when you have resurected, that's not a fight end, so lets engage.. Will try to check it tooday.

  6. On 22.08.2017 at 8:34 PM, Apexx said:

    It still is casting Lesser Heal twice even though my heath is >= to the determined value set in my settings. It was working fine with my spell Timer before.

    The simple conditions like this seems working for me:
     

    if (ObjectManager.Me.HealthPercent < 40 && !ObjectManager.Me.IsCast)
    {
    	Spell.Launch(true, true, false);
    }


    UPD: No, i lied, not working, still casting twice

  7. Good day. Sorry in advance for my english.

    Sometimes in the log i'm getting the message: "Player attacked by other unit, skip this fight"
    Right now my fightclass is not working properly when this message is apears, and my bot dies.

    For example, there is 2 bears. Bot runs to them, getting that message and after that he seems like not counting one of the bears as a target, because ObjectManager.GetUnitAttackPlayer().Where(u => u.GetDistance <= 5).ToList().Count > 1 returns false, he is not doing what he supose to do in cases where is 2 or more attackers and he dies.

    But if i pull the same 2 bears with the bot program stopped, and only then press "start the bot" then he will count this 2 bears as 2 targets and there will no problem for him to kill them.

    So the question is, what is that message means, why is it happens at the totally normal pack of 2 mobs and how to force bot not do this (not try to skip the fight and die)

    Thank you for any advices.

  8. Thank you, but even with this plugin installed my bot just goes to the vendor, tryes to interact with him, geting the message "Cannot speak while shapeshifted" cancels shapeshift, blacklists the vendor and goes to another location (dieing because of high level mobs there). That does seems right at all.

    And targeting will not work with mailboxes or any other npc. :(

  9. Thank you once again for your advices.

    Don't know why but if i'm placing OnFightEnd it's ruin skinning.

    Did it this way. Buff() code block used all the time (no condition), but every buff is used with like 6 different conditions. Still not perfect, but atleast it buffs before combat as well now.

    I have tryed as well to make bot stop moving if we are inside the buff section and we need to buff, but it looks wierd, not like it supose to be. He starts to move alittle wierd shaking :)

×
×
  • Create New...