Page 2 of 9 FirstFirst 1234 ... LastLast
Results 16 to 30 of 131
  1. #16
    citydrifter's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    653
    Reputation
    32
    Thanks
    2,436
    My Mood
    Yeehaw
    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

  2. #17
    Kushala Daora's Avatar
    Join Date
    Oct 2013
    Gender
    male
    Location
    RealmSupply
    Posts
    1,075
    Reputation
    73
    Thanks
    642
    My Mood
    Angelic
    Quote Originally Posted by citydrifter View Post
    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
    You'll have to either wait for the next release or add all the trading packets and functions yourself.

    "There is no higher form of user validation than having customers support your product with their wallets." ~ Google


  3. #18
    toddddd's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    720
    Reputation
    46
    Thanks
    6,363
    Quote Originally Posted by citydrifter View Post
    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.

  4. #19
    toddddd's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    720
    Reputation
    46
    Thanks
    6,363
    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:
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <Config>
      <Server>SERVER_NAME</Server>
      <GUID>YOUR_EMAIL</GUID>
      <Password>YOUR_PASSWORD</Password>
    </Config>
    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.

    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).

     
    I'll briefly go over how i set up curl for use with visual stuidos incase anyone else needs to:
    1) download source .zip from https://curl.hax*****/download.html (direct link to file i downloaded)
    2) Extract it wherever you want, open the extracted filed and locate the folder "winbuild".
    3) Open text file "BUILD.WINDOWS.txt"
    4) follow directions in text file! But incase you are too lazy, keep following my directions
    5) Open Visual Studio's Developer Command Prompt
    6) Navigate to the "winbuild" folder from the Developer cmd
    7) type "nmake /f Makefile.vc mode=dll"
    8) after it finishes, go to the parent directory of "winbuild" and find the folder "builds"
    9) There were 3 folders inside this for me, but the folder you want should be named something like "libcurl-vc-x86-release-dll-ipv6-sspi-winssl"
    10) copy that entire folder somewhere that it wont get deleted. I just copied it to "C:\libcurl-vc-x86-release-dll-ipv6-sspi-winssl"
    11) Open the project properties and add "C:\libcurl-vc-x86-release-dll-ipv6-sspi-winssl\include" to projects additional include directories, add "C:\libcurl-vc-x86-release-dll-ipv6-sspi-winssl\lib" to additional lib directories, and add "libcurl.lib" to additional dependencies
    12) You're done


    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.

  5. The Following 2 Users Say Thank You to toddddd For This Useful Post:

    Kushala Daora (02-08-2017),~V~ (02-08-2017)

  6. #20
    Ahl's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    /modcp
    Posts
    16,599
    Reputation
    3219
    Thanks
    5,383
    My Mood
    Angelic
    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

  7. The Following User Says Thank You to Ahl For This Useful Post:

    toddddd (02-08-2017)

  8. #21
            (╭ರ_•)          
    Premium Member
    ~V~'s Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    Posts
    628
    Reputation
    29
    Thanks
    1,478
    Very cool project




    BTW Does anybody else get this exception randomly?

  9. The Following User Says Thank You to ~V~ For This Useful Post:

    toddddd (02-09-2017)

  10. #22
    Kushala Daora's Avatar
    Join Date
    Oct 2013
    Gender
    male
    Location
    RealmSupply
    Posts
    1,075
    Reputation
    73
    Thanks
    642
    My Mood
    Angelic
    Quote Originally Posted by ~V~ View Post
    BTW Does anybody else get this exception randomly?
    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


  11. #23
    toddddd's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    720
    Reputation
    46
    Thanks
    6,363
    Quote Originally Posted by Kushala Daora View Post
    (Might be because the appspot xml is online rather than local, and settings can be different among accounts, ect)
    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():
    Code:
    printf("curl url = %s\n", url.c_str());
    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.


    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

  12. The Following 2 Users Say Thank You to toddddd For This Useful Post:

    Kushala Daora (02-09-2017),~V~ (02-09-2017)

  13. #24
            (╭ರ_•)          
    Premium Member
    ~V~'s Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    Posts
    628
    Reputation
    29
    Thanks
    1,478
    Quote Originally Posted by toddddd View Post
    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():
    Code:
    printf("curl url = %s\n", url.c_str());
    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.
    It sends request to /char/list with proper parameters and returns valid XML

  14. #25
    toddddd's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    720
    Reputation
    46
    Thanks
    6,363
    Quote Originally Posted by ~V~ View Post
    It sends request to /char/list with proper parameters and returns valid XML
    Have it output the returned data as well, as a browser does a lot of things the curl request doesnt. Right below the curl_get call, do printf("rawxml = %s\n", rawxml.c_str());

  15. The Following User Says Thank You to toddddd For This Useful Post:

    ~V~ (02-09-2017)

  16. #26
            (╭ರ_•)          
    Premium Member
    ~V~'s Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    Posts
    628
    Reputation
    29
    Thanks
    1,478
    Quote Originally Posted by toddddd View Post
    Have it output the returned data as well, as a browser does a lot of things the curl request doesnt. Right below the curl_get call, do printf("rawxml = %s\n", rawxml.c_str());
    It outputs valid XML (same as I get it in the browser) but for some reason xNode is null when crash happens

    You can add me on D i s c o r d VoOoLoX#6237 so we don't spam this thread

  17. #27
    toddddd's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    720
    Reputation
    46
    Thanks
    6,363
    Quote Originally Posted by ~V~ View Post


    It outputs valid XML (same as I get it in the browser) but for some reason xNode is null when crash happens

    You can add me on D i s c o r d VoOoLoX#6237 so we don't spam this thread
    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.

  18. The Following User Says Thank You to toddddd For This Useful Post:

    ~V~ (02-09-2017)

  19. #28
            (╭ರ_•)          
    Premium Member
    ~V~'s Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    Posts
    628
    Reputation
    29
    Thanks
    1,478
    Quote Originally Posted by toddddd View Post
    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.
    Ok I think I found what the issue is:

    'PaymentData' tag has a line break just after the '<' on the closing tag


  20. #29
    toddddd's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    720
    Reputation
    46
    Thanks
    6,363
    Quote Originally Posted by ~V~ View Post


    Ok I think I found what the issue is:

    'PaymentData' tag has a line break just after the '<' on the closing tag

    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.

  21. #30
            (╭ರ_•)          
    Premium Member
    ~V~'s Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    Posts
    628
    Reputation
    29
    Thanks
    1,478
    Quote Originally Posted by toddddd View Post
    try adding "#define APPROXIMATE_PARSING"
    That just makes it even worse, at least for me,

Page 2 of 9 FirstFirst 1234 ... LastLast

Similar Threads

  1. Work in Progress
    By slytherman in forum Showroom
    Replies: 2
    Last Post: 06-22-2010, 08:43 AM
  2. work in progress
    By ForsakenFX in forum Showroom
    Replies: 13
    Last Post: 06-17-2010, 06:33 PM
  3. [Release][Work in progress][FAIL] L85A1 MOD GOLDEN WOOD
    By Jarppi in forum Combat Arms Mods & Rez Modding
    Replies: 26
    Last Post: 03-09-2010, 11:48 AM
  4. Wrestling Ring [Work in Progress]
    By Iwin in forum Art & Graphic Design
    Replies: 13
    Last Post: 01-28-2009, 08:16 PM
  5. a work in progress
    By Iwin in forum Art & Graphic Design
    Replies: 9
    Last Post: 10-15-2008, 08:44 PM