So can I use it and have the trading bot too that you made with the less CPU , if so please tell me how? , Thanks m8
Even when i finished putting the rest of the packets into this project, no because that plugin was created for k-relay. Or you are talking about PKTINOS's clientless tradebot, which is still no because that uses k-relay as the core and im not making a substitute for k-relay.
A trade bot can be make with this once i add the rest of the packets, but it would be different the the k-relay plugin i created.
Small update today.
I havent had as much time as i'd like to work on this the past few days, been very busy with work and after 8-10 hours of programming for work i often dont feel the desire to go home and do any programming just for fun.
Whats added:
- Added a few additional packets, you can make it shoot now if you want to
- Added an xml parser that ive used in the past and its extremely lightweight/simple to use
- Moved account info + desired server to separate XML file, so you can change account info without having to recompile now
- Added curl to the project, it now downloads the server list + your account info
The settings.xml file is part of the project, it gets copied to to output directory with the exe, as the exe needs to read it when it runs. The layout is:
The server name has to be the full name (case sensitive). The settings.xml file in the project has "USWest" in the <Server> field right now if you dont feel like changing it.Code:<?xml version="1.0" encoding="utf-8"?> <Config> <Server>SERVER_NAME</Server> <GUID>YOUR_EMAIL</GUID> <Password>YOUR_PASSWORD</Password> </Config>
To get this to compile you will need to download and get curl set up. I went with curl because i figured it would allow this to be cross-compiled easier then if i used a window's specific function (i was going to use URLDownloadToFile), and because curl has a url encoding function ("+" to "%2b" and whatnot).
Heres a quick video i created showing the bot reply to being whispered "shoot". I didnt even know that you can shoot 1 single projectile as a wizard, though it was always 2. Does it just automatically send 2 when you shoot as a wizard normally? lol. (im aware you can see the names in this video, both these accounts i created specifically for this video so i really dont care if they get reported)
(i didnt include this in the source attached, but all the code needed to do it is).
No exe include in download again, but here are the scans:
https://virusscan.jotti.org/en-US/fi...job/8o4ad43nub
https://www.virustotal.com/en/file/0...is/1486508792/
Edit: oh and as far as goals, im still hoping to have the rest of the packet classes created and added to this by the end of the week/weekend. I also want to add the objects.xml file to the project and parse it so i can use it for whatever is needed. I really really really need to create a "client" class soon so i dont keep creating a bunch of global functions and make the code all messy!! Thats about it for what i hope to have done soon.
Last edited by Ahlwong; 02-07-2017 at 11:25 PM.
Kushala Daora (02-08-2017),~V~ (02-08-2017)
Approved and added to main page
News Force Head Editor from 09/14/2018 - 03/02/2020
Publicist from 11/23/2017 - 06/07/2019
Global Moderator since 09/24/2017
Minion+ from 04/16/2017 - 09/24/2017
Market Place Minion from 04/16/2017 - 09/24/2017
Minecraft Minion from 02/23/2017 - 09/24/2017
Realm of the Mad God Minion from 11/06/2016 - 09/24/2017
Middleman from 09/14/2016 - 09/24/2017
News Force Editor from 08/23/2016 - 09/14/2018
News Force (Section of the Week) from 03/21/2016 - 07/17/2017
News Force (User News) from 10/18/2015 - 09/14/2018
Donator since 03/16/2015
Realm of the Mad God Editor from 05/20/2014 - 07/08/2014
Member since 12/23/2012
Rep Power: 82
toddddd (02-08-2017)
Very cool project
BTW Does anybody else get this exception randomly?
toddddd (02-09-2017)
Same here, ran great the first time but running it again it just crashes immediately.
Looks like it's trying to read from a null location even though the settings file is there. (Might be because the appspot xml is online rather than local, and settings can be different among accounts, ect)
Last edited by Kushala Daora; 02-08-2017 at 09:11 PM.
"There is no higher form of user validation than having customers support your product with their wallets." ~ Google
You would think so, but the line you guys are both showing an error at is actually related to checking if the returned xml is an error message ("<Error>message</Error>") instead of a normal account xml. Which to mean would indicate the returned data isnt actually xml.
What is strange for me is ive run the code with a bunch of different account details (various mules) and havent had it crash for me on that line ever. I even tested with invalid details just now and it worked as it is meant to work, didnt crash.
If you want to debug, the first thing i would check is the url curl is trying to grab. Locate the curl_get function and add something like this above the curl_easy_perform():
Then you can take the url it spits out and pull it up in your web browser. Id be interested to see what is getting returned.Code:printf("curl url = %s\n", url.c_str());
edit: i guess the proper thing for me to do there would be to validate that it is xml being returned before attempting to read from that xml. So ill add that check in there now, but it still doesnt make too much sense that it wouldnt be xml getting returned.
edit2: so this would be the fix to prevent the program from crashing on you, but it still has me wondering what the url or the returned data you both got was. This fix just makes sure it is actual xml before it attempts to read it:
Code:IXMLResults xe; ICXMLNode xNode = IXMLDomParser().parseStringNonT(rawxml.c_str(), NULL, &xe); if (xe.errorCode != 0) { // Error parsing the xml printf("XML Parse Error: %s\n", IXMLPullParser::getErrorMessage(xe.errorCode)); return; } // Check if the returned xml is an error if (strcmp(xNode.getName(), "Error") == 0) { printf("Error: %s\n", xNode.getText()); return; }
edit3: Progress is slowly being made, handles reconnections now:
Last edited by toddddd; 02-09-2017 at 12:21 PM. Reason: new gif
Kushala Daora (02-09-2017),~V~ (02-09-2017)
~V~ (02-09-2017)
Thats really strange. I have no idea why that would be crashing then. I dont use disc or skype or anything really, but pm me if you need any help debugging it. I suggest adding the code in that i edited my post with, see if it outputs an error message and exits or if it doesnt flag an error at all.
~V~ (02-09-2017)
Hmm try adding "#define APPROXIMATE_PARSING" to the top of the "IXMLParser.cpp" file. That is suppose to attempt to clean up bad xml (but it may end up creating more errors). Add that and recompile, and see if that fixes things or not.
edit: if that doesnt fix it, ill just add something to remove line-breaks since it should all be 1 line like you pointed out.
Last edited by toddddd; 02-09-2017 at 02:15 PM.