Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: [GM/TM] Charity Corner Easy Donation

  1. #1

    Join Date
    Jul 2012
    Posts
    1,876
    Userbars
    18
    Thanks
    1,619
    Thanked 3,292 Times in 998 Posts
    Downloads
    223
    Uploads
    0
    Mentioned
    469 Post(s)
    Time Online
    132 d 23 h 52 m
    Avg. Time Online
    56 m
    Rep Power
    0

    [GM/TM] Charity Corner Easy Donation

    Tested only in Google Chrome with Tampermonkey.
    Click the 2nd donate button and it'll automatically select the first 5 items available to be donated and donate them.
    Donate > Thanks! > Donate > Thanks! > Donate > Thanks! > Donate > Thanks!

    Code:
    // ==UserScript==
    //  @[Only registered and activated users can see links. ]         Easy Donation
    //  @[Only registered and activated users can see links. ]space    [Only registered and activated users can see links. ]
    // @version      0.1
    //  @[Only registered and activated users can see links. ]cription  Donate first 5 items to Charity Corner with a click.
    // @author       Daviid  @[Only registered and activated users can see links. ]
    //  @[Only registered and activated users can see links. ]ch        [Only registered and activated users can see links. ]
    // @grant        none
    // ==/UserScript==
    
    (function() {
        'use strict';
        $(document).ready(function(){
            $("#donateButton").append("<button id='autodonate' value='auto'>Donate</button>");
            $("#autodonate").click(function(){
    			var i=1;
    			do{
                var option = $('#charityDrive #gift'+i+' select option:selected').nextAll(':not([disabled])').val();
                $("#charityDrive #gift"+i+" select").selectedIndex=option;
                $("#charityDrive #gift"+i+" select").val(option);
                $("#charityDrive #gift"+i+" select").trigger('change');
    				i++;
    			}while(i<6);
                
                
            });
    
            (function loop() {
                var rand = Math.round(Math.random() * (5000 - 2000)) + 2000;
                console.log(rand);
                setTimeout(function() {
                    $("#autodonate").trigger('click');
                    loop();
                }, rand);
            }());
    
        });
    })();
    Spoiler:

    For those who know javascript, I'm sure the code could be reduced, let me know how you would do it.


    Edit: Smaller code thanks to @[Only registered and activated users can see links. ] and added auto-click every 2-5 seconds.
    Last edited by Daviid; 02-04-2017 at 09:58 AM.

  2. The Following 29 Users Say Thank You to Daviid For This Useful Post:

    Accelerator (02-03-2017),Andymac106 (05-22-2017),Anthony (02-03-2017),Aska (02-03-2017),athron (02-04-2017),Aura (02-03-2017),Ban (02-03-2017),Doge (02-03-2017),Hikimaru (02-03-2017),iAaron (02-04-2017),j03 (02-03-2017),joeyjoey95 (02-03-2017),Kawaii (02-03-2017),Maison (02-03-2017),Mama Bear (02-03-2017),Meepit (02-03-2017),Menine (02-03-2017),milk (02-07-2017),moosecaboose (02-03-2017),NPs (02-03-2017),Nyu (02-03-2017),people (02-03-2017),Prose Edda (02-04-2017),Pusheen (02-03-2017),Samantha (02-03-2017),Stocking Anarchy (02-03-2017),TimeLord (02-04-2017),User5931 (02-05-2017),zxzero (02-04-2017)

  3. #2
    Stocking Anarchy's Avatar
    Join Date
    May 2016
    Posts
    1,371
    Userbars
    11
    Thanks
    929
    Thanked 1,623 Times in 650 Posts
    Downloads
    182
    Uploads
    0
    Mentioned
    144 Post(s)
    Time Online
    47 d 8 h 50 m
    Avg. Time Online
    32 m
    Rep Power
    9
    Looks wonky on firefox but it works







  4. #3

    NPs's Avatar
    Join Date
    May 2016
    Posts
    71
    Userbars
    2
    Thanks
    91
    Thanked 22 Times in 13 Posts
    Downloads
    45
    Uploads
    0
    Mentioned
    3 Post(s)
    Time Online
    4 d 12 h 53 m
    Avg. Time Online
    3 m
    Rep Power
    6
    Weird, I'm adding it on GM, no error message appears, but script isnt listed on Scripts page O_o

  5. #4
    Nyu's Avatar
    Join Date
    Jun 2016
    Posts
    399
    Userbars
    14
    Thanks
    474
    Thanked 446 Times in 154 Posts
    Downloads
    32
    Uploads
    0
    Mentioned
    60 Post(s)
    Time Online
    23 d 16 h 3 m
    Avg. Time Online
    16 m
    Rep Power
    9
    @[Only registered and activated users can see links. ]
    Thanks a lot!
    Was trying to make one but couldn't figure out how to.
    I edited your code a bit, it works on the principal page too now and made it smaller c:

    Code:
    // ==UserScript==
    //  @[Only registered and activated users can see links. ]         Easy Donation
    //  @[Only registered and activated users can see links. ]space    [Only registered and activated users can see links. ]
    // @version      0.1
    //  @[Only registered and activated users can see links. ]cription  Donate first 5 items to Charity Corner with a click.
    // @author       Daviid  @[Only registered and activated users can see links. ]
    //  @[Only registered and activated users can see links. ]ch        [Only registered and activated users can see links. ]
    // @grant        none
    // ==/UserScript==
    
    (function() {
        'use strict';
        $(document).ready(function(){
            $("#donateButton").append("<button id='autodonate' value='auto'>Donate</button>");
            $("#autodonate").click(function(){
    			var i=1;
    			do{
                var option = $('#charityDrive #gift'+i+' select option:selected').nextAll(':not([disabled])').val();
                $("#charityDrive #gift"+i+" select").selectedIndex=option;
                $("#charityDrive #gift"+i+" select").val(option);
                $("#charityDrive #gift"+i+" select").trigger('change');
    				i++;
    			}while(i<6);
                
                
            });
        });
    })();
    Scripts

    [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ]



  6. The Following 6 Users Say Thank You to Nyu For This Useful Post:

    Accelerator (02-03-2017),Aura (02-04-2017),Daviid (02-04-2017),j03 (02-04-2017),Samantha (02-04-2017),Stocking Anarchy (02-04-2017)

  7. #5

    Join Date
    Jul 2012
    Posts
    1,876
    Userbars
    18
    Thanks
    1,619
    Thanked 3,292 Times in 998 Posts
    Downloads
    223
    Uploads
    0
    Mentioned
    469 Post(s)
    Time Online
    132 d 23 h 52 m
    Avg. Time Online
    56 m
    Rep Power
    0
    Added auto-click

  8. #6
    Stocking Anarchy's Avatar
    Join Date
    May 2016
    Posts
    1,371
    Userbars
    11
    Thanks
    929
    Thanked 1,623 Times in 650 Posts
    Downloads
    182
    Uploads
    0
    Mentioned
    144 Post(s)
    Time Online
    47 d 8 h 50 m
    Avg. Time Online
    32 m
    Rep Power
    9
    Quote Originally Posted by NPs View Post
    Weird, I'm adding it on GM, no error message appears, but script isnt listed on Scripts page O_o

    On script page it is listed as Easy Donation. On dropdown tab it is named user-script. Prior to update.

    Quick question. Didn't want to try testing it, but if you have different rarity ranges will it mix them up if they are close enough together? So if I have r 89 and r 90 stuff I should make sure they aren't in my inventory at the same time? Gonna try and go for a trophy later on.
    Last edited by Stocking Anarchy; 02-04-2017 at 10:18 AM.







  9. #7

    Join Date
    Jul 2012
    Posts
    1,876
    Userbars
    18
    Thanks
    1,619
    Thanked 3,292 Times in 998 Posts
    Downloads
    223
    Uploads
    0
    Mentioned
    469 Post(s)
    Time Online
    132 d 23 h 52 m
    Avg. Time Online
    56 m
    Rep Power
    0
    Quote Originally Posted by Stocking Anarchy View Post
    On script page it is listed as Easy Donation. On dropdown tab it is named user-script. Prior to update.

    Quick question. Didn't want to try testing it, but if you have different rarity ranges will it mix them up if they are close enough together? So if I have r 89 and r 90 stuff I should make sure they aren't in my inventory at the same time? Gonna try and go for a trophy later on.
    This picks the first available item in the dropdown menu for each donation.
    I could happen that it donates rarities like: 80,83,85,87,91.

  10. The Following User Says Thank You to Daviid For This Useful Post:

    Stocking Anarchy (02-04-2017)

  11. #8
    Saiyan Race j03's Avatar
    Join Date
    Dec 2011
    Posts
    12,341
    Userbars
    116
    Thanks
    4,904
    Thanked 26,536 Times in 5,732 Posts
    Downloads
    23
    Uploads
    36
    Mentioned
    3519 Post(s)
    Time Online
    474 d 3 h 46 m
    Avg. Time Online
    3 h 21 m
    Rep Power
    25
    This is very handy. Great contributions @[Only registered and activated users can see links. ] and @[Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ][Only registered and activated users can see links. ]


    [02/24/2013] Stealth CORE is made into the first standalone Neopets auto-player.


  12. The Following User Says Thank You to j03 For This Useful Post:

    Nyu (02-04-2017)

  13. #9
    Doge's Avatar
    Join Date
    Oct 2014
    Posts
    1,083
    Userbars
    21
    Thanks
    1,031
    Thanked 804 Times in 343 Posts
    Downloads
    33
    Uploads
    0
    Mentioned
    114 Post(s)
    Time Online
    223 d 20 h 10 m
    Avg. Time Online
    2 h 2 m
    Rep Power
    10
    Can anyone help me?

    I copied it and dragged it on Chrome. I'm clicking the 2nd donate button and I think it is not working? :/

  14. #10

    Join Date
    Jul 2012
    Posts
    1,876
    Userbars
    18
    Thanks
    1,619
    Thanked 3,292 Times in 998 Posts
    Downloads
    223
    Uploads
    0
    Mentioned
    469 Post(s)
    Time Online
    132 d 23 h 52 m
    Avg. Time Online
    56 m
    Rep Power
    0
    Quote Originally Posted by Garumi View Post
    Can anyone help me?

    I copied it and dragged it on Chrome. I'm clicking the 2nd donate button and I think it is not working? :/
    Press F12 and go to the Console Tab to see if there's any error.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •