blackdtools / Blackd-Proxy-CLASSIC

Blackd Proxy CLASSIC
MIT License
9 stars 7 forks source link

[7.6] [very detectable cavebot bug] Cavebot (sometimes?) spams the attack packet on same monster #57

Closed divinity76 closed 8 years ago

divinity76 commented 8 years ago

The cavebot will spam the same attack packet on the same creature several times while fighting (at least with setRetryAttack), without the current attack ever being canceled. the real tibia client, without cheating, will NEVER send the same "attack that monster" packet without the current attack being canceled. (like, changing target, or changing floor, or creature dying)...

this bug was supposedly fixed in version Blackd Proxy 24.0, but in 37.1, the bug is back! (hmm, was it ever fixed?)

Blackd Proxy 24.0
----------------------------
 - Fixed another detectable thing in the cavebot attack function. Cavebot should be very hard to detect now. However we won't guarantee anything yet.
 - Fixed a rare problem in market
 - Fixed a common problem with the trainer menu
 - Activating a premium scroll should not crash Blackd Proxy now
 - Now cavebot will not have a time limit to kill monsters, unless you include this to your script: SetBot EnableMaxAttackTime=1
 - Now cavebot will resync with Tibia client memory to ensure that it is really attacking the correct creature
 - Now cavebot will not trigger any pk alarm during the first 5 seconds, to avoid false alarms

24.0 was before GitHub, Daniel, remember where the fix code is?

divinity76 commented 8 years ago

fixed in commit https://github.com/blackdtools/Blackd-Proxy-CLASSIC/commit/43f9af554f9fa9b29de2bb5b0f21f471120ce688

divinity76 commented 8 years ago

@Nrated have you noticed that the cavebot attacks slower than normal attack in 7.6? that's because in many 7.6 servers, the first attack is slower (say, 1.5 seconds) than the following attacks (say, 1 second), and when blackd proxy spams the attack packet, its constantly getting reset to the "first attack" speed :p you should update your local version with this fix too.. that's how i noticed something was wrong

divinity76 commented 8 years ago

also fix in https://github.com/blackdtools/Blackd-Proxy-CLASSIC/commit/0e2477139f503affec08f6257f3e30c4a3e974ba

Nrated commented 8 years ago

Well I wasn't really investigating this thing but it's nice to know. I've had problems with attacking first few monsters lately. Blackd wasn't attacking them at all for some reason so I've written simple function which was activated by command exiva attack mob name. If redSquare = 0 then it it looking for givenMonster in the range of screen and attacks the closest one. I'm way too lazy to look throught whole attacking function code xD There's a lot of useless conditions

divinity76 commented 8 years ago

@Nrated that's interesting.

does the attack work like normal with this attack packet spam bug fix? maybe you've come across a different bug entirely

Nrated commented 8 years ago

I wasn't testing your solution yet. That's just my earlier experience

divinity76 commented 8 years ago

@Nrated could you test it plz?

Nrated commented 8 years ago

There's still some kind of bug with attacking first creatures after activating cavebot. I've no idea whats wrong but after I'll manually attack one then it starts working by itself. Maybe there's problem with some unsigned/wrong signed variable or redsquare returns weird things at start? I can't test this thing today anyways

divinity76 commented 8 years ago

what OT and what monster is this? any monster?

Nrated commented 8 years ago

any OT server using YurOts ; p Yes it happens with all monsters I was using this to test it:

setNoFollow
setBot PKwarnings=0
setMeleeKill Black Knight
setLoot D7 0B
waitX 2
gotoScriptLine 0
divinity76 commented 8 years ago

@Nrated yeah there actually is a problem where it wont attack any monsters sometimes - when setRetryAttack is not active. do you still have that problem if you add setRetryAttack on the first line of the script? (i never noticed before because i always use setRetryAttack for reasons i've forgotten :p )

Nrated commented 8 years ago

Yes it does but it's sending a lot of attack packets and if server has higher delay for attacking monsters then you won't attack current redSquare monster at all. xD Basicly if server owner is smart then setRetryAttacks is like auto ban

blackdtools commented 8 years ago

I think redsquare address was not even defined on 7.6. I only started using it when cipsoft added the count of attacks as an aditional way of detecting bots.

Nrated commented 8 years ago

Im not sure what you mean but I've written for myself function that is using WriteRedSquare and it works perfectly for tibia 7.6

blackdtools commented 8 years ago

I see I made an exception and I defined the address RedSquare for Tibia 7.6 for some debug purposes. However I never used it from Tibia 7.7 to Tibia 8.61 so RedSquare is &H0 there and you should not try to use RedSquare address in such cases, unless you update such config files in first place. You better just leave old Blackd Proxy logic if RedSquare = &H0

divinity76 commented 8 years ago

@Nrated

Yes it does but it's sending a lot of attack packets and if server has higher delay for attacking monsters then you won't attack current redSquare monster at all. xD

that's exactly what i've fixed here ^^ now it will only send attack packet if it's not already attacking.

divinity76 commented 8 years ago

@blackdtools

see I made an exception and I defined the address RedSquare for Tibia 7.6 for some debug purposes. However I never used it from Tibia 7.7 to Tibia 8.61 so RedSquare is &H0

holy shit, it will still spam attack packets from 7.7 to 8.61 then! :/

divinity76 commented 8 years ago

that is a problem in OT servers where the first attack is slower than the following attacks - unlike cipsoft's servers, OT servers will reset your attack speed to "first attack" every time it sees the "start attack" packet