Page 105 of 160 FirstFirst ... 55595103104105106107115155 ... LastLast
Results 1,041 to 1,050 of 1598

Thread: Request a Bot/Feature

  1. #1041
    *squeak*
    Bat's Avatar
    Joined
    Nov 2012
    Posts
    4,040
    Userbars
    152
    Thanks
    2,147
    Thanked
    46,688/3,563
    DL/UL
    34/1
    Mentioned
    1,769 times
    Time Online
    644d 1h 41m
    Avg. Time Online
    3h 41m
    Quote Originally Posted by Wanheda View Post
    It was the auto haggler :/

    Well so I need another AH so the other script can work :/
    You may be able to work around this by changing the execution order/position of this script. In TamperMonkey for example, if you move the Smart Blocker to position 1, then it should execute before the other scripts do - allowing it to change the layout of the page as intended. However, unless the other scripts are better at compensating for page changes than the Smart Blocker, then you may just be shuffling your issues around. It's going to be a gamble either way.

    I'd offer to modify the Smart Blocker to work around your current issue, but if you added or took away a script in the future, it may break this one again. Unless you find a single script that does everything you want, or a set of scripts that were expressly designed to work with one-another, then you may run into more problems.

  2. #1042
    ZeroTwo's Avatar
    Joined
    Jul 2017
    Posts
    669
    Pronouns
    She/Her
    Userbars
    33
    Thanks
    1,408
    Thanked
    636/295
    DL/UL
    80/0
    Mentioned
    58 times
    Time Online
    36d 22h 14m
    Avg. Time Online
    21m
    Quote Originally Posted by Odd View Post
    You may be able to work around this by changing the execution order/position of this script. In TamperMonkey for example, if you move the Smart Blocker to position 1, then it should execute before the other scripts do - allowing it to change the layout of the page as intended. However, unless the other scripts are better at compensating for page changes than the Smart Blocker, then you may just be shuffling your issues around. It's going to be a gamble either way.

    I'd offer to modify the Smart Blocker to work around your current issue, but if you added or took away a script in the future, it may break this one again. Unless you find a single script that does everything you want, or a set of scripts that were expressly designed to work with one-another, then you may run into more problems.
    I'm using this AH:

    Any idea how I can use both?

  3. #1043
    *squeak*
    Bat's Avatar
    Joined
    Nov 2012
    Posts
    4,040
    Userbars
    152
    Thanks
    2,147
    Thanked
    46,688/3,563
    DL/UL
    34/1
    Mentioned
    1,769 times
    Time Online
    644d 1h 41m
    Avg. Time Online
    3h 41m
    Quote Originally Posted by Wanheda View Post
    I'm using this AH:

    Any idea how I can use both?
    Ha! Well that figures.

    The Haggler script you're using specifically targets and removes the item's "onclick" attribute in order to allow you to jump to the haggle page without a confirmation popup. The Smart Blocker was specifically designed to parse an item's "onclick" attribute in order to get that item's name. So when the Haggler removes "onclick" - it stops the Smart Blocker from reading the items.

    Try this version of the Smart Blocker. I've replaced the name retrieval method with one that doesn't use the "onclick" attribute.

    Code:
    // ==UserScript==
    // @author         Backslash
    // @(you need an account to see links)cription    Hides items that are not in the restock list
    // @include        (you need an account to see links)
    // @(you need an account to see links)           Neopets : Shops : Smart Block
    // @(you need an account to see links)space      (you need an account to see links)
    // @version        1.2
    // ==/UserScript==
    /*
    2018-11-15 Modified by Odd
    
    - replaced item name retrieval method by reading the "B" element after the item haggle link instead of reading the haggle link's "onclick" attribute
    
    2018-11-14 Modified by Odd
    
    - added version
    - changed the "include" so that the script will only run in shops instead of on every page
    - fixed issue with adding the listbox UI by targeting the specific cell that the author wanted it in instead of doing a page-wide find-and-replace
    - fixed issue with "rsList" showing on initial load despite the "User the Smart Block Feature" checkbox not being checked
    - replaced GM_getValue and GM_setValue with a quick and dirty localStorage getter and setter (also added a "smartBlock" prefix to each variable in order to avoid ambiguity issues when using shared storage)
    */
    
    function getValue(name, defaultValue) {
    
        var value = localStorage.getItem(name);
    
        if (value != null) return value;
    
        return defaultValue;
    }
    
    function setValue(name, value) {
    
        if (value == null || value === undefined) localStorage.removeItem(name);
        else localStorage.setItem(name, value);
    }
    
    var layout = '\
    <div class="contentModule" style="height: 100%"><table cellpadding="3" cellspacing="0" border="0" class="contentModuleTable">\
    				<tr>\
    					<td class="contentModuleHeader"> Smart Block</td>\
    				</tr>\
    				<tr>\
    					<td align="left" valign="top" class="contentModuleContent">\
    						<div align="center">\
    						<input type="checkbox" name="team" id="team" value="team" '+ getValue('smartBlock.team', '') + '> <label for="team">Use the Smart Block Feature</label><br>\
    						<div id="rsList" style="' + ((getValue('smartBlock.team') == "checked") ? "" : "display: none;") + '">Enter a list of items that you don\'t want the script to block.<br><textarea id="listBox" style="width:80%;height:125px;">'+ getValue('smartBlock.rsList', 'No Items Listed') + '</textarea><br><Br></div><button id="saveButton">Save Settings</button>\
    						</div><br />\
    					</td>\
    				</tr></table></div>\
    ';
    
    document.querySelector("td[width='304']").innerHTML += layout;
    
    document.getElementById('team').addEventListener('click', sBlockClick, false);
    function sBlockClick() {
        if (document.getElementById('team').checked == true) {
            document.getElementById('rsList').setAttribute("style", "");
        }
        else {
            document.getElementById('rsList').setAttribute("style", "display:none;");
        }
    }
    
    document.getElementById('saveButton').addEventListener('click', saveSettings, false);
    
    function saveSettings() {
    
        setValue('smartBlock.rsList', document.getElementById('listBox').value);
    
        if (document.getElementById('team').checked == true) {
            setValue('smartBlock.team', 'checked');
        } else {
            setValue('smartBlock.team');
        }
    
        window.location.reload();
    }
    
    function AdBlock(c) {
        a = document.evaluate("//table[@align = 'center' and @cellpadding = '4']/tbody//td", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
        b = a.snapshotLength;
        h = new Array();
        if (b > 0) {
            hiddenItems = document.evaluate("//table[@align = 'center' and @cellpadding = '4']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0).innerHTML;
            for (var i = 0, link; i < b; i++) {
                if ((link = a.snapshotItem(i).getElementsByTagName('a')[0]) && link.nextSibling && link.nextSibling.nodeName == "B") {
                    itemName = (link.nextSibling.textContent || "");
                    for (j = 0; j < c.length; j++) {
                        if (c[j].toLowerCase() == itemName.toLowerCase()) {
                            h.push(a.snapshotItem(i));
                            break;
                        }
                    }
                    a.snapshotItem(i).parentNode.removeChild(a.snapshotItem(i));
                }
            }
            if (h.length > 0) {
                for (i = 0; i < (h.length / 6) + 1; i++) {
                    f = document.evaluate("//table[@align = 'center' and @cellpadding = '4']/tbody/tr", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(i);
                    for (j = 0; j < 6 ; j++) {
                        if (typeof h[0] != 'undefined') {
                            f.appendChild(h[0]);
                            h.splice(0, 1);
                        }
                    }
                }
            }
            document.evaluate("//td[@class = 'contentModuleHeader']/b", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0).innerHTML = "Shop Inventory currently contains <b><font color=#3BB9FF>" + b + "</font></b> items (click <u><div style='cursor:pointer; display:inline;' id='hiddenItems'>here</div></u> to view full shop stock)";
            document.getElementById('hiddenItems').addEventListener('click', function () { document.evaluate("//table[@align = 'center' and @cellpadding = '4']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0).innerHTML = hiddenItems; }, false);
        }
    }
    
    if (getValue('smartBlock.team') == "checked") {
        var items = getValue('smartBlock.rsList').split('\n');
        AdBlock(items);
    }

  4. The Following User Says Thank You to Bat For This Useful Post:

    ZeroTwo (11-15-2018)

  5. #1044
    ZeroTwo's Avatar
    Joined
    Jul 2017
    Posts
    669
    Pronouns
    She/Her
    Userbars
    33
    Thanks
    1,408
    Thanked
    636/295
    DL/UL
    80/0
    Mentioned
    58 times
    Time Online
    36d 22h 14m
    Avg. Time Online
    21m
    Quote Originally Posted by Odd View Post
    Ha! Well that figures.

    The Haggler script you're using specifically targets and removes the item's "onclick" attribute in order to allow you to jump to the haggle page without a confirmation popup. The Smart Blocker was specifically designed to parse an item's "onclick" attribute in order to get that item's name. So when the Haggler removes "onclick" - it stops the Smart Blocker from reading the items.

    Try this version of the Smart Blocker. I've replaced the name retrieval method with one that doesn't use the "onclick" attribute.

    Code:
    // ==UserScript==
    // @author         Backslash
    // @(you need an account to see links)cription    Hides items that are not in the restock list
    // @include        (you need an account to see links)
    // @(you need an account to see links)           Neopets : Shops : Smart Block
    // @(you need an account to see links)space      (you need an account to see links)
    // @version        1.2
    // ==/UserScript==
    /*
    2018-11-15 Modified by Odd
    
    - replaced item name retrieval method by reading the "B" element after the item haggle link instead of reading the haggle link's "onclick" attribute
    
    2018-11-14 Modified by Odd
    
    - added version
    - changed the "include" so that the script will only run in shops instead of on every page
    - fixed issue with adding the listbox UI by targeting the specific cell that the author wanted it in instead of doing a page-wide find-and-replace
    - fixed issue with "rsList" showing on initial load despite the "User the Smart Block Feature" checkbox not being checked
    - replaced GM_getValue and GM_setValue with a quick and dirty localStorage getter and setter (also added a "smartBlock" prefix to each variable in order to avoid ambiguity issues when using shared storage)
    */
    
    function getValue(name, defaultValue) {
    
        var value = localStorage.getItem(name);
    
        if (value != null) return value;
    
        return defaultValue;
    }
    
    function setValue(name, value) {
    
        if (value == null || value === undefined) localStorage.removeItem(name);
        else localStorage.setItem(name, value);
    }
    
    var layout = '\
    <div class="contentModule" style="height: 100%"><table cellpadding="3" cellspacing="0" border="0" class="contentModuleTable">\
    				<tr>\
    					<td class="contentModuleHeader"> Smart Block</td>\
    				</tr>\
    				<tr>\
    					<td align="left" valign="top" class="contentModuleContent">\
    						<div align="center">\
    						<input type="checkbox" name="team" id="team" value="team" '+ getValue('smartBlock.team', '') + '> <label for="team">Use the Smart Block Feature</label><br>\
    						<div id="rsList" style="' + ((getValue('smartBlock.team') == "checked") ? "" : "display: none;") + '">Enter a list of items that you don\'t want the script to block.<br><textarea id="listBox" style="width:80%;height:125px;">'+ getValue('smartBlock.rsList', 'No Items Listed') + '</textarea><br><Br></div><button id="saveButton">Save Settings</button>\
    						</div><br />\
    					</td>\
    				</tr></table></div>\
    ';
    
    document.querySelector("td[width='304']").innerHTML += layout;
    
    document.getElementById('team').addEventListener('click', sBlockClick, false);
    function sBlockClick() {
        if (document.getElementById('team').checked == true) {
            document.getElementById('rsList').setAttribute("style", "");
        }
        else {
            document.getElementById('rsList').setAttribute("style", "display:none;");
        }
    }
    
    document.getElementById('saveButton').addEventListener('click', saveSettings, false);
    
    function saveSettings() {
    
        setValue('smartBlock.rsList', document.getElementById('listBox').value);
    
        if (document.getElementById('team').checked == true) {
            setValue('smartBlock.team', 'checked');
        } else {
            setValue('smartBlock.team');
        }
    
        window.location.reload();
    }
    
    function AdBlock(c) {
        a = document.evaluate("//table[@align = 'center' and @cellpadding = '4']/tbody//td", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
        b = a.snapshotLength;
        h = new Array();
        if (b > 0) {
            hiddenItems = document.evaluate("//table[@align = 'center' and @cellpadding = '4']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0).innerHTML;
            for (var i = 0, link; i < b; i++) {
                if ((link = a.snapshotItem(i).getElementsByTagName('a')[0]) && link.nextSibling && link.nextSibling.nodeName == "B") {
                    itemName = (link.nextSibling.textContent || "");
                    for (j = 0; j < c.length; j++) {
                        if (c[j].toLowerCase() == itemName.toLowerCase()) {
                            h.push(a.snapshotItem(i));
                            break;
                        }
                    }
                    a.snapshotItem(i).parentNode.removeChild(a.snapshotItem(i));
                }
            }
            if (h.length > 0) {
                for (i = 0; i < (h.length / 6) + 1; i++) {
                    f = document.evaluate("//table[@align = 'center' and @cellpadding = '4']/tbody/tr", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(i);
                    for (j = 0; j < 6 ; j++) {
                        if (typeof h[0] != 'undefined') {
                            f.appendChild(h[0]);
                            h.splice(0, 1);
                        }
                    }
                }
            }
            document.evaluate("//td[@class = 'contentModuleHeader']/b", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0).innerHTML = "Shop Inventory currently contains <b><font color=#3BB9FF>" + b + "</font></b> items (click <u><div style='cursor:pointer; display:inline;' id='hiddenItems'>here</div></u> to view full shop stock)";
            document.getElementById('hiddenItems').addEventListener('click', function () { document.evaluate("//table[@align = 'center' and @cellpadding = '4']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0).innerHTML = hiddenItems; }, false);
        }
    }
    
    if (getValue('smartBlock.team') == "checked") {
        var items = getValue('smartBlock.rsList').split('\n');
        AdBlock(items);
    }
    OMG!!! the script finally works, thank you a lot

  6. #1045
    *squeak*
    Bat's Avatar
    Joined
    Nov 2012
    Posts
    4,040
    Userbars
    152
    Thanks
    2,147
    Thanked
    46,688/3,563
    DL/UL
    34/1
    Mentioned
    1,769 times
    Time Online
    644d 1h 41m
    Avg. Time Online
    3h 41m
    Quote Originally Posted by Wanheda View Post
    OMG!!! the script finally works, thank you a lot
    Awesome! Enjoy : )

  7. #1046
    snarrkie's Avatar
    Joined
    Jun 2012
    Posts
    91
    Userbars
    2
    Thanks
    37
    Thanked
    11/9
    DL/UL
    123/0
    Mentioned
    14 times
    Time Online
    6d 8h 54m
    Avg. Time Online
    2m
    Has anyone done a mass-account Trudy bot yet?

  8. #1047

    Joined
    Aug 2012
    Posts
    24
    Userbars
    0
    Thanks
    11
    Thanked
    7/5
    DL/UL
    42/0
    Mentioned
    6 times
    Time Online
    7d 7h 21m
    Avg. Time Online
    2m
    I just need a birthday cracker bot.

  9. #1048
    Sirenic's Avatar
    Joined
    Oct 2016
    Posts
    5
    Userbars
    0
    Thanks
    2
    Thanked
    0/0
    DL/UL
    29/0
    Mentioned
    Never
    Time Online
    1d 8h 34m
    Avg. Time Online
    N/A
    Quote Originally Posted by kikibee View Post
    I just need a birthday cracker bot.
    Ugh agreed. Could get so many shells I've lost ... only cause I forgot the bday lol






  10. #1049
    Menine's Avatar
    Joined
    Aug 2016
    Posts
    2,380
    Pronouns
    she
    Userbars
    61
    Thanks
    6,362
    Thanked
    8,850/1,707
    DL/UL
    95/0
    Mentioned
    505 times
    Time Online
    222d 5h 8m
    Avg. Time Online
    1h 54m
    Anyone have a bot for the plot maze?

  11. #1050
    pinkpain's Avatar
    Joined
    Oct 2018
    Posts
    117
    Userbars
    3
    Thanks
    525
    Thanked
    209/65
    DL/UL
    9/0
    Mentioned
    2 times
    Time Online
    12d 4h 53m
    Avg. Time Online
    8m
    This has probably been asked over and over but I can't find it so can't hurt to ask I guess. Is it possible to turn converted pets into unconverted pets? XP

Page 105 of 160 FirstFirst ... 55595103104105106107115155 ... 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
  •