Page 157 of 161 FirstFirst ... 57107147155156157158159 ... LastLast
Results 1,561 to 1,570 of 1602

Thread: Request a Bot/Feature

  1. #1561
    Bunnii's Avatar
    Joined
    Jan 2014
    Posts
    525
    Pronouns
    🍏
    Userbars
    59
    Thanks
    1,991
    Thanked
    1,794/513
    DL/UL
    7/0
    Mentioned
    84 times
    Time Online
    28d 9h 34m
    Avg. Time Online
    10m
    Quote Originally Posted by Nyu View Post
    Do you mean an user tagger like the one on reddit? (that works ok with this one)

    Or are you thinking of something else? Like the original name appears when your mouse is over it?
    either in the little page with the dictionary, to like make a litte note about the name change, personally I am terribad at remembering usernames with how I've interacted with the person before and forget who I've talked to lol

    (you need an account to see links)
    ・・♡ custom nc/np outfits ☆・・



    pfp/ryu/siggy bar by the amazing (you need an account to see links)
    avatar by the great (you need an account to see links)


  2. #1562
    Nyu's Avatar
    Joined
    Jun 2016
    Posts
    607
    Pronouns
    She
    Userbars
    31
    Thanks
    761
    Thanked
    1,000/256
    DL/UL
    32/0
    Mentioned
    109 times
    Time Online
    65d 20h 27m
    Avg. Time Online
    33m
    Quote Originally Posted by Bunnii View Post
    either in the little page with the dictionary, to like make a litte note about the name change, personally I am terribad at remembering usernames with how I've interacted with the person before and forget who I've talked to lol

    It changes the way the script works a bit, but I'll see what I can do.
    In the meantime you can put parenthesis next to the new name to remember c:

  3. The Following User Says Thank You to Nyu For This Useful Post:

    Bunnii (02-25-2024)

  4. #1563
    Bunnii's Avatar
    Joined
    Jan 2014
    Posts
    525
    Pronouns
    🍏
    Userbars
    59
    Thanks
    1,991
    Thanked
    1,794/513
    DL/UL
    7/0
    Mentioned
    84 times
    Time Online
    28d 9h 34m
    Avg. Time Online
    10m
    Quote Originally Posted by Nyu View Post
    It changes the way the script works a bit, but I'll see what I can do.
    In the meantime you can put parenthesis next to the new name to remember c:
    oh very true! thank you!

    (you need an account to see links)
    ・・♡ custom nc/np outfits ☆・・



    pfp/ryu/siggy bar by the amazing (you need an account to see links)
    avatar by the great (you need an account to see links)


  5. #1564
    Arcanine's Avatar
    Joined
    Feb 2024
    Posts
    214
    Pronouns
    🔥
    Userbars
    14
    Thanks
    180
    Thanked
    163/87
    DL/UL
    2/0
    Mentioned
    13 times
    Time Online
    12d 22h 31m
    Avg. Time Online
    3h 40m
    So I have an idea for a script, searched around and hopefully I didn't skip it over if it's already a thing.

    But a script that would highlight pets that are painted certain colors in the pound?
    I do a lot of mindless pound refreshing sometimes and it'd be cool if certain pets could stand out. Or even highlight names with no underscores/numbers.

    Could a script even do that? XD;


    Avatar by the wonderful (you need an account to see links)

  6. #1565
    Onetwo's Avatar
    Joined
    Dec 2023
    Posts
    90
    Userbars
    8
    Thanks
    89
    Thanked
    113/53
    DL/UL
    3/0
    Mentioned
    2 times
    Time Online
    3d 9h 56m
    Avg. Time Online
    32m
    Quote Originally Posted by Arcanine View Post
    So I have an idea for a script, searched around and hopefully I didn't skip it over if it's already a thing.

    But a script that would highlight pets that are painted certain colors in the pound?
    I do a lot of mindless pound refreshing sometimes and it'd be cool if certain pets could stand out. Or even highlight names with no underscores/numbers.

    Could a script even do that? XD;

    Yeah, I can make that. Color picker, some way to highlight names that are all alpha and no numeric. I can probably add some other things like pointing out stats or something

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

    Arcanine (03-09-2024)

  8. #1566
    Arcanine's Avatar
    Joined
    Feb 2024
    Posts
    214
    Pronouns
    🔥
    Userbars
    14
    Thanks
    180
    Thanked
    163/87
    DL/UL
    2/0
    Mentioned
    13 times
    Time Online
    12d 22h 31m
    Avg. Time Online
    3h 40m
    Quote Originally Posted by Onetwo View Post
    Yeah, I can make that. Color picker, some way to highlight names that are all alpha and no numeric. I can probably add some other things like pointing out stats or something
    Oh my gosh how cool, thank you!!


    Avatar by the wonderful (you need an account to see links)

  9. #1567
    Onetwo's Avatar
    Joined
    Dec 2023
    Posts
    90
    Userbars
    8
    Thanks
    89
    Thanked
    113/53
    DL/UL
    3/0
    Mentioned
    2 times
    Time Online
    3d 9h 56m
    Avg. Time Online
    32m
    Quote Originally Posted by Arcanine View Post
    Oh my gosh how cool, thank you!!
    Here is the code! Let me know what you think.


    Code:
    // ==UserScript==
    // @name         Pound Highlighter
    // @version      0.1
    // @description  Highlights content based on text box entries. Color and species is a comma separated list. Stats can be empty to ignore the stats. The name is a regex matcher. ^[a-zA-Z]{1,10}$ looks for names with only characters that is up the the length of 10. ^[A-Za-z]+$ highlight names with only characters
    // @author       Onetwo
    // @match        https://www.neopets.com/pound/adopt.phtml
    // @grant        GM_setValue
    // @grant        GM_getValue
    // ==/UserScript==
    
    (function() {
        'use strict';
    
        console.log("Script is running...");
        // Hide the element selected by the query
        const elementToHide = document.querySelector("#content > table > tbody > tr > td > div:nth-child(2) > p");
        if (elementToHide) {
            elementToHide.style.display = "none";
        }
        // Function to load saved custom values or initialize default values
        function loadCustomValues() {
            const customValues = JSON.parse(localStorage.getItem('customValues')) || {};
            return customValues;
        }
    
    
        function saveCustomValues(customValues) {
            const regexPattern = document.getElementById('custom_regex').value;
            customValues['regexPattern'] = regexPattern; // Add regex pattern to custom values
            localStorage.setItem('customValues', JSON.stringify(customValues));
        }
    
    // Function to initialize or update text boxes with custom values
    function initializeTextBoxes() {
        console.log("Initializing text boxes...");
        const customValues = loadCustomValues();
        const attributes = ['Colour', 'Species', 'Level', 'Strength', 'Defence', 'Movement'];
        const regexPattern = customValues['regexPattern'] || ''; // Get regex pattern from custom values
    
        // Add a line break before listing the text boxes
        const parentElement = document.getElementById('page_header');
    
        // Create a div before "Name Pattern"
        const divBeforeNamePattern = document.createElement('div');
        parentElement.appendChild(divBeforeNamePattern);
    
        // Create input box for regex pattern
        const regexLabel = document.createElement('label');
        regexLabel.innerText = 'Name Regex: ';
        const regexInput = document.createElement('input');
        regexInput.setAttribute('type', 'text');
        regexInput.setAttribute('id', 'custom_regex');
        regexInput.setAttribute('placeholder', 'Enter Name pattern');
        regexInput.setAttribute('value', '^[A-Za-z]+$');
        regexInput.value = regexPattern;
        divBeforeNamePattern.appendChild(regexLabel);
        divBeforeNamePattern.appendChild(regexInput);
        parentElement.appendChild(document.createElement('br')); // Add line break
    
        // Create a container for the input boxes
        const container = document.createElement('div');
        container.style.display = 'flex';
        container.style.flexWrap = 'wrap';
        container.style.alignItems = 'flex-start'; // Align items at the start of the container
        parentElement.appendChild(container);
    
        attributes.forEach(attribute => {
            const inputId = `custom_${attribute.toLowerCase()}`;
            const inputValue = customValues[inputId] || '';
    
            // Create a div for each input box
            const inputDiv = document.createElement('div');
            inputDiv.style.flexBasis = 'calc(50% - 10px)';
            inputDiv.style.boxSizing = 'border-box';
            inputDiv.style.marginRight = '10px';
    
            const labelElement = document.createElement('label');
            labelElement.style.width = "80px"; // You can adjust the width as needed
            labelElement.style.display = "inline-block"; // Ensures the width property works correctly
            labelElement.innerText = `${attribute}: `;
    
            const inputElement = document.createElement('input');
            inputElement.setAttribute('type', 'text');
            inputElement.setAttribute('id', inputId);
            inputElement.setAttribute('placeholder', `Enter ${attribute}`);
            inputElement.value = inputValue;
    
            inputDiv.appendChild(labelElement);
            inputDiv.appendChild(inputElement);
            container.appendChild(inputDiv);
        });
    }
    
    
        // Function to retrieve text box values
        function getTextValues() {
            const customValues = {};
            const attributes = ['Colour', 'Species', 'Level', 'Strength', 'Defence', 'Movement'];
    
            attributes.forEach(attribute => {
                const inputId = `custom_${attribute.toLowerCase()}`;
                const inputValue = document.getElementById(inputId).value;
                customValues[inputId] = inputValue;
            });
    
            return customValues;
        }
    
        // Function to check if a value exists in a comma-delimited string
        function checkValueInList(customValue, value) {
            // Split the comma-delimited string into an array of values
            const values = customValue.split(',');
    
            // Check if the given value exists in the array
            return values.includes(value.trim());
        }
    
        // Function to highlight pet names based on regex pattern
        function highlightPetNames() {
            const petNameSelectors = ['#pet0_name', '#pet1_name', '#pet2_name'];
            const regexPattern = document.getElementById('custom_regex').value; // Get regex pattern from input box
            const regex = new RegExp(regexPattern, 'i'); // Create regex object with case-insensitive flag
    
            petNameSelectors.forEach(selector => {
                const petNameElement = document.querySelector(selector);
                if (petNameElement) {
                    const petName = petNameElement.innerText.trim();
                    if (regex.test(petName)) {
                        petNameElement.style.backgroundColor = 'yellow';
                    }
                }
                else {
                    //console.log(`${selector} not found. Skipping highlighting process.`);
                }
            });
        }
    
        // Highlight pet attributes other than name
        function highlightPetAttributes() {
            const selectors = ['#pet0_table', '#pet1_table', '#pet2_table'];
            const customValues = {};
    
            // Retrieve values from text boxes
            const attributes = ['Colour', 'Species', 'Level', 'Strength', 'Defence', 'Movement'];
            attributes.forEach(attribute => {
                const inputId = `custom_${attribute.toLowerCase()}`;
                customValues[attribute.toLowerCase()] = document.getElementById(inputId).value;
            });
    
            //console.log('Custom values:', customValues);
    
            selectors.forEach(selector => {
                const table = document.querySelector(selector);
                if (table) {
                    const rows = table.querySelectorAll('tr');
                    rows.forEach(row => {
                        const cells = row.querySelectorAll('td');
                        if (cells.length === 2) {
                            const attribute = cells[0].innerText.trim().toLowerCase().replace(':', '').replace(/\s/g, '');
                            const value = cells[1].querySelector('span').innerText.trim().toLowerCase().replace(/\s/g, '');
                            const customAttribute = customValues[attribute.toLowerCase().replace(/\s/g, '')];
                            if (attribute === 'species' || attribute === 'colour'){
                                if ( checkValueInList(customValues[attribute],value)) {
                                    cells[1].style.backgroundColor = 'yellow';
                                }
                            }
                            else if (parseInt(value) >= parseInt(customValues[attribute] )) {
                                cells[1].style.backgroundColor = 'lightblue';
                            }
    
                        }
                    });
                }
                else {
                    //console.log(`${selector} not found. Skipping highlighting process.`);
                }
            });
        }
    
        // Function to remove all highlights
        function clearHighlights() {
            const highlightedElements = document.querySelectorAll('[style*=background-color]');
            highlightedElements.forEach(element => {
                element.style.backgroundColor = ''; // Remove background color
            });
        }
    
        // Function to save custom values when the page is unloaded
        window.addEventListener('beforeunload', () => {
            const customValues = {};
            const attributes = ['Colour', 'Species', 'Level', 'Strength', 'Defence', 'Movement'];
    
            attributes.forEach(attribute => {
                const inputId = `custom_${attribute.toLowerCase()}`;
                const inputValue = document.getElementById(inputId).value;
                customValues[inputId] = inputValue;
            });
    
            saveCustomValues(customValues);
        });
    
    
        // Function to periodically check for updates and re-highlight attributes and names
        function checkForUpdates() {
            setInterval(() => {
                clearHighlights();
                highlightPetAttributes();
                highlightPetNames();
            }, 100); // Check every 5 seconds
        }
    
    initializeTextBoxes();
        highlightPetAttributes();
        highlightPetNames();
    
        // Save custom values when the page is unloaded
        window.addEventListener('beforeunload', () => {
            const customValues = getTextValues();
            saveCustomValues(customValues);
        });
    
        // Start checking for updates
        checkForUpdates();
    
    })();

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

    Arcanine (03-10-2024)

  11. #1568
    Praise_the_Sun's Avatar
    Joined
    Jan 2024
    Posts
    97
    Userbars
    3
    Thanks
    91
    Thanked
    41/34
    DL/UL
    18/1
    Mentioned
    8 times
    Time Online
    11d 23h 15m
    Avg. Time Online
    2h 24m
    A bot to auction unbuyables across all accounts would be awesome!

    Even better if it scans the SDB and inventory / withdrawls and auctions according to predefined settings (e.g., 4 hours, increment 50,000) etc. Max # of auctions at a time for detection purposes

    The less manually logging into accounts the better

    Even more inventory / NP balance tracking would be a big help



    Separate request:

    Removal of non-BD pets from the dropdown or the ability to set multiple pets by name at once with their move and opponent settings would also be stellar!

  12. #1569
    Arcanine's Avatar
    Joined
    Feb 2024
    Posts
    214
    Pronouns
    🔥
    Userbars
    14
    Thanks
    180
    Thanked
    163/87
    DL/UL
    2/0
    Mentioned
    13 times
    Time Online
    12d 22h 31m
    Avg. Time Online
    3h 40m
    Quote Originally Posted by Onetwo View Post
    Here is the code! Let me know what you think.


    Code:
    // ==UserScript==
    // @name         Pound Highlighter
    // @version      0.1
    // @description  Highlights content based on text box entries. Color and species is a comma separated list. Stats can be empty to ignore the stats. The name is a regex matcher. ^[a-zA-Z]{1,10}$ looks for names with only characters that is up the the length of 10. ^[A-Za-z]+$ highlight names with only characters
    // @author       Onetwo
    // @match        https://www.neopets.com/pound/adopt.phtml
    // @grant        GM_setValue
    // @grant        GM_getValue
    // ==/UserScript==
    
    (function() {
        'use strict';
    
        console.log("Script is running...");
        // Hide the element selected by the query
        const elementToHide = document.querySelector("#content > table > tbody > tr > td > div:nth-child(2) > p");
        if (elementToHide) {
            elementToHide.style.display = "none";
        }
        // Function to load saved custom values or initialize default values
        function loadCustomValues() {
            const customValues = JSON.parse(localStorage.getItem('customValues')) || {};
            return customValues;
        }
    
    
        function saveCustomValues(customValues) {
            const regexPattern = document.getElementById('custom_regex').value;
            customValues['regexPattern'] = regexPattern; // Add regex pattern to custom values
            localStorage.setItem('customValues', JSON.stringify(customValues));
        }
    
    // Function to initialize or update text boxes with custom values
    function initializeTextBoxes() {
        console.log("Initializing text boxes...");
        const customValues = loadCustomValues();
        const attributes = ['Colour', 'Species', 'Level', 'Strength', 'Defence', 'Movement'];
        const regexPattern = customValues['regexPattern'] || ''; // Get regex pattern from custom values
    
        // Add a line break before listing the text boxes
        const parentElement = document.getElementById('page_header');
    
        // Create a div before "Name Pattern"
        const divBeforeNamePattern = document.createElement('div');
        parentElement.appendChild(divBeforeNamePattern);
    
        // Create input box for regex pattern
        const regexLabel = document.createElement('label');
        regexLabel.innerText = 'Name Regex: ';
        const regexInput = document.createElement('input');
        regexInput.setAttribute('type', 'text');
        regexInput.setAttribute('id', 'custom_regex');
        regexInput.setAttribute('placeholder', 'Enter Name pattern');
        regexInput.setAttribute('value', '^[A-Za-z]+$');
        regexInput.value = regexPattern;
        divBeforeNamePattern.appendChild(regexLabel);
        divBeforeNamePattern.appendChild(regexInput);
        parentElement.appendChild(document.createElement('br')); // Add line break
    
        // Create a container for the input boxes
        const container = document.createElement('div');
        container.style.display = 'flex';
        container.style.flexWrap = 'wrap';
        container.style.alignItems = 'flex-start'; // Align items at the start of the container
        parentElement.appendChild(container);
    
        attributes.forEach(attribute => {
            const inputId = `custom_${attribute.toLowerCase()}`;
            const inputValue = customValues[inputId] || '';
    
            // Create a div for each input box
            const inputDiv = document.createElement('div');
            inputDiv.style.flexBasis = 'calc(50% - 10px)';
            inputDiv.style.boxSizing = 'border-box';
            inputDiv.style.marginRight = '10px';
    
            const labelElement = document.createElement('label');
            labelElement.style.width = "80px"; // You can adjust the width as needed
            labelElement.style.display = "inline-block"; // Ensures the width property works correctly
            labelElement.innerText = `${attribute}: `;
    
            const inputElement = document.createElement('input');
            inputElement.setAttribute('type', 'text');
            inputElement.setAttribute('id', inputId);
            inputElement.setAttribute('placeholder', `Enter ${attribute}`);
            inputElement.value = inputValue;
    
            inputDiv.appendChild(labelElement);
            inputDiv.appendChild(inputElement);
            container.appendChild(inputDiv);
        });
    }
    
    
        // Function to retrieve text box values
        function getTextValues() {
            const customValues = {};
            const attributes = ['Colour', 'Species', 'Level', 'Strength', 'Defence', 'Movement'];
    
            attributes.forEach(attribute => {
                const inputId = `custom_${attribute.toLowerCase()}`;
                const inputValue = document.getElementById(inputId).value;
                customValues[inputId] = inputValue;
            });
    
            return customValues;
        }
    
        // Function to check if a value exists in a comma-delimited string
        function checkValueInList(customValue, value) {
            // Split the comma-delimited string into an array of values
            const values = customValue.split(',');
    
            // Check if the given value exists in the array
            return values.includes(value.trim());
        }
    
        // Function to highlight pet names based on regex pattern
        function highlightPetNames() {
            const petNameSelectors = ['#pet0_name', '#pet1_name', '#pet2_name'];
            const regexPattern = document.getElementById('custom_regex').value; // Get regex pattern from input box
            const regex = new RegExp(regexPattern, 'i'); // Create regex object with case-insensitive flag
    
            petNameSelectors.forEach(selector => {
                const petNameElement = document.querySelector(selector);
                if (petNameElement) {
                    const petName = petNameElement.innerText.trim();
                    if (regex.test(petName)) {
                        petNameElement.style.backgroundColor = 'yellow';
                    }
                }
                else {
                    //console.log(`${selector} not found. Skipping highlighting process.`);
                }
            });
        }
    
        // Highlight pet attributes other than name
        function highlightPetAttributes() {
            const selectors = ['#pet0_table', '#pet1_table', '#pet2_table'];
            const customValues = {};
    
            // Retrieve values from text boxes
            const attributes = ['Colour', 'Species', 'Level', 'Strength', 'Defence', 'Movement'];
            attributes.forEach(attribute => {
                const inputId = `custom_${attribute.toLowerCase()}`;
                customValues[attribute.toLowerCase()] = document.getElementById(inputId).value;
            });
    
            //console.log('Custom values:', customValues);
    
            selectors.forEach(selector => {
                const table = document.querySelector(selector);
                if (table) {
                    const rows = table.querySelectorAll('tr');
                    rows.forEach(row => {
                        const cells = row.querySelectorAll('td');
                        if (cells.length === 2) {
                            const attribute = cells[0].innerText.trim().toLowerCase().replace(':', '').replace(/\s/g, '');
                            const value = cells[1].querySelector('span').innerText.trim().toLowerCase().replace(/\s/g, '');
                            const customAttribute = customValues[attribute.toLowerCase().replace(/\s/g, '')];
                            if (attribute === 'species' || attribute === 'colour'){
                                if ( checkValueInList(customValues[attribute],value)) {
                                    cells[1].style.backgroundColor = 'yellow';
                                }
                            }
                            else if (parseInt(value) >= parseInt(customValues[attribute] )) {
                                cells[1].style.backgroundColor = 'lightblue';
                            }
    
                        }
                    });
                }
                else {
                    //console.log(`${selector} not found. Skipping highlighting process.`);
                }
            });
        }
    
        // Function to remove all highlights
        function clearHighlights() {
            const highlightedElements = document.querySelectorAll('[style*=background-color]');
            highlightedElements.forEach(element => {
                element.style.backgroundColor = ''; // Remove background color
            });
        }
    
        // Function to save custom values when the page is unloaded
        window.addEventListener('beforeunload', () => {
            const customValues = {};
            const attributes = ['Colour', 'Species', 'Level', 'Strength', 'Defence', 'Movement'];
    
            attributes.forEach(attribute => {
                const inputId = `custom_${attribute.toLowerCase()}`;
                const inputValue = document.getElementById(inputId).value;
                customValues[inputId] = inputValue;
            });
    
            saveCustomValues(customValues);
        });
    
    
        // Function to periodically check for updates and re-highlight attributes and names
        function checkForUpdates() {
            setInterval(() => {
                clearHighlights();
                highlightPetAttributes();
                highlightPetNames();
            }, 100); // Check every 5 seconds
        }
    
    initializeTextBoxes();
        highlightPetAttributes();
        highlightPetNames();
    
        // Save custom values when the page is unloaded
        window.addEventListener('beforeunload', () => {
            const customValues = getTextValues();
            saveCustomValues(customValues);
        });
    
        // Start checking for updates
        checkForUpdates();
    
    })();
    Wow you are FAST!! This turned out awesome.

    I see how you're supposed to format the names for searching, but I can't quite figure out exactly how to put the colors. Would it just be "Blue, Green, Red" etc?


    Avatar by the wonderful (you need an account to see links)

  13. #1570
    Onetwo's Avatar
    Joined
    Dec 2023
    Posts
    90
    Userbars
    8
    Thanks
    89
    Thanked
    113/53
    DL/UL
    3/0
    Mentioned
    2 times
    Time Online
    3d 9h 56m
    Avg. Time Online
    32m
    Quote Originally Posted by Arcanine View Post
    Wow you are FAST!! This turned out awesome.

    I see how you're supposed to format the names for searching, but I can't quite figure out exactly how to put the colors. Would it just be "Blue, Green, Red" etc?
    Thanks! As for the colors, I did not remove space in the search so in your example you need to remove the spaced like this "Blue,Green,Red". Something for the species. No space in the list like this "wocky,bruce,yurble"

    I'll update the script to ignore spaces from the lists and post it to the script section.
    Last edited by Onetwo; 03-10-2024 at 09:35 PM.

Page 157 of 161 FirstFirst ... 57107147155156157158159 ... LastLast

Posting Permissions

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