Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PROBLEM -> If you have LAG the target STOPS
#1
Hi!

I've checked that when my connection is lagging the target bugs.

The bot keep attacking (with the red square) therefore not really attacking...

I thought to do a persistent that STOP and ATTACK AGAIN if the target is selected more than 1 minute, example.

Could anyone help me with this?

Thx
Reply

#2
Hello.

It's not a bug on Bot, but on game-client.

I didn't tested this code, but you can try:
local MAX_TIME_ATTACKING = { Min = 30, Max = 60 } -- IN SECONDS. A random number between that values will be sorted, the maximum time attacking a monster. A number will be sorted everytime that it changes target.
local RE_ATTACK = false -- Should reattack monster? It's not necessary use this if you are using Targeting or trainer, but it's your choice.



if LAST_ATTACK_ID == nil then
    LAST_ATTACK_ID = 0
end

if TIME_CHECK == nil then
    TIME_CHECK = 0
end

local attacked_creature = attacked()
if attacked_creature.id > 0 and attacked_creature.id ~= LAST_ATTACK_ID then
    TIME_CHECK = runningtime() + random(MAX_TIME_ATTACKING.Min, MAX_TIME_ATTACKING.Max)
    LAST_ATTACK_ID = attacked_creature.id
elseif attacked_creature.id > 0 and attacked_creature.id == LAST_ATTACK_ID and TIME_CHECK > 0 and runningtime() >= TIME_CHECK then
    stopattack()
    if RE_ATTACK then
        attack(attacked_creature.id)
    end
    TIME_CHECK = 0
    LAST_ATTACK_ID = 0
end
Reply

#3
Really thank you! Solved the question.
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016