Hello,
You can use this to create bots or whatever, this basically gives you a pointer to player socket, which you can use to send raw net messages to the server.
Signature:
And how the class looks like:
Note, some of these functions when called, will generate a Tibia "Exception" so be careful
Note, this class has a base class called CBaseSocket or so, don't quite remember the name, the vftable is aligned properly, though so you don't have to worry.
Have fun if this somehow is useful to anyone, I don't know, it may be still relevant, i just decided to do it in my free time for fun.
You can use this to create bots or whatever, this basically gives you a pointer to player socket, which you can use to send raw net messages to the server.
Signature:
Code:
\x89\x35\x00\x00\x00\x00\x85\xC9\x74\x0D xx????xxxx
And how the class looks like:
Code:
|_ CPlayerSocket
+ 0 = vftable
|_
virtual void init();
virtual void null_0();
virtual int accept_conn();
virtual int close_socket();
virtual int receive(char *buf, int len, int flags);
virtual int send(char *buf, int len, int flags);
virtual void ensure_connected(int something);
virtual void null_1();
virtual void null_2();
virtual void null_3();
virtual void unk_1();
virtual void unk_2();
virtual BOOL connect(struct sockaddr *name, int namelen);
virtual int recvfrom(char *buf, int len, struct sockaddr *from, int *fromlen, int flags);
virtual int sendto(char *buf, int len, struct sockaddr *to, int tolen, int flags);
+ 4 = socket fd
Note, some of these functions when called, will generate a Tibia "Exception" so be careful
Note, this class has a base class called CBaseSocket or so, don't quite remember the name, the vftable is aligned properly, though so you don't have to worry.
Have fun if this somehow is useful to anyone, I don't know, it may be still relevant, i just decided to do it in my free time for fun.