Page 6 of 6 FirstFirst ... 4 5 6
Results 51 to 58 of 58

Thread: ManageStore and CFStat - Weed out your store

  1. #51
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,146

    Default

    I guess I'd forgotten that it did output something, though what I should really have asked was if it could note that nothing was found if such is the case. I know the absence of items implies it found nothing, but it just feels incomplete if all it says is it's done? Maybe that's just me.
    Originally Posted by Laserrobotics View Post
    OK. I imagine changing the unconditional ending message to include a count (acted on x of the y item types in store) would be reasonable. On my list although that list has not gotten a lot of attention lately :-)
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  2. #52
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,146

    Default

    ManageStore updated in response to KoLmafia changes.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  3. #53
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    366

    Default

    I ran this today for the first time.

    I have a few items in my store listed for min price (Spider web, Disco Ball, etc), I was hoping the script would take them all out, and autosell them. Here's my results

    > call scripts\ManageStore.ash

    Simulate: true
    ColdFront volume factor: 2
    Act on items that can't compete with NPC: true
    Autosell identified items: true

    spider web will be pulled and autosold.

    ManageStore completed.
    Requesting store inventory...
    Store inventory request complete.

    > call scripts\ManageStore.ash

    Simulate: false
    ColdFront volume factor: 1
    Act on items that can't compete with NPC: true
    Autosell identified items: true

    Removing spider web from store...
    681 spider web removed from your store.
    Autoselling items to NPCs...
    You gain 2,043 Meat
    Items sold.

    ManageStore completed.

    I would love it if the script took everything and autosold it.

  4. #54
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,146

    Default

    Thanks for running this.

    If an item is at mall minimum but actually seems to be selling at that price the script will not sell it because you could be advertising or get lucky and might actually be the store that sells it.

    The way that is calculated is it takes the quantity you have on hand, multiplies it by the Coldfront Volume factor and compares that to the sales volume reported by Coldfront. If the calculated value is more than the sales volume then it will pull and sell, provided that the Coldfront average price is the mall minimum.

    So my first suggestion would be to try raising the volume factor. I usually use 5 arbitrarily, but if you want to empty your store of stuff at mall min 100 would probably do the trick.

    The script uses zlib's verbosity so setting it to 6 might provide insight in case my memory is shot or there is an undiscovered bug.

    You could also check the Coldfront data. The CFData.txt file has item number, date checked, average sale price and sales volume.

  5. #55
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,146

    Default

    I updated CFStat. There is now a zlib variable to specific the timespan for Coldfront data.

    CFStat_Coldfront_Timespan

    //5 - last 12 hours
    //1 - last 24 hours
    //6 - last 48 hours
    //2 - last 7 days
    //7 - last 14 days
    //3 - last 30 days
    //4 - all history

    Darzil expressed concerns about the average as displayed by Coldfront and graciously wrote and shared code to compute the average directly from the transaction data. Quick testing indicated that when the computed and extracted average were different the computed version was more interesting and potentially more useful.

    Reading from the cache was disabled because the average price could potentially change every 30 minutes and changing the timespan can change the average.

  6. #56

    Default

    I made a quick code change to do this

    Code:
    int pulverizePrice(item it) {
        int [item] remnants = get_related(it, "pulverize");
        int total = 0;
        foreach remnant, chance in remnants {
            int rprice = autosell_price(remnant);
            total += rprice * (chance/1000000);
        }
    
        return total;
    }
    
    void doAction(boolean sim, item it, int q, boolean autosell) {
       String out;
    
       int pulv = pulverizePrice(it);
    
       if (sim) {
          out = to_string(it) + " will be pulled and ";
          if (!autosell) {
             out = out + "NOT ";
          }
          if (pulv > autosell_price(it)) out = out + "pulverized.";
          else out = out + "autosold.";
       } else {
          boolean ok = take_shop(it);
          if (autosell) {
            if (pulv > autosell_price(it)) cli_execute("pulverize " + q + " " + it.name);
            else ok = autosell(q, it);
          }
       }
       if (sim) print(out);
    }
    So basically, if the sum of the autosell value of the expected remnants after smashing is greater than the autosell price itself, it pulverizes instead.

    A better version of this would a) actually do the autoselling and b) determine if its worth putting the remnants back in the mall or autoselling them. But this is still (strictly?) better than the current version.

  7. #57
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,146

    Default

    Thanks. I'll look at this.

    Now you have me thinking - if I am going to autosell something, what are my more profitable options? Pulverize is one. Zap might be another.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  8. #58

    Default

    Yes, it would also be interesting to find something to do with items that don't sell but also can't be autosold or smashed (Senior Mints, for example)

Similar Threads

  1. Replies: 2
    Last Post: 01-23-2012, 11:57 PM
  2. How to look at your store?
    By SinginSally in forum Scripting Discussion
    Replies: 2
    Last Post: 02-12-2010, 05:17 PM
  3. Store Manager 101?
    By Raven434 in forum Community Support
    Replies: 3
    Last Post: 10-30-2009, 06:06 PM
  4. Store advertising...
    By Spiny in forum Community Support
    Replies: 3
    Last Post: 08-27-2009, 08:54 AM
  5. Link back to manage store at the top of the store log page
    By efilnikufecin in forum Relay Override Scripts
    Replies: 0
    Last Post: 01-02-2008, 03:18 AM

Posting Permissions

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