MrEdge73's Item Handling Script Suite!

slyz

Developer
Mafia can't use the closet at all currently, so anything relying on it is broken for the time being.
 

getfresh

New member
I think it may be good for all NPC store only items to be removed from the script or set to sell/smash/etc... only after NS is killed. The likelihood of store bought items being trash is not very high.

For example, running the script sold my tenderizing hammer.

Although I know I should have checked the settings before I ran it, I just assumed something like that which is used many times in a run for better gear or to make a required item is needed.
 

mredge73

Member
Hmm...
Curious what you were using the hammer for.
You don't have pulverize, meatsmithing, or armorcraftiness. You are not a muscle class and you already built your legendary weapon.
Otherwise it would not have sold it (line 699-700 on HC Inventory Control).
You are more than welcome to remove those lines, but I am curious on what you intend to keep it for.

I didn't see anywhere other NPC items would get dumped, I didn't intend on it to dump them.
If you find anything else that should not be dumped please report it here. I am always looking to improve my clunky item list.
I haven't released a new version in quite a while since there has been no demand and I have been working on other projects, if you see anything that needs improvement please post.
 

shazbot

Member
Out of curiosity, why did you decide to only pulverize if you're a muscle class (or at least appears that way in your script)?
 

mredge73

Member
Because you cannot create wads unless you are a muscle class.
After core it will ship all powders and nuggets to wadbot but I didn't want to do that while in Hardcore mode.

Is their a practical purpose for pulverizing as a moxie or myst class during a HC run?
 

Veracity

Developer
Staff member
You can create wads as ANY class with Pulverize, if you start with powerful enough equipment. In my current run, I'm an AT. Once I hit the Castle, I made twinkly wads, and once I hit the Battlefield, I made prismatic wads.

Only Muscle classes can upgrade nuggets to wads, though.
 

slyz

Developer
Filling your spleen if the item yields wads, and some for some items it is more profitable to autosell the resulting powder, nuggets and wads than to autosell the item itself.
 

mredge73

Member
By design the script will ease up on inventory control at higher levels since meat becomes less of an issue once you hit the castle.
The script currently does not touch any level 12 items (frat/hippy war) at any class. So the user can decide what to do to those without script interruption, personally I sell them for nickles/dimes.
It also does not micromanage all level 10 & 11 items as well as it should.

So to me this sounds like a request to include smashlib.ash to use it to identify items that pulverize into wads and those that pulverize into more profitable powder/nuggets?
I took the easy route and only pulverized when there was a chance to upgrade items into wads (muscle classes).
 

Theraze

Active member
If people want to deal with wadbot and that stuff later, great. But the point Veracity made remains, that regardless of your class, at some point in the ascension you'll probably hit some gear that will pulverize into wads. Let people deal with what they'd like to pulverize themselves, unless they're in muscle class or (if you want to add more complicated support when) can_interact is true.

The main thing is just to not sell the hammer automatically unless selling it is always the best choice, and as was pointed out, in cases of careful inventory management, it's still useful even as a non-muscle class.
 
Last edited:

mredge73

Member
The main thing is just to not sell the hammer automatically unless selling it is always the best choice, and as was pointed out, in cases of careful inventory management, it's still useful even as a non-muscle class.

It does not sell the hammer regardless of class if you do have pulverize.

Code:
//dump hammer
	if (!have_skill($skill[pulverize]) && !have_skill($skill[Super-Advanced Meatsmithing]) && !have_skill($skill[Armorcraftiness]) && !MuscleClass() && IamLegendary())
		Auto_Sell [$item[tenderizing hammer]]=0;

If there are other uses that I don't know of, I can just cut out this little function.
 
Last edited:

Theraze

Active member
:) Well then. That makes sense. As you said, it sold because he didn't have any of the skills that used it, nor the ability to get them...

I suppose there's the 8 no-skill/meat recipes that he could still have used the hammer for, as well as the 15 various components of the 5 outfits that would need them, though most of those are fairly expensive, but the grass guise outfit would still be a possibility for people collecting on a budget since you can save between 1300 (ooh, big money) and 12500 meat per outfit piece by crafting it yourself, based on running cheapest in the gCLI just now.
 

mredge73

Member
I can just get rid of the function if people are actually crafting those items in a HC run.
I liked having it because during a BM run it would sell it right after I got my legendary weapon, granting me precious meat at a low level.
I would otherwise forget that it was lingering in my inventory and waste adventures in the treasury to pay for my expensive MP bill.
 

Theraze

Active member
Maybe sell it if in_bad_moon() and not in a muscle class and you have your legendary weapon, since you won't be able to actually buy any of those things unless you've still got your Crimbo stuff around, and you won't be able to use pulverize or any of those since you're stuck only using what you learn internally? Or just make it a preference inside the script and people can poke-prod-tweak it as they see fit. But if your point is bad moon, may as well put a BM check in there and call it good?
 

slyz

Developer
This discussion prompted me to post a little script I use to decide which items are worth more when pulverized.

It was originally a way to play with philmasterplus' item_search.ash library, but you can probably use the smash_value() function which uses smashlib.ash to evaluate the smashed value of a given item:
PHP:
float smash_value( item it ) {
	int value = 0 ;
	if ( !have_skill($skill[Pulverize]) || !is_smashable(it) )
		return value ;
	float [item] smash_yield = get_smash_yield(it);
	foreach yield in smash_yield
		value = value + autosell_price(yield.to_item()) * smash_yield[yield];
	return value;
}
 

mredge73

Member
I have been meaning to try that script in hopes to cut my item script down in 1/2 (or get rid of it completely) and get more functionality out of it at the same time.
I will use your example to try and figure out how to make it work but I am hesitant to import 3 additional scripts, I am already importing 4 so to run HC inventory control you would need to keep a grand total of 8 scripts up to date.
 
Last edited:

slyz

Developer
The authors of both SmashLib and Item Search seem to have fallen off the grid, unfortunately.

SmashLib could really use an update because of get_related( item, "pulverize" ). You could even say that get_related() removes the need for SmashLib in almost all cases.

Item Search could easily be extended to do a lot of things, if needed.

EDIT: here is the function I posted above using get_related():
PHP:
float smash_value( item it ) { 
    float value = 0 ; 
    int [item] smash_yield = get_related( it, "pulverize"); 
    if ( !have_skill($skill[Pulverize]) || count( smash_yield ) == 0 ) 
        return value ; 
    foreach yield in smash_yield 
        value = value + autosell_price(yield).to_float() * smash_yield[yield] / 1000000.0; 
    return value; 
}
You still need to import smashlib for the is_smashable() function though.

EDIT2: checking count( smash_yield ) is enough to check if something is smashable, so no need to import SmashLib anymore.
 
Last edited:

Winterbay

Active member
There is an updated smashlib that I made in order to take advantage of the proxy-fields and the new powerofallitems that came from the api-thing. I even used get_related, but without minion access I can't make it into the top post :)

It is available here.
 
Top