Textual Reflexions

12/8/2008

PackRat: First release candidate “Steal me!”

Filed under: Packrat — Piotr P. Karwasz @ 11:25 pm

[This version of the script is OBSOLETE. For more informations and newer versions check the PackRat Helper category.]

After several months since the first 0.1 release we are proud to present you the first release candidate for version 1.0. The major improvement from the last beta release is the new stealing module that allows you to steal valuable cards from rats and upgrade the cards you need so that whenever you need to steal something important you’ll have a 7000 points card in your pack.

Another improvement is the way the script decides which cards to steal/buy/pick-up as pop-ups: you’ll have three choices, all cards from selected collections, an automatically generated list of missing cards or a fully personalized list.

Changelog:

  • New stealing module to steal important cards from Rats only and upgrade your droppable cards.
  • You can select which cards you don’t need under the collection preferences.
  • Shopping lists: fully personalized choice of the shopping list for the steal, stalk and pop-up module.
  • A configurable delay for the stalking module and the amount of free space to leave in the pack.
  • A Pause/Resume button for Brian, in additional to the traditional PAUSE shortcut.
  • Many small changes and bug fixes.

Download PackRat Helper: version 1.0-rc1.3

ATTENTION: for those who are upgrading, please flush the scripts preferences (with Tools > GreaseMonkey > Script Commands > Reset PackRat preferences) before reporting errors.

Also available at UserScripts.org, where you find a short manual.

For more informations about the installation process please check the FAQ.

[Update: Version 1.0-rc1.1 corrects the glitch reported in comment #3,

Version 1.0-rc1.2 does not update the pack if the steal failed,

Version 1.0-rc1.3 counter-acts the changes in the stealing procedure done by the Pack Rat developers.]

