How to move you character through packets

04/25/2020 19:22 CapitanoKidd#1
Hi, I wanted to know if it was possible, possibly by using the packetlogger, to emulate the click on map and make your character to move to a certain position.
Just using the "walk" packet with the coordinates doesn't work.
Pls Help
04/25/2020 19:25 Blomex#2
Maybe you are trying to use walk coordinates that are too far away?

you cannot simply send packet walk 100 100 if your coordinates are 90 90, because you will get disconnected.
but if you are at 90 90, you can easily move to 91 91 or 92 92 coordinates.
04/25/2020 19:35 CapitanoKidd#3
Quote:
Originally Posted by Blomex View Post
Maybe you are trying to use walk coordinates that are too far away?

you cannot simply send packet walk 100 100 if your coordinates are 90 90, because you will get disconnected.
but if you are at 90 90, you can easily move to 91 91 or 92 92 coordinates.
Yes I know what you are saying, but I wanted something similar to what happens when you click on the minimap and the character moves to that position. It would be pretty difficult to send a new walk packet every second, just to get there
04/25/2020 19:41 Limoo#4
Quote:
Originally Posted by CapitanoKidd View Post
Yes I know what you are saying, but I wanted something similar to what happens when you click on the minimap and the character moves to that position. It would be pretty difficult to send a new walk packet every second, just to get there
You must create a program that communicates to the packetlogger and that sends the packet with the updated coordinates every second.

[Only registered and activated users can see links. Click Here To Register...] has TCP connection
04/25/2020 19:42 Pumba98#5
It's not possible without some kind of "logic" that sends the correct packets for you.
keep in mind that the "walk" packet is only server side movement. You won't see your character moving (you can only observe it with a second character)
04/25/2020 19:44 Apourtartt#6
Walk packet is : walk x y ((x+y)%3)%2 speed

First, as Blomex said, you can't just walk where you want from where you are, you have to do it step by step.
Imagine you are in 0;0 and you have a speed of 12, your step will be 4. So you can go to a maximum distance of 4.
If you want to go to the coordinate (50,50), it means you will go (4;4), (8;8), (12,12), ... (44,44), (48,48), (50,50)
so your packet would be something like
walk 4 4 0 12
walk 8 8 0 12
...
walk 50 50 1 12

That is all for the packet. But that could probably not fix your issue since walk packet only says to the server where you want to go (it can be denied if distance is too far, or if there is an unwalkable object in (x;y)
anyway, you won't see any change on your screen and will need tp packet in order to simulate it.

Tp packet is : tp [entityType] [entityId] [x] [y] 0

(I don't know what is the 0, you will probably have your answer in Opennos' source or something like that)

So when you send a walk in x;y, also simulate the recieve of tp 1 [yourId] x y 0 and you'll be fine !
04/25/2020 20:40 CapitanoKidd#7
Heh, thank you all for answering, I'd love to make a tool with this purpose, but sadly I'm not a programmer. Seeing what NosBota does with its waypoints I was hoping that there was a simpler way.
04/25/2020 23:42 Limoo#8
Quote:
Originally Posted by CapitanoKidd View Post
Heh, thank you all for answering, I'd love to make a tool with this purpose, but sadly I'm not a programmer. Seeing what NosBota does with its waypoints I was hoping that there was a simpler way.
Google how to communicate with a TCP server and you're done.
Then you just have to create your own ad hoc program (it's practically like creating a macro with AutoHotKey or AcTool)

I did it with the [Only registered and activated users can see links. Click Here To Register...] but you can use any language of which it's easy for you to learn the basics.
04/25/2020 23:44 FI0w#9
Quote:
Originally Posted by CapitanoKidd View Post
Heh, thank you all for answering, I'd love to make a tool with this purpose, but sadly I'm not a programmer. Seeing what NosBota does with its waypoints I was hoping that there was a simpler way.
You can use the Game Functions from the Client to do a walk like this. Most parts are here already in the Forum

You just need to find the new adresses(isnt that hard lol)


//Found on "Real NostaleSDK"
Code:
void MoveTo(uint32_t mapPos)
{
    // Ensure the base pointer has been found..
    if (PlayerObjManagerPointer == 0)
        return;
 
    // Read the pointer..
    auto pointer = *(uintptr_t*)PlayerObjManagerPointer;
    if (pointer == 0) return;
    pointer = *(uintptr_t*)pointer;
    if (pointer == 0) return;
 
    auto func = MoveToPositionFunction;
 
    __asm
    {
        push 1
        xor ecx, ecx
        mov edx, mapPos
        mov eax, pointer
        call[func];
    }
}
PS: With code like this the client auto sends the right walk packets so no handle needed for it. And bc you dont know much as i see:
You will see your Character Move with this witout a second client etc.