• 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!

C++ Change place of the Player::sendCancelMessage/getReturnMessage TFS 1.X

ObsidianQ

Member
Joined
Jan 26, 2017
Messages
100
Solutions
1
Reaction score
10
Change place of the Player::sendCancelMessage/getReturnMessage TFS 1.X

Hello, i'd like to change the place where the messages are received.

Messages like "There is no way." "That's not possible" etc. Console messages.

Can please someone help me?
 
Solution
Yes, I forgot to say i am using OTClient.
Can you please teach me how? :D

Well this is the support board, we don't teach you anything, we give you hints so you can figure it out by yourself.
If you need it fixed you can report your own post and ask to move it to requests.

You can follow the code the same way I did with OTClient, just start with the parser; otclient/protocolgameparse.cpp at df422c0991e80d8c579522e727a6693b5b637865 · edubart/otclient · GitHub
GitHub - edubart/otclient: An alternative tibia client for otserv written in C++2011, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize
Thank you for you reply.
What i need is to move the place the message appears, not the text itself.

Can please guide me?

You need to tell the server to send it to the correct channel, if you wanna move all of them you can change the cancel function.
forgottenserver/player.h at 68ab2c606782fe9a38c5a0013a0df25588cabe26 · otland/forgottenserver · GitHub
You might be able to use this; MESSAGE_DAMAGE_DEALT insted of; MESSAGE_STATUS_SMALL

Try it yourself so you learn something new :)
You have enough there to fix it, if most you will have to find the "correct" message type.
forgottenserver/const.h at master · otland/forgottenserver · GitHub
 
You need to tell the server to send it to the correct channel, if you wanna move all of them you can change the cancel function.
forgottenserver/player.h at 68ab2c606782fe9a38c5a0013a0df25588cabe26 · otland/forgottenserver · GitHub
You might be able to use this; MESSAGE_DAMAGE_DEALT insted of; MESSAGE_STATUS_SMALL

Try it yourself so you learn something new :)
You have enough there to fix it, if most you will have to find the "correct" message type.
forgottenserver/const.h at master · otland/forgottenserver · GitHub

That's gonna help for some other ideas i have but what i mean to do is, move the text to the left side, instead of centered or change it to the top of the screen :)
 
That's gonna help for some other ideas i have but what i mean to do is, move the text to the left side, instead of centered or change it to the top of the screen :)

Oh you mean you wanna move the text that you get above the text input window~?
Most likely not posible with the Cipsoft client, you would have to use OTClient.
 
Oh you mean you wanna move the text that you get above the text input window~?
Most likely not posible with the Cipsoft client, you would have to use OTClient.

Yes, I forgot to say i am using OTClient.
Can you please teach me how? :D
 
Yes, I forgot to say i am using OTClient.
Can you please teach me how? :D

Well this is the support board, we don't teach you anything, we give you hints so you can figure it out by yourself.
If you need it fixed you can report your own post and ask to move it to requests.

You can follow the code the same way I did with OTClient, just start with the parser; otclient/protocolgameparse.cpp at df422c0991e80d8c579522e727a6693b5b637865 · edubart/otclient · GitHub
GitHub - edubart/otclient: An alternative tibia client for otserv written in C++2011, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize
 
Solution
Well this is the support board, we don't teach you anything, we give you hints so you can figure it out by yourself.
If you need it fixed you can report your own post and ask to move it to requests.

You can follow the code the same way I did with OTClient, just start with the parser; otclient/protocolgameparse.cpp at df422c0991e80d8c579522e727a6693b5b637865 · edubart/otclient · GitHub
GitHub - edubart/otclient: An alternative tibia client for otserv written in C++2011, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize

Thank you, i didn't mean to ask for the full edit, just a guidance as the past post, thank you very much
 
If you want to display those msgs on Console, the best way would be navigate to module game_textmessage, textmessage.lua and change this
Lua:
statusSmall     = { color = TextColors.white,                           screenTarget='statusLabel' },
To this
Lua:
statusSmall     = { color = TextColors.white, consoleTab='Server Log', screenTarget='statusLabel' },
Not tested, but should work.
Also you can put there consoleOption like in status, to make it toggle (display them when in options value is true).
 
If you want to display those msgs on Console, the best way would be navigate to module game_textmessage, textmessage.lua and change this
Lua:
statusSmall     = { color = TextColors.white,                           screenTarget='statusLabel' },
To this
Lua:
statusSmall     = { color = TextColors.white, consoleTab='Server Log', screenTarget='statusLabel' },
Not tested, but should work.
Also you can put there consoleOption like in status, to make it toggle (display them when in options value is true).

Wow this will also help so great!
My main intention to move the position of the text ingame, at the screen:
8RlB3bJ1TvCT2RE7865_1Q.png
 
Oh, that is simple, just edit textmessage.otui
Code:
TextMessageLabel
    id: statusLabel
    anchors.bottom: parent.bottom
    anchors.left: gameBottomPanel.left
    anchors.right: gameBottomPanel.right
 
Wow this will also help so great!
My main intention to move the position of the text ingame, at the screen:
8RlB3bJ1TvCT2RE7865_1Q.png

Do as I said, start from where the client parses the code and find the next function it calls.
In this case you will end up in an .otui file where you can add / remove padding and or align.
 
Oh, that is simple, just edit textmessage.otui
Code:
TextMessageLabel
    id: statusLabel
    anchors.bottom: parent.bottom
    anchors.left: gameBottomPanel.left
    anchors.right: gameBottomPanel.right

Thank you!

I have only one more quesiton: Where can i find the values for .otui?
I'd like to modify few things, like the Splitter horizontal size, i tried to modify "anchors.right: gameRightPanel.left" because it looks a line from parent.left to gameRightPanel.left and i'd like to limit it to the chat size, already tried deleting "anchors.right" and adding width, also tried "anchors.right: gameBottomPanel.right but it just won't start :(

If you could help me with a list of the .otui values i'd be able to keep trying something else :)
 
Thank you!

I have only one more quesiton: Where can i find the values for .otui?
I'd like to modify few things, like the Splitter horizontal size, i tried to modify "anchors.right: gameRightPanel.left" because it looks a line from parent.left to gameRightPanel.left and i'd like to limit it to the chat size, already tried deleting "anchors.right" and adding width, also tried "anchors.right: gameBottomPanel.right but it just won't start :(

If you could help me with a list of the .otui values i'd be able to keep trying something else :)

Not sure what you mean, but if you wanna have in the same position as something else you can inherit values.
CSS:
anchors.bottom: privateLabel.bottom

The otui code is pretty much a mix of Lua and HTML/CSS.

Also not sure what you mean with "values", do you mean things like width, height etc?
Im not 100% but I think this are the "values" you can use; otclient/uiwidgetbasestyle.cpp at e870110875627d55006236b7e4996f28fed9a287 · edubart/otclient · GitHub
 
Back
Top