• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Solved] Sending more tiles to client

Status
Not open for further replies.
I'm starting to understand, thanks for that explanation ;)

So, the error lies in the input for GetMapDescription, and I'm assuming that other things that are sent after this error will be bugged too perhaps other things that display numbers?

The /t and /a commands are a good testing function that I will definitely make use of :)
 
If a script runs, and then has an error, it stops on the line with the error, so any lines after that line will not be read.

This means in our example, When you log in and it runs sendAddCreature (which is adding your player to the gameworld) It gets to the line with AddMapDescription, and something happens. Do any errors come up in the console? (doubtful)

I am going to test this with a normal tibia client today, and see if it draws the tiles differently than how it is on your client.

Also, you should re-do your test map, Make a design with tiles (Like a star with where your character logs on as the center)
Will make it much easier to see.
 
I'll re-do the map, will be interesting how the tibia client draws it too.
 
You also have to adjust the new range for OTClient in map.cpp:
Code:
void Map::resetAwareRange()
{
    AwareRange range;
    range.left = 8;
    range.top = 6;
    range.bottom = 7;
    range.right = 9;
    setAwareRange(range);
}
How should the client know how big the send map is otherwise?
Real tibia client should crash if you change anything about those values.
After setting the range for OTC you need to adjust all values for GetMapDescription in functions like sendMapDescription, sendMoveCreature, MoveUpCreature, MoveDownCreature to the new range too.
 
Ah man, that did the trick.. we are in business now with the client drawing 22 by 18 tiles.

Thanks for all the help Flatlander, it's been insightful ;)

Thanks also to you Summ, just shows that I have alot to learn !
 
Zero can um make a thread or edit the first post with the full solution?
 
Thank you Sum! I just started getting into source editing a few weeks ago (I've been strictly into LUA/XML/SQL etc for so long, and I hated how limiting it was)
It isn't too different, but I don't have all of the sources memorized like I want to, plus I've never worked with OTClient :)

Wish I could Rep++ You haha
 
Status
Not open for further replies.
Back
Top