Approved script Scavenging script - Early release

Discussion in 'Scripts & Independent Tools' started by Shinko to Kuma, Feb 26, 2019.

Share This Page

  1. Anonymous...

    Anonymous... Active Member

    Joined:
    Feb 6, 2015
    Messages:
    29
    Likes Received:
    6
    I've noticed that it says the same, but still sends the runs out in hours. Seems like its just a typo and doesn't really affect the functionality of the script in any way
     
    Koallar likes this.
  2. Koallar

    Koallar New Member

    Joined:
    Jan 24, 2011
    Messages:
    6
    Likes Received:
    2
    Seems like it to me too now that I think of it. I just set the counter to 99999. It works for me. Thanks for the heads up though
     
  3. Shinko to Kuma

    Shinko to Kuma Non-stop Poster

    Joined:
    Sep 22, 2017
    Messages:
    193
    Likes Received:
    200
    Sorry all, I put part of my test version as the live version, I did some testing to try and get the runtimes more accurate to allow for potential sniping through scavenging if people wanted to. I'll rollback and get the old version back till I have time to finish the update that will make the script work a LOT faster

    EDIT: should work as intended now, there will be checkboxes to enable/disable categories but those won't work for now.
     
    Last edited: Jun 18, 2019
    Koallar and Sashaahn like this.
  4. Koallar

    Koallar New Member

    Joined:
    Jan 24, 2011
    Messages:
    6
    Likes Received:
    2
    Shinko, you and I need to become friends. LOL I have so much to learn.
     
  5. Sashaahn

    Sashaahn Non-stop Poster

    Joined:
    Nov 17, 2014
    Messages:
    100
    Likes Received:
    64
    I have two questions shinko if you can oblige me with an answer.

    1 - Do you think this will ever be edited to be able to leave reserve troops at home? I know there a couple of slightly tedious ways to do this anyway, But would be handy to be able to leave 1000/1000 sp/sw at home for a snipe if you get in trouble while troops are out scavenging.

    2 - Literally 99% of players (some very experienced and math driven players) have been talking about diminishing rate of return the longer one scavanges, pretty much since scavenging came out. Am I missing something here? Because I dont see it. In fact, all i see is the opposite. Every additional hour one scavenges for, the higher the rate of return, and at no point does the rate diminish.
     
    Last edited: Jun 21, 2019
    Veronika7747 likes this.
  6. Veronika7747

    Veronika7747 Active Member

    Joined:
    Nov 20, 2013
    Messages:
    42
    Likes Received:
    9
    Looks like scavenging script stopped working this morning... anyone else has the same problem??

    V
     
  7. Lord Guthan

    Lord Guthan New Member

    Joined:
    Jun 3, 2019
    Messages:
    1
    Likes Received:
    1
    Yep same here. Glancing at the script it looks like there are some variables no longer defined .
     
    Shinko to Kuma likes this.
  8. Shinko to Kuma

    Shinko to Kuma Non-stop Poster

    Joined:
    Sep 22, 2017
    Messages:
    193
    Likes Received:
    200
    I haven’t touched that script at all but I’ll take a look, on mobile rn so if you could show me a console log or something (F12 on chrome) that would be helpful

    - Sophie

    PS: I have another approved version of the scav script, more advanced but it has some calculation issues here and there still. You can try this one as well

    Code:
    javascript:
    $.getScript('https://dl.dropboxusercontent.com/s/e30h3fie7ohu2wi/scavSpeed.js');
     
  9. Flexander the Lit

    Flexander the Lit New Member

    Joined:
    Jul 22, 2019
    Messages:
    2
    Likes Received:
    2
    Hey mate this was in my console after trying to run the script
    en109.tribalwars.net-1563801268572.log:
    Code:
    scavengingfinal.js?_=1563801242991:28 Uncaught TypeError: Cannot read property 'duration_factor' of undefined
        at scavenge (scavengingfinal.js?_=1563801242991:28)
        at scavengingfinal.js?_=1563801242991:736
    
     
    Shinko to Kuma likes this.
  10. Flexander the Lit

    Flexander the Lit New Member

    Joined:
    Jul 22, 2019
    Messages:
    2
    Likes Received:
    2
    and this one when trying your other version


    Code:
    scavSpeed.js?_=1563801596820:55 Getting  /game.php?&screen=unit_info&ajax=data
    scavSpeed.js?_=1563801596820:97 Uncaught TypeError: Cannot read property 'duration_factor' of undefined
        at scavSpeed.js?_=1563801596820:97
    scavSpeed.js?_=1563801596820:76 Object
    scavSpeed.js?_=1563801596820:82 TypeError: Cannot read property 'checked' of undefined
        at calculateHaul (scavSpeed.js?_=1563801596820:205)
        at scavSpeed.js?_=1563801596820:79
        at loadNext (scavSpeed.js?_=1563801596820:43)
        at Object.<anonymous> (scavSpeed.js?_=1563801596820:62)
        at c (game.js:9)
        at Object.fireWith [as resolveWith] (game.js:9)
        at k (game.js:11)
        at XMLHttpRequest.r (game.js:11)
    (anonymous) @ scavSpeed.js?_=1563801596820:82
    
     
    Shinko to Kuma likes this.
  11. Shinko to Kuma

    Shinko to Kuma Non-stop Poster

    Joined:
    Sep 22, 2017
    Messages:
    193
    Likes Received:
    200
    Thanks, with that info I can fix it, I’ll be on a laptop in like an hour to fix it and should take 5 mins
     
  12. Veronika7747

    Veronika7747 Active Member

    Joined:
    Nov 20, 2013
    Messages:
    42
    Likes Received:
    9
    there must have been something similar on the balancing script as well as you have to "hit" manually send now; if you hit the script 2nd time it will just close the tab without sending the resources indicated earlier..
    hope this make a sense:confused:

    V
     
  13. Shinko to Kuma

    Shinko to Kuma Non-stop Poster

    Joined:
    Sep 22, 2017
    Messages:
    193
    Likes Received:
    200
    Update: both scripts should be fixed and working again, they did an update to major version 8.177, which changed the location of certain variables. Other servers (including .nl) are still running on 8.176 so I included an exception for those servers so they still keep working too.

    Are you sure it doesn't send the resources before closing the tab? I have it set right now that it will close the tab once the URL no longer has "send" or "wood" in there, which only happens after the sending was succesfull and it returns to the market
     
    Last edited: Jul 22, 2019
  14. Shinko to Kuma

    Shinko to Kuma Non-stop Poster

    Joined:
    Sep 22, 2017
    Messages:
    193
    Likes Received:
    200

    1) I can do this but with the overhaul they are doing to scavenging right now idk if I want to invest the time in that right now. I could just deduct a value of the numbers I grab from the page so it thinks there are less available then there actually are

    2) after 2 hours of scavenging time the rates pretty much are the same for every scavenging type. They drop exponentionally from the start and once they are around 2 hours it becomes stagnant

    [​IMG]
     
    Sashaahn likes this.
  15. Veronika7747

    Veronika7747 Active Member

    Joined:
    Nov 20, 2013
    Messages:
    42
    Likes Received:
    9
    for the balancing - when I run my shortkeys twice and it closes all the tabs I went and look how many mechants left in my only big village and they were still all there; so I run it again and hit the "send" manualy 2nd time around and resources were shipped out fine:)
     
  16. Shinko to Kuma

    Shinko to Kuma Non-stop Poster

    Joined:
    Sep 22, 2017
    Messages:
    193
    Likes Received:
    200
    I can't reproduce it on my end, it works just fine here, but to be safe (might be latency related), I made it so it only closes the page after it sent and you reloaded the page, then you run the script again. So you can still keep pressing the script button and it will work. Let me know if this works better for you
     
  17. Veronika7747

    Veronika7747 Active Member

    Joined:
    Nov 20, 2013
    Messages:
    42
    Likes Received:
    9
    Perfect; works for me just as before and I don't mind closing all tabs to the right once the 1st batch is done:)
    Thanks you! You are great!!

    V
     
  18. nightblade.greyswandir

    nightblade.greyswandir Contributing Poster

    Joined:
    Jul 23, 2009
    Messages:
    1,381
    Likes Received:
    3
    What are Enable check boxes for?
     
  19. Shinko to Kuma

    Shinko to Kuma Non-stop Poster

    Joined:
    Sep 22, 2017
    Messages:
    193
    Likes Received:
    200
    that function is currently disabled cause the calculations sometimes have weird bugs when people do weird combos, like activating category 1 and 3 only. The other version I linked a few posts ago has those working but until I make the calculations correct in every case I don’t want to add it to the main script
     
  20. FunnyPocketBook

    FunnyPocketBook New Member

    Joined:
    Jul 26, 2018
    Messages:
    5
    Likes Received:
    1
    On some servers they changed their scavenge object, to fix it just change the array index from 0 to 1 on line 28
    From
    PHP:
    var scavengeInfo JSON.parse($('html').find('script:contains("ScavengeScreen")').html().match(/\{.*\:\{.*\:.*\}\}/g)[0]);
    to
    PHP:
    var scavengeInfo JSON.parse($('html').find('script:contains("ScavengeScreen")').html().match(/\{.*\:\{.*\:.*\}\}/g)[1]);
     
    Last edited: Jul 23, 2019