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

OTClient Functional windows, OTC

Nostalgian

Member
Joined
Mar 17, 2018
Messages
66
Reaction score
15
Ok, so I've been delving into OTC for a while now, and I'm stuck again.

Recently, thanks to shadowsong, I've learned how to properly send and receive opcodes from server to client and vice versa. Now, I'm trying to figure out how to connect the dots with some custom windows.

I'm not really looking for someone to write the code for me at the moment, I'm just trying to understand the method to the madness, so to speak.

Ok so let me give you an example of what I'm trying to do. We will take this smithing example:

I wrote a complete smithing system in lua on TFS (1.2). Rather than use built in modal windows, I want to use a custom window for the smithing choices. I'm at a loss on how exactly to set this up.

Here is what I've got currently: player uses smithing hammer on anvil > server sends opcode to client and triggers a main window

Here is where I am having trouble connecting the dots. What is a good way to convey the information for choices for OTC to display? Like.. I'm missing a link here somewhere in my mind as to how to display the correct choices depending on player level. Also, how to set up what happens when a player clicks the choice.

Is this all done through a bazillion opcodes? Like, an opcode for each choice sent from server to client that fires depending on players level? And then another opcode from client to server for each possible choice the player makes, which in turn runs the script server side?

Am I severely overthinking this, or am I on the right track?
 
Back
Top