• 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++ Mouse Mid Button

Noupz

New Member
Joined
Jul 13, 2010
Messages
114
Reaction score
0
I would like to know if it is possible to add the middle mouse button in tfs0.4 rev3777 on Ubuntu 14.04, so that when it is clicked, if it has some summon, send it to where it was clicked

I know there are pokemon script, but I wanted it that way
 

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,742
Solutions
21
Reaction score
462
Location
Sweden
Does that button send any packet to the client? If so (which I hardly beleive) it's an easy fix to the protocolgame. But I agree with WibbenZ, if you use OTC you will have it a billion times easier to achieve what you want!
 

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,742
Solutions
21
Reaction score
462
Location
Sweden
I am not sure how to help you here. What you need to do is to figure out/create(?) the packet that is sent when you use that particular button. I have never used OTC so I cannot help you any further. Good luck!
 

Ziker

Well-Known Member
Joined
May 7, 2017
Messages
198
Solutions
7
Reaction score
65
Location
Edinburgh
so, how i do on OTC?
Well, I will extend a bit on the post above, but I will not provide the implementation for similar reasons (I didn't work with OTC a lot and I don't feel like going through it now).

You'll need to send from OTC a network message (both TFS and OTC implements communication based on network messages) with one of the free opcodes (extended opcode). To do this, you will need to "catch" mouse button click, perform what should be done on client side (like check if what's clicked should be clickable), build network message starting with the opcode you've chosen to use before and other data required and send it. You can probably just look at how it's done in case of other mouse buttons.

On the server side, you should add handling of your new opcode just like any other messages are handled.

My assumption is, and I think it is not a surprise for you, that if you needed an explanation of how to do this, you will not be able to do this yourself easily.
 
Top