Skip to content

[poc] get creature names#2

Open
elkolorado wants to merge 3 commits intogiuinktse7:masterfrom
elkolorado:master
Open

[poc] get creature names#2
elkolorado wants to merge 3 commits intogiuinktse7:masterfrom
elkolorado:master

Conversation

@elkolorado
Copy link
Copy Markdown

@giuinktse7 do you think this is also possible for creature (monsters/npcs) names?

@giuinktse7
Copy link
Copy Markdown
Owner

Possibly, I have not tried this myself. Does the code in this PR get you the monster/NPC names?

@elkolorado
Copy link
Copy Markdown
Author

elkolorado commented Sep 11, 2024

I've just coded it blindly without ever running it so idk. I've assumed how it should be basing on the one that was getting the names of items

run it with mon instead of send

case "mon":
SendCreatureLookRequests();

Also, there probably will be same error for guessing the correct IDs (if wont find prolly will crash). They vary, some +- be found here https://tibia.fandom.com/wiki/Creature_IDs for testing.

ushort from = 0;
ushort to = 1000;

I imagine, it should be possible to obtain all names of monsters/npcs. If you have possibility to try it out, that would be awesome. I wanted to try it out for quite for over half a year now, but didn't had 'right circumstances'
If you can add me at discord @elkolorado

@luanluciano93
Copy link
Copy Markdown

in the Extract app you can use the --monsters parameter and you can also use --npcs

@elkolorado
Copy link
Copy Markdown
Author

i saw it, however it recevies packets from map data. What i wanted to achieve is first sending the lookat monster packet (as if you are looking at creature with given id), and then receiving data from it (so the name of it would be received), given it could be possible to obtain all names bounded to all creature ids that exist. Given how lookat was used to obtain item all names of item ids despite clearly not being near those items, the creatures/npcs could be also possible, basing on how similar it works ingame.

@luanluciano93
Copy link
Copy Markdown

It would be great to have some information on the creatures, besides the name

@elkolorado
Copy link
Copy Markdown
Author

the names itself would be awesome also, given the ceratin topics resolving around mysteries

@giuinktse7
Copy link
Copy Markdown
Owner

giuinktse7 commented Sep 15, 2024

I tried running the program against the latest Tibia client, but I couldn't get past the login screen. Note that this is unrelated to your change; the code in the master branch doesn't work with the newest Tibia client.

The program crashes here:

var read = _serverSocket.Receive(_serverInMessage.GetBuffer(), count, (int)(_serverInMessage.Size - count), SocketFlags.None);
if (read <= 0)
throw new Exception("[Connection.BeginReceiveServerCallback] Server connection broken.");

Two messages get through, with these buffer values (hexadecimal):
Message 1: 01 00 00 FF FF 3F 00 00 (read := 1)
Message 2: 00 00 00 FF FF 3F 00 00 (read := 7)

The third value of the read variable is 0, and we hit the exception.

I unfortunately don't have the time (nor perhaps the know-how) to troubleshoot this further, but I am happy to accept PR's if anyone else can fix this.

@elkolorado
Copy link
Copy Markdown
Author

I tried running the program against the latest Tibia client, but I couldn't get past the login screen. Note that this is unrelated to your change; the code in the master branch doesn't work with the newest Tibia client.

The program crashes here:

var read = _serverSocket.Receive(_serverInMessage.GetBuffer(), count, (int)(_serverInMessage.Size - count), SocketFlags.None);
if (read <= 0)
throw new Exception("[Connection.BeginReceiveServerCallback] Server connection broken.");

Two messages get through, with these buffer values (hexadecimal): Message 1: 01 00 00 FF FF 3F 00 00 (read := 1) Message 2: 00 00 00 FF FF 3F 00 00 (read := 7)

The third value of the read variable is 0, and we hit the exception.

I unfortunately don't have the time (nor perhaps the know-how) to troubleshoot this further, but I am happy to accept PR's if anyone else can fix this.

it might be related to newest client, however there is legacy client here; https://static.tibia.com/download/Tibia_Setup_Legacy.exe maybe u could try with that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants