Page 3 of 6 FirstFirst 1 2 3 4 5 ... LastLast
Results 21 to 30 of 54

Thread: ManageStore and CFStat - Weed out your store

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

    Default

    ManageStore is not working. I am aware of that and will fix, although not necessarily in the next three days. The code needs to adjust to the changes in the Store/Mall interface.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  2. #22
    Junior Member
    Join Date
    Apr 2009
    Location
    Almost canada
    Posts
    5

    Default

    Looking forward to the update! I've got WAY too much stuff stagnating in my inventory. I need to clean house!

  3. #23
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,025

    Default

    Try svn checkout https://svn.code.sf.net/p/kolmafiascripts/shop/code/

    and

    svn checkout https://svn.code.sf.net/p/kolmafiascripts/cfstat/code/

    to get the latest since I am pretty sure I fixed things and hope I remembered to update.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  4. #24
    Senior Member Winterbay's Avatar
    Join Date
    Feb 2010
    Posts
    5,033

    Default

    I think you did. At least the version I looked at to steal code for my own amusement seems to work
    My scripts:
    Best sushi for Profit
    Winterbay's Helpful Automatic Monsterbasher (WHAM)

    Scripts maintained by me:
    Autobasement
    Smashlib

    A small programmer joke:
    Wife: Honey, please go to the market and buy 1 bottle of milk. If they have eggs, bring 6.
    The man came back with 6 bottles of milk.
    Wife: Why did you buy 6 bottles of milk.
    Man: Because they had eggs...

    The 6 Stages of Debugging: 1 )That can't happen. 2) That shouldn't happen. 3) Hmmm, weird. 4) Why does that happen? 5) Oh, I see. 6 )How did that ever work?

    All programs can be optimized, and all programs have bugs; therefore all programs can be optimized to one line that doesn’t work. /Bob Fitch, Blizzard

  5. #25
    Senior Member Winterbay's Avatar
    Join Date
    Feb 2010
    Posts
    5,033

    Default

    I may have been wrong. When adapting the store_value function for my needs it seems as if I either broke something or the number the script picks up is not the price but the shop_amount meaning that both .myPrice and .numStore is the same number and neither of them is my current price. You may want to double check my findings. My current function currently looks like this:
    Code:
    record mall_item {
        item thing;
        int price;
        int qty;
    };
    
    int store_value() {
        int value = 0;
        int i = 0;
        int k;
        int l;
        mall_item [int] my_mallstore;
        string start = "<td valign=\"center\"><b>";
        int ss = length(start);
        string s2 = "<td align=\"center\"><span class=\"tohide\">";
        int ss2 = length(s2);
        string page = visit_url("backoffice.php?which=1");
        //Skip over a whole bunch of stuff that won't yield, item, price pairs
        int j = index_of(page, ">Actions<");
        if (j > 0) {
           page = substring(page, j);
           k = index_of(page, start);
           //As long as we think there is one pair, process it without
           //checking to see of both parts are there.
           while (k > 0) { 
              l = index_of(page, "</b></td>", k);
              my_mallstore[i].thing = to_item(substring(page,k+ss,l));
              page = substring(page, l);
    
              k = index_of(page, s2);
              l = index_of(page, "</span><input", k);
              my_mallstore[i].price = to_int(substring(page,k+ss2,l));
    
              page = substring(page, l);
              k = index_of(page, start);
    
              my_mallstore[i].qty = shop_amount(my_mallstore[i].thing);
              //print("Item " + my_mallstore[i].thing + " is in the store for " + my_mallstore[i].price + " (" + my_mallstore[i].qty + ")");
              i = i + 1;
           }
        }
        for m from 0 to count(my_mallstore)-1
            value = value + my_mallstore[m].price * my_mallstore[m].qty;
        return value;
    }
    My scripts:
    Best sushi for Profit
    Winterbay's Helpful Automatic Monsterbasher (WHAM)

    Scripts maintained by me:
    Autobasement
    Smashlib

    A small programmer joke:
    Wife: Honey, please go to the market and buy 1 bottle of milk. If they have eggs, bring 6.
    The man came back with 6 bottles of milk.
    Wife: Why did you buy 6 bottles of milk.
    Man: Because they had eggs...

    The 6 Stages of Debugging: 1 )That can't happen. 2) That shouldn't happen. 3) Hmmm, weird. 4) Why does that happen? 5) Oh, I see. 6 )How did that ever work?

    All programs can be optimized, and all programs have bugs; therefore all programs can be optimized to one line that doesn’t work. /Bob Fitch, Blizzard

  6. #26
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,025

    Default

    I'm not in an especially mafia friendly environment for several days but I will check when I can. Thank you for the feedback.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

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

    Default

    Definitely bugged. Not getting my price properly. Wish I had more than 5 minute chunks to look at this, but I will.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  8. #28
    Senior Member Winterbay's Avatar
    Join Date
    Feb 2010
    Posts
    5,033

    Default

    The code I quoted above works and used yours as a basis so should be possible to just adapt back without too much trouble hopefully. I stepped through the HTML with your function as a starting point and the print statement shows quantity and price fine so seems to be working.
    My scripts:
    Best sushi for Profit
    Winterbay's Helpful Automatic Monsterbasher (WHAM)

    Scripts maintained by me:
    Autobasement
    Smashlib

    A small programmer joke:
    Wife: Honey, please go to the market and buy 1 bottle of milk. If they have eggs, bring 6.
    The man came back with 6 bottles of milk.
    Wife: Why did you buy 6 bottles of milk.
    Man: Because they had eggs...

    The 6 Stages of Debugging: 1 )That can't happen. 2) That shouldn't happen. 3) Hmmm, weird. 4) Why does that happen? 5) Oh, I see. 6 )How did that ever work?

    All programs can be optimized, and all programs have bugs; therefore all programs can be optimized to one line that doesn’t work. /Bob Fitch, Blizzard

  9. #29

    Default

    ManageStore apparently uses kBay, which for now appears to be going away. That jumped out at me as I was putting together a json file of SVN scripts for roippi to use.

  10. #30
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,025

    Default

    Yes. I have it on my todo list to clean it out but since the announcement on GD held out the possibility that someone might take it over, I figured I'd hold off.

    Right now I'm thinking that what makes sense, (because I am lazy) is to either autosell stuff that was languishing in the store or just pull it and let it sit in inventory. (Whereas before it either autosold or kBay'd). That lets people who want to pulverize do so. If someone wants to make a case that the choices should be autosell or pulverize, I'll certainly consider it, but at some point what we really need is to let OCD handle the disposition and use the "is languishing" status to trigger a reminder for the user to reconsider what OCD does.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

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
  •