Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Disable ui buttons?

Newbie Spellweaver
Joined
Feb 20, 2017
Messages
14
Reaction score
0
I noticed there's images for when a UI button in the status bar is disabled, but how do I disable a button? I mean, correct me if i'm wrong, but there should be a way to disable it, otherwise the images wouldnt be there, right?
For example the trade button, how would I disable it?
I know I can just remove the code and return it in the source, but that's not what I'm looking for
 
Moderator
Staff member
Moderator
Joined
Jul 30, 2012
Messages
1,103
Reaction score
432
Pretty sure Nexon just made these as safe-checks, or example if you are in a different window the buttons may disable temporary. The only way is most likely to hard disable them directly from the client, but no clue if such thing is (easily) possible. This is another fun one for Eric to answer. =P
 
Upvote 0
Custom Title Activated
Loyal Member
Joined
Jan 18, 2010
Messages
3,109
Reaction score
1,140
The UI buttons like Trade on CUIStatusBar's layout are CCtrlButton objects. By default, when you add a button to the layout, it's canvas will point to "normal". To make the button disabled, you'll need to modify the client and call the inherited method SetEnable(0) to disable the button. This will cause the button's state to become 2, which is a disabled state that will make the button appear gray and un-clickable. If you really want the button to just be toggled as disabled you're going to have to do some serious client editing, so good luck!

Also, you'd be surprised; this is Nexon we're talking about here. They indeed created disable canvas's for every actual button regardless if it will ever have the ability to become disabled or not. ;)
 
Upvote 0
Newbie Spellweaver
Joined
Feb 20, 2017
Messages
14
Reaction score
0
The UI buttons like Trade on CUIStatusBar's layout are CCtrlButton objects. By default, when you add a button to the layout, it's canvas will point to "normal". To make the button disabled, you'll need to modify the client and call the inherited method SetEnable(0) to disable the button. This will cause the button's state to become 2, which is a disabled state that will make the button appear gray and un-clickable. If you really want the button to just be toggled as disabled you're going to have to do some serious client editing, so good luck!

Also, you'd be surprised; this is Nexon we're talking about here. They indeed created disable canvas's for every actual button regardless if it will ever have the ability to become disabled or not. ;)

Alright thanks for the help, i have no knowledge about client editing so i guess i will just ignore it :)
 
Upvote 0
Skilled Illusionist
Joined
Apr 26, 2015
Messages
302
Reaction score
77
Alright thanks for the help, i have no knowledge about client editing so i guess i will just ignore it :)
You could try to make the button invisible by using a invisible png.
This strategy has been used many times to remove the other jobs(Aran, Cygnus) from v83 servers.
 
Upvote 0
Newbie Spellweaver
Joined
Feb 20, 2017
Messages
14
Reaction score
0
You could try to make the button invisible by using a invisible png.
This strategy has been used many times to remove the other jobs(Aran, Cygnus) from v83 servers.
that is not what i had in mind though
I wanted to see if i could disable the ui buttons real-time in game with a packet or something, but as Eric explained, it requires client editing and that is not my field of expertise
 
Upvote 0
Skilled Illusionist
Joined
Apr 26, 2015
Messages
302
Reaction score
77
that is not what i had in mind though
I wanted to see if i could disable the ui buttons real-time in game with a packet or something, but as Eric explained, it requires client editing and that is not my field of expertise

It's todally possible to implement that. I would suggest to you hook the function that receives the packet(ProcessPacket or something) and from there redirect to a DLL that you will have to inject into the client.

After the DLL is injected you will be able to intercept the packets on this DLL and then handle it according.


It's not that difficult. We already have all the data structures for the functions it's just a question of reproduce those structures in C++ and then use pointers functions x).
 
Upvote 0
Newbie Spellweaver
Joined
Feb 20, 2017
Messages
14
Reaction score
0
It's todally possible to implement that. I would suggest to you hook the function that receives the packet(ProcessPacket or something) and from there redirect to a DLL that you will have to inject into the client.

After the DLL is injected you will be able to intercept the packets on this DLL and then handle it according.


It's not that difficult. We already have all the data structures for the functions it's just a question of reproduce those structures in C++ and then use pointers functions x).

m8 i'm a noob wannabe c0d3r with little to no knowledge who just wants to mess around with a source and find out what the limits are
do you really think i could do all that u just said? I didn't understand 80% of it
 
Upvote 0
Back
Top