[c/c++] Clientless (Work in Progress)

Posts 76–90 of 131 · Page 6 of 9
Quote Originally Posted by dudeguything21 View Post
Whenever I try and write the accept trade packet it declines instead. How do I setup the accept trade packet in the client so that it doesn't do this?
it is possible you are getting a trade error, not a cancel. though client specifically im not sure, but i know how the packet structure works: you need 2 bool[12] with true denoting slots accepted for each player. then you can send this packet. it doenst just work automagically.
Quote Originally Posted by bluuman View Post
it is possible you are getting a trade error, not a cancel. though client specifically im not sure, but i know how the packet structure works: you need 2 bool[12] with true denoting slots accepted for each player. then you can send this packet. it doenst just work automagically.
Does the AcceptTrade.cpp not due this on its own? Where would I manually have to input information?
Quote Originally Posted by dudeguything21 View Post
Does the AcceptTrade.cpp not due this on its own? Where would I manually have to input information?
you need to assign values to the bool vector myOffers and yourOffers. so basically, the accepttrade.cpp has the EMPTY values for each packet, its up to YOU to define them. now, you can test trade accept by creating an empty bool vector with 12 false entries. then send the packet with myoffers and youroffers as this bool vector. if you want an updated youroffers, you need to get this from tradechangedpacket.offers, which you can send in the accept trade packet as youroffers.
Thanks, I am assuming the first 4 entries would indicate inventory slots and should always be false?
Quote Originally Posted by dudeguything21 View Post
Thanks, I am assuming the first 4 entries would indicate inventory slots and should always be false?
Correct, and yes, im pretty sure those should always be false (though i have never tried). Also, when replying you should either quote me or mention me @bluuman so i get notified of your reply
Quote Originally Posted by bluuman View Post
Correct, and yes, im pretty sure those should always be false (though i have never tried). Also, when replying you should either quote me or mention me @bluuman so i get notified of your reply
Yea I kinda forgot and by the time I realized I just said fuck it he will see sometime lol
Quote Originally Posted by dudeguything21 View Post
Yea I kinda forgot and by the time I realized I just said fuck it he will see sometime lol
finally got it working
this is going to be very fun!


@toddddd if you still play, i'd like to donate some items
Quote Originally Posted by bluuman View Post
finally got it working
this is going to be very fun!


@toddddd if you still play, i'd like to donate some items
Glad you got it working! I jump on occasionally but dont play much, so dont sweat it man its no worries
Quote Originally Posted by toddddd View Post
Glad you got it working! I jump on occasionally but dont play much, so dont sweat it man its no worries
Please remember it, i owe you. I unfortunately , dont have much time to play around with this tonight. Hopefully i can help maintain the project in some way (need to work on c++ skills first). Thanks again, this project is awesome.
Quote Originally Posted by bluuman View Post
finally got it working
this is going to be very fun!


@toddddd if you still play, i'd like to donate some items

Yea I havent/cant figure it out yet, I have almost 0 knowledge in c++ and until I have more free time to devote to it rather than python (for class) I don't see myself being able to figure it out

EDIT: although let me know if you ever feel like sharing
Quote Originally Posted by dudeguything21 View Post
Yea I havent/cant figure it out yet, I have almost 0 knowledge in c++ and until I have more free time to devote to it rather than python (for class) I don't see myself being able to figure it out

EDIT: although let me know if you ever feel like sharing
Sorry, i got the impression you had this working. Anyways, let us know where you are stuck and im pretty sure either myself or someone else in this thread will be quick to help you
Quote Originally Posted by bluuman View Post
Sorry, i got the impression you had this working. Anyways, let us know where you are stuck and im pretty sure either myself or someone else in this thread will be quick to help you
It's not something I'm stuck on but just a general lack of knowledge. I am hoping to dedicate more time to C++ after midterms are over in 2 weeks and until then I don't want to look into it and have to be spoon fed/ask how to solve every single problem. Thanks for the help though.

EDIT: The specific spot I stopped at was checking which items were selected on the tradechange packet
Quote Originally Posted by dudeguything21 View Post
It's not something I'm stuck on but just a general lack of knowledge. I am hoping to dedicate more time to C++ after midterms are over in 2 weeks and until then I don't want to look into it and have to be spoon fed/ask how to solve every single problem. Thanks for the help though.

EDIT: The specific spot I stopped at was checking which items were selected on the tradechange packet

It sounds like you're hindered by more then just your knowledge of C++, it sounds like you dont know the game packets very well either. I strongly suggest you play around with some k-relay plugins and learn how to do stuff that way first since it is much much much easier to program something in C# then it is C++. C# is also very similar to C++ so the more you learn and play around with C# the more you will be able to pickup C++ if you try (or atleast it was super easy for me to pickup C# since i have years of C++ experience). K-relay helped me understand the packets and interface a lot since it allows you to hook any packet, allowing you to learn when that packet goes out or what the packet contains.

If you already know the game packets and C# then it should be extremely similar when looking at C++. Almost all of the variables are the same in C# and C++. A few differences would be C# uses List<type> and Dictionary<type,type>, but in C++ (atleast in this program) ive been using only vector<type> and unordered_map<type,type>. The packets in this are modeled after the game clients almost 100%, so the names of the variables will be different then you would find in k-relay, but the type and what goes in the packet are the same in both.

So like ive said, if you arent too familiar with the game packets i would strongly suggest playing around with k-relay for a bit (which the C# experience will also help you pickup C++). You wont be missing out on anything here, this project has a long way to go before it is anything that great, and you can keep updated by checking the github or here.
Quote Originally Posted by toddddd View Post
It sounds like you're hindered by more then just your knowledge of C++, it sounds like you dont know the game packets very well either. I strongly suggest you play around with some k-relay plugins and learn how to do stuff that way first since it is much much much easier to program something in C# then it is C++. C# is also very similar to C++ so the more you learn and play around with C# the more you will be able to pickup C++ if you try (or atleast it was super easy for me to pickup C# since i have years of C++ experience). K-relay helped me understand the packets and interface a lot since it allows you to hook any packet, allowing you to learn when that packet goes out or what the packet contains.

If you already know the game packets and C# then it should be extremely similar when looking at C++. Almost all of the variables are the same in C# and C++. A few differences would be C# uses List<type> and Dictionary<type,type>, but in C++ (atleast in this program) ive been using only vector<type> and unordered_map<type,type>. The packets in this are modeled after the game clients almost 100%, so the names of the variables will be different then you would find in k-relay, but the type and what goes in the packet are the same in both.

So like ive said, if you arent too familiar with the game packets i would strongly suggest playing around with k-relay for a bit (which the C# experience will also help you pickup C++). You wont be missing out on anything here, this project has a long way to go before it is anything that great, and you can keep updated by checking the github or here.
Yea I pretty much know nothing of the games packets too, I will most definitely check out krelay. Like I said though, It'll be a couple weeks until midterms are over. So expect some responses from me mid march
Would this be capable of claiming rewards from the login calender?
Posts 76–90 of 131 · Page 6 of 9

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?