Page 1 of 6 1 2 3 ... LastLast
Results 1 to 10 of 55

Thread: ZapWizard - Automatically zaps for mall profit

  1. #1

    Default ZapWizard - Automatically zaps for mall profit

    ZapWizard 0.9

    When called, ZapWizard determines the most profitable item for zapping. Pending your confirmation, it then acquires the item, zaps it, and places the transmogrified item into your mall store.

    REQUIREMENTS
    This script uses ZLib.ash
    If you don't have it already you can get it from here: Zarqon's Useful Function Library

    There's a few ZLib variables to play around with, shown here with their default values.
    Change them from the Mafia CLI, like this:
    Code:
    zlib zapwizard_numberofrecommendations = 3
    or use a Relay zlib editor like Heeheehee's one.

    The variables are pretty self-explanatory, but I'll explain what each of them does anyway:

    numberofrecommendations = 1
    Can be increased up to 10 to show a greater number of recommendations, in order of profitability. ZapWizard will only offer to autozap its top recommendation.

    volumechecking = true
    minvolume = 700

    This checks the amount sold of the most expensive group member over the last week, using data from http://kol.coldfront.net
    The request to coldfront is only made after all other conditions for recommendation have been met.
    If the amount sold over this period is less than minvolume then the group will not be recommended.

    minmargin = .2
    The minimum profit margin, set to 20% by default. If the margin is lower than this, then ZapWizard will not recommend it. To remove this limit, set to 0.

    capitalthreshold = 10000
    The maximum meat cost of the cheapest group member, set to 10k meat by default. If the cheapest item in a group is worth more than this amount, then ZapWizard will not recommend it. If you want to completely remove this limit, set to -1. You probably don't want to do that though.

    autozap = true
    If set to false then ZapWizard won't offer to autozap, and will only give recommendations.

    confirmautozap = true
    If set to false then zaps top recommendation without requiring user confirmation.

    overheat = false
    Set to true to stop ZapWizard aborting when your wand is warm.

    blowupwand = false
    If set to true then ZapWizard will keep zapping until your wand explodes, then automatically set this variable back to false.
    This overrides your usual setting for overheat.

    completeoutfits = true
    If true, attempts to complete aftercore outfits - Hobopolis/SlimeTube/Cursed Pirate - before zapping for profit. Thanks to Zarqon/Sorguon for the help here

    priceupdateperiod = 7
    How many days to wait before rechecking item prices, by default only once every week.


    Version History
    0.1 Added version checking, Use ZLib verbosity settings, Improved wand heat checking, Added volume check, Removed option to ignore equipment, Removed tiny plastic commons
    0.2 Script was saving a junk zlib variable - "ZapWiz_dumpresults". Removed
    0.3 Use "data\mallvolumes.txt" to save historical volumes, and only update if older than 3 days, Improved recommendation algorithm, Switch to using Zlib variables.
    0.4 Automised mall pricing, Customisable price update period, Auto outfit completion.
    0.5 Parse zapgroups and untradeable zappable outfits from kolmafia data files.
    0.6 Option to run without user confirmation. Removed wierd message when zapping to complete outfits.
    0.7 Easy wand exploding, better reporting when zapping untradeables.
    0.8 Fix typo preventing confirmautozap from working properly
    0.9 Fix error that would request multiple zaps even if blowupwand was false. New zapwizard() function for easier importing.


    Finally, thank you to Bale - I stole/learnt a lot from your awesome scripts
    Attached Files
    Last edited by darkcodelagsniper; 03-20-2013 at 09:07 PM.

  2. #2
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,263

    Default

    Finally, thank you to Bale - I stole/learnt a lot from your awesome scripts
    Originally Posted by darkcodelagsniper View Post
    You're very welcome. Take a look at this:

    PHP Code:
    zapgroups["Meins - Chow"].members[0]=$item[bat wing chow mein];
    zapgroups["Meins - Lo"].members[0]=$item[asparagus lo mein];
    zapgroups["Advanced Cocktailcrafting Base Drinks"].members[0]=$item[margarita];
    zapgroups["Advanced Cocktailcrafting Final Drinks"].members[0]=$item[a little sump'm sump'm];
    zapgroups["Superhuman Cocktailcrafting Base Drinks"].members[0]=$item[caipifruta];
    zapgroups["Superhuman Cocktailcrafting Final Drinks"].members[0]=$item[Divine];
    zapgroups["Letters"].members[0]=$item[heavy D];
    zapgroups["Superhuman Cocktailcrafting Base Drinks"].members[0]=$item[caipifruta];


    foreach 
    g,r in zapgroups
        
    foreach it in get_related(r.members[0], "zap")
            
    r.members[count(r.members)] = it
    That's just a demonstration of a quick way of filling out several zapgroups if you know a single item in the group.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  3. #3

    Default

    Nice one, thanks. I like the multidimensional foreach, I didn't know you could do that. It makes the code a lot more readable.
    I incorporated it into the script, and made a few other changes.

    Notably it now checks Coldfront's market data to ensure that the volume sold of the most expensive group member is over a minimum amount. I'm not 100% sure if this is cool though? I've tried to keep the Coldfront spam to the minimum - the server hit is only performed once for each group, after the other conditions for recommendation have been met.

  4. #4
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,263

    Default

    I incorporated it into the script, and made a few other changes.
    Originally Posted by darkcodelagsniper View Post
    Unfortunately it can no longer be downloaded from the first post.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  5. #5

    Default

    Should be there now. You probably checked while I was making a quick edit, getting the version checking to work properly.

  6. #6
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    D.C. suburbs of Virginia, USA
    Posts
    3,743

    Default

    Very interesting idea. Will check it out.

    Ethically I think you are all right by hitting Coldfront the minimum number of times possible. If that is too much I'm sure we'll find out. In comparison, I have a script that potentially hits JickenWings several thousand times (once per distinct item in a display case) and they were not concerned enough to discuss whether there was a need for a mitigation strategy.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post
    There are 69 players more powerful than you.
    Originally Posted by Statistics Leaderboards

  7. #7

    Default

    Update to 0.2 - the script was saving a junk zlib var that I'd put in for debug purposes and forgot to remove.

    If anyone wants to remove it manually then it's in
    \data\vars_<character name>.txt >> "ZapWiz_dumpresults"

  8. #8

    Default

    Update to 0.3 - the script now saves historical mall volumes in "\data\mallvolumes.txt", and only rechecks Coldfront after 3 days have passed. The recommendation algorithm makes better use of array sorting, which cuts out a few extra hits.

    Also the variables have been made Zlib vars instead of being set directly in the ASH. There's a small explanation about how to change Zlib vars in the first post.

    Also also, the default volume checking value is much stricter now, only recommending relatively high volume items that sell 100 per day or more.

  9. #9
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    D.C. suburbs of Virginia, USA
    Posts
    3,743

    Default

    I am having fun with this. I do note that the recommendation has been the same for several days. Since it makes a lot of price checks, I wonder about a mode where it uses historical prices that are younger than a specified age and only checks prices that are too old.

    More work then you might want to do but you could also compute a recommendation based upon historical prices and then only look up the specific items involved in the recommendation. At that point all you would care about is whether the recommendation can still be executed within the budget and profit parameters. If this mode is supported then if no recommendation is made the user could just run the script again, knowing that some of the historical price data has been updated and so a different result might be possible.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post
    There are 69 players more powerful than you.
    Originally Posted by Statistics Leaderboards

  10. #10
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,434

    Default

    Haha, cool! I already had functionality similar to this in my logout script -- it first checks a priority list (specified per character), then tries to complete outfits, then zaps for highest profit from available items in inventory. Other than zapping for keys during a run, I almost never worry about zapping anymore.

    But you've added whole new layers of tweakability to this than are dreamt of in my philosophy. Very cool, congrats!

    Also my name has no 'u'.
    Sig by JakAtk
    My scripts: One-Click Wossname | Om******t (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mer********d (?!) | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | CanAdv | Script Registry | Map Manager | About Bats
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

Similar Threads

  1. Best sushi for profit
    By Winterbay in forum Item Handling Scripts
    Replies: 61
    Last Post: 07-26-2015, 01:34 PM
  2. Replies: 6
    Last Post: 10-16-2011, 04:29 PM
  3. 9624: Do not automatically put "" around mall searches
    By RSS Bot in forum Latest SVN Changes
    Replies: 7
    Last Post: 07-12-2011, 07:02 PM
  4. Someone trying to profit from my work
    By dj_d in forum Scripting Discussion
    Replies: 31
    Last Post: 12-30-2009, 09:25 AM
  5. number of zaps
    By ki77bot in forum Scripting Discussion
    Replies: 11
    Last Post: 06-04-2009, 04:53 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
  •