Jump to content

Matenia

Elite user
  • Posts

    2226
  • Joined

  • Last visited

Posts posted by Matenia

  1. Can you just use my code example and see if it works?
    Another example:

    ExpirationDate = 2020-11-11 18:48:30 (static point in time)
    CurrentTime = 2020-11-11 18:48:20 (this obviously changes)
    FullBuffDuration = 10 seconds
    TimeLeft = ExpirationDate - CurrentTime (this will get lower and lower with time, at the start here, it's 10 seconds)
    TimeAlreadyPassed = FullBuffDuration - TimeLeft (this is 10-10 = 0)

    Now as time passes on, the result of TimeAlreadyPassed gets HIGHER and HIGHER until it reaches 10 eventually. 
    So if you look at my condition in my original post, you will see that I validated TimeAlreadyPassed for GREATER THAN 2.

    If you still haven't read the documentation, please do.

  2. My solution still stands. GetTime() is a timestamp of sorts. It ALWAYS changes.
    That's why you need to calculate the time that has already passed since the spell was applied, which is its full duration MINUS the in which it's going to end. And THAT needs to be larger than 2.

  3. What do you mean, "it doesn't work"? Is there a Lua error or is your condition just faulty and never gets hit?
    Because if you think about it, GetTime() always changes. You need to know when the buff/debuff started. 

    Yes, you know when it expires, but you don't know when it started unless you take the duration into account. You're not calculating "timeLeft" you're calculating "timeAlreadyPassed".

     

    local timeLeft = expiration - GetTime()
    local timeAlreadyPassed = duration - timeLeft
    
    if (timeAlreadyPassed > 2) then
    	CastSpellByName('Simple Logic')
    end

     

  4. I hardcode lists and partially rely on user feedback.

    Now you could parse combat log events, store the results per mob entry and maybe even serialize them. That way, you're good to go. Unfortunate though, if mobs are immune for only a few seconds and you never use certain spells anymore because they temporarily immuned thanks to a buff.

    Although I guess you could write some smart detection for a "buff state" in combination with the school/spell. Spell school can be ready from spell info and combatlog iirc.

  5. Okay, now we know there is actually a bug. Before when you didn't tell us anything, just saying "I can't turn off lua to move", we had no info. That's what log files are for and why Droidz asks for them. You cannot debug everything on your own machine all the time. For HMP, I do the same because it's impossible t recreate someone else's conditions on hard to find bugs.

  6. Bit more info. Where did you get ported? Or did wRobot just close with the warning? That can be quite buggy.
    Generally if you don't know what you're doing or can't risk to lose an account, you shouldn't run a bot. 

    If you're worried about losing it now, don't bot on it again - just run on a different account.
    Also nobody can give you specific advice for your server at all and you're generally better off NOT mentioning specifics accounts of what happened to you on what server, unless it's a thread specifically tailored to avoiding detection methods.

  7. GoToTask is blocking, it will not stop walking unless you also pass a breaking condition to the "whileCondition" parameter.
    Or use normal MovementManager.Go which is not blocking - but if you have a complete condition, it will just call MovementManager.Go over and over until the condition is fulfilled.

    This is tick-based vs blocking.

×
×
  • Create New...