Open divinity76 opened 9 years ago
Hi again, Sorry for the big delay in my answer. I had to do a big transfer of a lot of domains to a better hosting because my old one (hosting24.com) had a combo of multiple disasters in few time and their lack of admin skill was causing me a lot of problems and headaches. Well, now I am back.
About cavebot recorder: It is a good idea, but considering the way that my cavebot works, I would recommend you to only add 1 waypoint each 4 squares. Exception: if you changed floor then you should add the new position inmediately.
About speed optimization: The fastest way would be to add the points to cavebot script in the event of receiving a packet that modify myx, myy or myz. That is modMap.bas , function LearnFromPacket, in following cases:
Case &HBE
' up -1 floor
Case &HBF
' down +1 floor
Case &H65
' north update
Case &H66
' right update
Case &H67
' south update
Case &H68
' left update
You can make some array of vars, for multiclient recording, to store last saved x,y,z and decide if you add the point or not: Public myAutoCavebotX() As Long Public myAutoCavebotY() As Long Public myAutoCavebotZ() As Long
Finally do a function tryAddToCavebot(idConnection,x,y,z) and there decide if you should add a new point or not, based on the distance to the last added point. If z is different then you should always add it. When you add a point you should update myAutoCavebotX(idConnection),myAutoCavebotY(idConnection) and myAutoCavebotZ(idConnection) with the new point.
a cavebot xyz auto recorder would be nice i made one myself, but i didn't know where to put the buttons etc, and i don't like the fact that my version modifies the frmHardcoreCheats->positionUpdate code, which afaik, can be very cpu intensive, so there's probably a better way to do this, but i don't know how. so i'm just gonna post my (tested & working) sample implementation here, and hope that you'll make something similar (or improve my code?) for the official blackd proxy:
in frmCavebot , add a AutoRecord checkbox button. and the click event:
then in frmHardcoreCheats add new function:
again, note that in frmHardcoreCheats , there's a warning about chkAutoUpdateMap being slow ( i guess that means it use a lot of cpu), so there's probably a better way to do this.. i just don't know it.
anyway, the result is that a move x,y,z is automatically added each time you move your character, which is nice, especially on areas where the cavebot easily get confused/stuck and unable to find the path, in those areas, i have experienced that being very explicit about move instructions, help the cavebot to not get stuck