These are chat archives for BenDol/otclient-candybot

13th
May 2015
andy
@lbakiller
May 13 2015 20:38 UTC
@BenDol I currently only have a hardcoded version working. (sort of)
local openBackpacks = g_game.getContainers()
you could use that to index the opened backpacks for space or to let the autolooter put an item in bp2 or w/e
anyway,
does any1 know of a sleep function within otclient?
I need a delay of somesort.
andy
@lbakiller
May 13 2015 20:48 UTC
as for the attacker problem I tought of doing somthing like this
in the AutoTarget.Event function
    g_game.attack(target)
    print('we should attack')
    sleep(1)
    if targetHealth == target:getHealthPercent() then
      print('test Cancel')
      sleep(1)
      if targetHealth == target:getHealthPercent() then
        g_game.cancelAttackAndFollow()
        print('we killed the proccess')
      end
    end