45 Comments »

  1. Does it ONLY steal from rats? I play co-op, so I don’t want it to steal from my friends. :)

    Comment by Packratter — 12/8/2008 @ 11:37 pm

  2. Packratter: Yes, it only steals from Rats. The grinding module grinds from everyone, but you can also set it to grind only from Rats.

    Anyway even for those who don’t play Co-op (personally I play solitary :-) ), automatically stealing from friends is not useful since the friends’ packs change seldom, while the Rats packs change continuously.

    Comment by Piotr P. Karwasz — 12/8/2008 @ 11:43 pm

  3. Hooray! I am so psyched!

    (and everything seemed to work fine, until the new collection was released - now I get errors:
    TypeError: collections[item.collection].cards[item.name] has no properties

    Updating the collections database doesn’t change the error.)

    Comment by Texy — 13/8/2008 @ 1:21 am

  4. Texy: I added the “I Do” collections to the database. Thanks for the hint, I thought I had completed all current collections :-). Anyway I also patched the script so that new releases and new cards don’t give errors.

    Comment by Piotr P. Karwasz — 13/8/2008 @ 1:35 am

  5. Thanks so much, Piotr!

    Comment by Texy — 13/8/2008 @ 4:55 am

  6. Anytime I try to delete a comment on my wall something weird happens and it won’t let me. Then the screen goes blank except for the script screen which says “Error in module ‘card’ on line 175: div is undefined” - i tried to update things but its still doing it. It’s just started since I downloaded the updated script. Any ideas?

    Comment by Amy — 14/8/2008 @ 1:36 am

  7. Why does the script grind with all cards again? It even grinds with 100 pointers.

    Comment by Tony C — 14/8/2008 @ 2:23 am

  8. I’m getting the oddest error in market stalking this evening. When I go to the market it says Stalking market n… in 10s, then it goes to http://apps.new.facebook.com/packrat/market/n. After that it tries market “e”, “w”, etc. Not sure why it is spelling things out. How bizarre!

    Comment by HLM — 14/8/2008 @ 4:03 am

  9. Wow! I love this! I didn’t think it could get any better, but this is awesome!!

    Comment by Donna — 14/8/2008 @ 6:42 am

  10. Is there an option to browse only the rats? Would be very useful, since some people have a lot of friends who play packrat, and browsing through all of them is pretty pointless if grinding is disabled. “Browse only rats” would speed up the steal missing cards-part significantly.

    Comment by Eric — 14/8/2008 @ 2:09 pm

  11. Amy: Most probably the PackRat application crashes. The script error you see is the consequence, not the cause.

    Tony: Again? The script always grinded every card at your disposal. It is my understanding that grinding is only useful to access all markets. A 100 point card it’s always better than nothing.

    HLM: I suppose that you are working on the I Do collection (if I am wrong please correct me). I did a mistake in the Tuxedo Shoe’s entry in the database. Update the collections database, it’s fixed.

    Eric: Good idea. I’ll take it in mind when writing the next release.

    Comment by Piotr P. Karwasz — 14/8/2008 @ 5:56 pm

  12. It was the tuxedo shoes. Thanks for the quick fix! :)

    Comment by HLM — 14/8/2008 @ 6:51 pm

  13. When the market stalking is set to 120 seconds, it only waits 12 seconds. I changed it to 60 seconds, and it only stalks for 6 seconds. Also in market stalking, apparently there are markets named “n,” “e,” “w,” “-,” etc (spelling new-york) like HLM said up there^.

    Comment by Donna — 14/8/2008 @ 8:19 pm

  14. Ahh… Sorry Piotr… I read your changelog entry for “Version 0.10.2: Don’t grind locks and other small changes.” and thought that you changed it only grind cards above a certain amount. I’d like to be able to set a value threshold, because cards that only grind you 10 points are really not worth bothering with as far as I’m concerned.

    Comment by Tony C — 14/8/2008 @ 11:28 pm

  15. In the latest version I cannot figure out how to have it pick up cards only from a certain collection. I either have to have it on my shopping list (which doesn’t help when it’s a possible brand new pop up that I want) or have it pick up everything. Am I missing how to set that up on this version? I’d love to just be able to highlight the collection I want, and then have it pick up from only that collection again.

    Also, I know I haven’t changed anything, but now my highlighting won’t work for some reason.

    As always thanks for your hard work! Your latest versions are incredible!

    Comment by Rebecca — 15/8/2008 @ 4:59 pm

  16. Donna: If you set market stalking every 120 seconds, it revisits the same market every 120 seconds. It means that if you must visit 4 markets it will switch markets every 120 / 4 = 30 seconds. The database error that made the script spell every letter in new-york was already fixed. Just update your collections database.

    Tony: I’ll probably just let the user choose the cards for grinding.

    Rebecca: In the Collections section of the preferences you have to choose “Everything from selected collections” as the current shopping list and the highlight/buy/steal and pop-up module will use that setting.

    Comment by Piotr P. Karwasz — 15/8/2008 @ 5:54 pm

  17. After upgrading, I don’t have a shopping list anymore, so I can’t verify what popup cards I’d like from what collections.

    How do I get the shopping list again?

    Comment by Allie — 17/8/2008 @ 12:57 am

  18. So last night after upgrading, I decided to try the grind feature…now the whole thing is broken :( I can not get it to browse my friends packs. I have upgraded, forced upgrade, changed preferences…It’s always in resting mode. This makes it hard to find the elusive great wall ;)

    Comment by somebody — 17/8/2008 @ 3:41 pm

  19. Allie: If the whole Collections section is missing in your preferences, you should have an error message in the status panel.

    somebody: You don’t have any error messages? It’s in resting mode even on your friends pages? Maybe it’s a problem with the browsing routine. I’ll look into it, for now try to force the cycle with the “Browse user pages in an infinite loop” option.

    Comment by Piotr P. Karwasz — 18/8/2008 @ 12:22 am

  20. thanks, i will try it out again, but i swear that when i had that selected it picked up everything even though i had two collections selected. will try it again and hopefully it works!

    thanks again!

    Comment by Rebecca — 18/8/2008 @ 4:39 am

  21. that worked, thanks! i think my problem was i didn’t have the pick up behavior set to current shopping list. thanks again for taking the time out to help everyone individually!

    Comment by Rebecca — 18/8/2008 @ 7:29 am

  22. no it was very weird, no error messages and I could not select my set that I was working on either. But by last night it was fully functional. Thank you for looking into it :)

    Comment by somebody — 19/8/2008 @ 1:58 am

  23. I think the stealing module (from Rats) is no longer working. It is surfing right past stuff on the shopping list and I already checked the settings three times.

    Comment by HLM — 19/8/2008 @ 2:04 am

  24. I’ve researched a little further and I think I know what is happening. When packrat faults after an attempted steal and the script sends it to “your pack” it is reading one of the rat’s merchandise as “your” inventory. It then doesn’t know what to drop for the other cards on the shopping list. When I go into preferences after this kind of glitch it is showing I have carrot juice, mimi gardenia, three ice cubes and other such rat fodder I didn’t pick up.

    This isn’t a fault of the script at all and until packrat is fixed I don’t think it can be avoided. I just thought you would want to know the scoop.

    Comment by HLM — 19/8/2008 @ 2:15 am

  25. I just found your script today and installed it on my work machine (Firefox 2) and it ran no problem.

    I came home and installed it on my home machine (Firefox 3) and it gives the following error

    Error: profile is undefined
    Source File: file:///home/jtraub/.mozilla/firefox/k510vmdj.default/gm_scripts/facebook_packrat_autocli/facebook_packrat_autocli.user.js
    Line: 1918

    Not quite sure what’s broken, but it’s not working for me so I hope you can help since I found this SO handy today at work.

    Comment by Joseph — 19/8/2008 @ 4:09 am

  26. Additional info. It seems (under FF3 on my machine) as if the code here

    var exept = new Object();
    (function() {
    for (var i = 0; i < modules.length; i++) {
    if (this[modules[i] + ‘_exec’]) {
    try {
    now = Date.now();
    this[modules[i] + ‘_exec’]();

    isn’t getting executing for some reason. I inserted alerts before the if (this[modules[i] + ‘_exec’]) and after it (right above the try) and it hit the first alert but not the second.

    Comment by Joseph — 19/8/2008 @ 7:45 am

  27. The steal module is still not working properly, even when PackRat is. I picked magic potion and sunshine from my pack and told it to pick cards of higher value to steal from the rats. I guided it to all ten rats and it didn’t try to steal a thing. I’ve also tried designating plentiful items for it to steal (like two piece) and led it to the rats. That didn’t work either. It is still highlighting the cards I want, but not taking any action.

    Comment by HLM — 20/8/2008 @ 3:00 pm

  28. HLM: Your problems were probably caused by the script erroneously updating your pack when a steal failed. If someone steal a card before you do, the application shows his pack instead of yours, the script considers it as yours and then does not find any “droppable” cards in it. Hence it will not steal.

    The problem is corrected in version 1.0-rc1.2.

    Joseph: Maybe the version of GreaseMonkey you are using has something to do with it (the value of ‘this’ may differ from version to version). I am using the 0.8 series on Firefox 3 and everything works. The 0.7 series also worked.

    Comment by Piotr P. Karwasz — 20/8/2008 @ 9:49 pm

  29. I’m having the same problem as HLM. It’s not stealing/dropping ANY of the cards I have marked as ok to do that with.

    Comment by Sarah — 20/8/2008 @ 11:02 pm

  30. Piotr: I’m running under the 0.8 series of GM (cannot give you the exact version number since I’m at work) but it’s the most recently released version. I’ll update tonight with version info from Firefox and from GM. It’s rather annoying that I cannot use it at home.

    At work (which is working) I have FF 2.0.0.16, GM 0.8.20080609.0 and it works.

    Comment by Joseph — 20/8/2008 @ 11:11 pm

  31. HLM and Sarah: I actually discovered that the Pack Rat developers change the way that stealing works. The update to the new method is in version 1.0-rc1.3 I just released.

    Comment by Piotr P. Karwasz — 20/8/2008 @ 11:19 pm

  32. Just an FYI: there’s another new set. I’ve noticed it sometimes takes a day or two for new cards to be added to the shopping list, even after updating the collections database. Is there something additional I should be doing to keep that up to date?

    Thanks! (as always)

    Comment by Janey — 20/8/2008 @ 11:21 pm

  33. Janey: There are many reasons for the delay: the collection appears on the Wiki after some time, I add it to the database usually in the evening (CEST) and your browser serves you a cached version of the database instead of a fresh one (I have still to find why). You can remove the third cause by clearing your Cache before updating the database (Tools > Clear Private Data… and select the cache).

    Comment by Piotr P. Karwasz — 20/8/2008 @ 11:38 pm

  34. Thanks for the tip, Piotr!

    Comment by Janey — 21/8/2008 @ 12:06 am

  35. Piotr: My home computer FF (3.0.1) and GM of the same version I was using earlier now works.. The problem btw was that I had installed a version of GM built from SVN to test out a feature.. Apparently there is some change in the SVN version of GM which will break your script so you might want to track when they release a new version and make sure it still works. Sorry for the false alarm and *YAY* I can use this from home now :)

    Comment by Joseph — 21/8/2008 @ 3:52 am

  36. Hi there, the past few script updates continually yield the error message,
    TypeError: collections[item.collection].cards has no properties

    Accompanying this, the shopping list with icons of all the sets has completely disappeared in the preferences panel. As a result, I am unable to set preferences for which popups to collect, since I don’t want to collect all of them.

    I have tried uninstalling and reinstalling, going into User Script Commands, etc., all to no avail. I’ve also tried installing much older generations, which typically works, but only reflects those sets available at that time, not the absolutely most current sets.

    S.O.S.! Thanks!

    Comment by RMR — 22/8/2008 @ 3:17 am

  37. Hi Piotr,
    I’ve cleared my cache (I do it anyway when exiting Firefox, but I did it again), and I’m still not seeing anything new in the collection data since the first three Ninja Storm cards came out, and many I Do cards are missing. Is this expected behaviour at the moment?

    Comment by Packratter — 23/8/2008 @ 11:07 pm

  38. please update collections half of the “i do” and “ninja storm” cards are not included - i have tried several times to update collection to no avail. its been like this for 3 days now!

    Comment by Barb — 24/8/2008 @ 3:44 am

  39. Another feature request: Considering how dependent the script is on the database being up-to-date, and realizing that the database often lags behind the cards being released (for example, the database now is 3+ days behind) — would it be possible to add a feature where you could:

    (a) pickup any popups from selected collections (so, for example, I could ask it to pick up any popups from Ninja Storm I Do)

    and

    (b) pickup popups/buy from markets any NEW cards that are not yet listed - like the script recognizes there is a new card in the markets that doesn’t appear on the list of cards, and will buy that card

    Just trying to brainstorm ways to help us out when the database is behind the card releases. Thanks!

    Comment by mhcranberry — 24/8/2008 @ 7:06 am

  40. We need a collections update!

    Comment by Mordy — 25/8/2008 @ 3:55 am

  41. mhcranberry, I had my shopping list blank (no cards selected), and checked both the “I Do” and the “Ninja Storm” collections for the collections that I’m working on, and it does pick up new popup cards. I got 2 of the Eastern Fortress cards as popups, and they’re not listed in the script yet. So at least that feature will still work for you until it gets updated. But I agree that the script is too dependent on the author’s updating everything, and the way PackRat releases a card here and there every day or so, I personally would get tired of having to update the script all the time. Is there any way we could manually change the script ourselves?? (says the one who has no experience writing scripts)

    Comment by Donna — 25/8/2008 @ 4:28 pm

  42. I had this lovely little script up and running then suddenly it just stopped apearing on my page
    have uninstalled both the script and grease monkey and tried to reinstall but now when i try to reinstall the script i get an error

    line 1090
    char 7
    code: 800A03ED
    source microsift jscript compilation error

    Please help!!

    Comment by jay — 26/8/2008 @ 7:05 pm

  43. RMR: The database of collections is separate from the script, so installing even older versions will always end up with the current collections. As of the error, could you tell which collections were you working on when it appeared?

    Packratter: The database is manually updated by myself, so if I am on holiday or on weekends it stays that way for some time.

    Barb: Sorry, I was in Bonn for the International Silent Film Festival.

    mhcranberry: Do you think a new configuration option is needed or can I just pick-up every unknown card from current collections?

    Donna: You can manually edit the database that is stored in the file prefs.js of your current Firefox profile (look for the key called collections), but it is not very comfortable. If I find some time I’ll set up a script that will automatically update the database using the informations from the PackRat Wiki, so that by editing the wiki you’ll be able to edit the database (with let say a delay of less than an hour).

    jay: You receive this error instead of the installation dialog or after it?

    Comment by Piotr P. Karwasz — 27/8/2008 @ 1:04 am

  44. I think having the option to pick up or purchase every unknown card from current collections would be FANTASTIC. That would help smooth the gap in between times when new cards are released, but the script’s database isn’t updated.

    Comment by Texy — 27/8/2008 @ 7:07 am

  45. Texy Done in RC2. Hope it helps and thank you for your donation.

    Comment by Piotr P. Karwasz — 27/8/2008 @ 2:05 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress