blackdtools / Blackd-Proxy-CLASSIC

Blackd Proxy CLASSIC
MIT License
9 stars 7 forks source link

DropLootOnFloor freeze cavebot indefinitely on 7.6 #22

Closed divinity76 closed 9 years ago

divinity76 commented 9 years ago

On tibia 7.6, on Outcastserver.com OT, the following script will make the character walk to the location, throwing some loot on the floor, then just stand there indefinitely.. (possibly trying to throw more stuff on the floor, i dont know.).. it will reach "dropLootOnGround 1011,689,13 " , but never reach "sayMessage dropped"

... any idea how to debug this?

resetKill SetMaxHit 99999 setRetryAttacks setBot LootAll=1 setNoFollow setBot PKwarnings=1 setBot AllowRepositionAtStart=1 setBot AllowRepositionAtTrap=1 setBot AutoEatFood=1 setMeleeKill bermudan draconis setSDKill bermudan draconis setPriority bermudan draconis:+5 setMeleeKill Arm Of Wrath setSDKill Arm Of Wrath setMeleeKill Demon setSDKill Demon setMeleeKill Orshabaal setSDKill Orshabaal setPriority Orshabaal:+4 SetMaxAttackTimeMs 999999 setBot EnableMaxAttackTime=0 :start dropLootOnGround 1011,689,13 sayMessage dropped move 1012,686,13 move 1008,697,13 move 1001,702,13 move 997,699,13 move 1008,700,13 move 1014,699,13 move 1021,699,13 move 1021,709,13 move 1020,713,13 move 1022,702,13 move 1027,699,13 move 1031,699,13 move 1035,690,13 move 1033,696,13 move 1031,698,13 move 1021,699,13 move 1021,707,13 move 1021,700,13 move 1012,699,13 move 1012,686,13 gotoScriptLine $nlineoflabel:start$

divinity76 commented 9 years ago

It keeps trying to send "0F 00 78 FF FF 41 00 0A 56 0D 0A F4 03 AE 02 0D 00 ", Which is a malformed "move Mastermind Shield From Opened Backpack ID 2 (vol ?) to Floor (X/Y/Z)"

BUT HERE IS THE PROBLEM: ITS TRYING TO MOVE 0. THE CLIENT WILL ALWAYS TRY TO MOVE 1.

Replace the last byte with 01 (meaning, move 1 mastermind shield, not "move 0 mastermind shields", which doesn't make any sense.), and the packet works as intended, and is identical to what the client would send, moving it manually. I haven't figured out how to fix this, but i am looking into it.

Should also check if its doing this mistake in RL tibia (it'd definitely be a detectable bug at cipsoft's side, even though i guess RL tibia will move the item even if you say "move 0" )

divinity76 commented 9 years ago

note that this fixes 7.6 only, and i suspect (but have not confirmed) that 7.7 / 7.72 might also be affected by this bug

divinity76 commented 9 years ago

Although i still believe 7.72 to be affected, at least the 7.6 issue is fixed in commit https://github.com/blackdtools/Blackd-Proxy-CLASSIC/commit/7403ed51d9984f1d3c86bb9e0380b9709a402a90 , thus i am closing this github issue . (can make a separate 7.72 issue if anyone complains..)