Save items from pvp theft

I'm not sure why you want to base this off a white list instead of price.

In most cases you're right, but several times I've lost an item with a low autosell price but a higher value for myself, like many of the time twitching event items (e.g. New Zealand iced tea), improved cocktail ingredients (e.g. kumquat, boxed champagne) and high quality potions (e.g. Connery's Elixir of Audacity). So I ended up with a more and more growing blacklist until the point I decided a whitelist would work much better for me because of less items to be cared about and no need to append some items to a list every now and then. It's not about which approach is better, the blacklist and price limit solution simply did not work for me as good as a whitelist.

@Veracity: Thanks to the KoL Mafia scripting I'm not angry anymore about being stolen. IMHO it's a flaw in the general - and general positive - KoL's concept to lose items to other players, and players cannot be blamed for using an official game mechanism, but that's another discussion.
 
I have no problem with the concept of stealing for items. However, unlike every single other aspect of PVP that has a negative effect on other players (fame or stats), there is no downside for stealing items. Stats are always in play, but if you want extra fame? Go for it - but if you lose, you lose extra fame. You want flowers? They don't don't count, since KoL fabricates one out of the air for the winner; the loser actually doesn't lose anything when the winner picks a flowers. But items actually come from the inventory of the loser.

I have proposed on G_D - and been mocked and ridiculed and bullied by the usual suspects for doing so - that if you steal for items and lose, the loser should get one of the attacker's items. Without that, the contest is unbalanced, the attacker having literally no downside to doing so, compared to the player who is attacked. Do that, and, like every single other kind of PvP that actually harms the loser, there is a risk for the attacker. And if the attacker intentionally chooses the risk-free mode, then, in my eyes, they have proved that they are unmanly. Steal my junk items? Go ahead, weakling. *snicker*

There will obviously be no official response from TPTB. Therefore, the only thing I can do is shug - and "grief" those who steal from me, in return, by baleeting them and no longer giving them KoLmafia Customer Support.

Gives me a little tingle to do so. ;)
 
Oh, I definitely found my inner club in Secret Society Wars. PVP - in the single player vs. single player sense - was not optional in that game - and I did very well in that game. I even bought a custom blaster. But when I found a way to club an entire FACTION single-handedly, people freaked out, and I ended up being throughly hated by quite a few people. Funny - making faction-to-faction deals with deceit in your heart, following up with inevitable betrayal, was fine, but being completely open about ones intent and taking over the leadership of other factions by simply out-diamonding them, essentially, wasn't fair.

I'm not really a nice person.
 
I'm not really a nice person.
And rules don't care as long as you follow them. What's that? Kicked a puppy? Is that allowed? Yes? Game says enjoy and offers Boots of Kicking +2.

A lot of games I've studied where you have the choice to work with or against others almost always favors those who play against. It's always greater risk vs. reward, but only if others work together, which they generally don't.
 
I agree w/ Veracity. I'm not nice enough to explain. I just baleet.

Meanwhile, and importantly in the "stealing my stuff" -- this script won't load properly. I started editing the little problems out, until I realized there was at least one on every line - and some I don't know how to fix. Could this be b/c of the change to closet-Hagnk's mechanism?

Yes, I realize that b/c of this lovely function, I really only need to figure out how to work with everything I want in the closet once, then it will go back, so perhaps Bale's script to the rescue, or I do it by hand.
 
I agree w/ Veracity. I'm not nice enough to explain. I just baleet.

Meanwhile, and importantly in the "stealing my stuff" -- this script won't load properly. I started editing the little problems out, until I realized there was at least one on every line - and some I don't know how to fix. Could this be b/c of the change to closet-Hagnk's mechanism?

Yes, I realize that b/c of this lovely function, I really only need to figure out how to work with everything I want in the closet once, then it will go back, so perhaps Bale's script to the rescue, or I do it by hand.

Looking at my first post, I would not expect any of it to fail in current mafia versions, and I wouldn't expect errors from other scripts in this thread either (though I haven't checked all of them closely). You'll have to provide more details.
 
I hate to necro a thread, but does anyone know if there's a way to 'reverse' the script? Like instead of searching through your inventory and closeting everything over a certain value, it can search through your closet and take out everything over a certain value?

I just hate having to go through my closet every two seconds while I'm actively playing.
 
replace "autosell_price(it) > 0" with "is_discardable(it)"
Thanks. This worked, I then went ahead and made some changes of my own (beyond integrating the fix above):

1. verbosity now has levels. 0 = don't print individual items; 1 = print closeted items; 2 = also too cheap to closet; 3 = also unstealable.
2. instead of popup you set run/simulate in config
3. if verbosity is on 1 or higher, it will show you the mall item price of the pvp stealable items.
4. remove pluralization in verbose so you can copy paste it into searchbar without need to start futzing with it.

Code:
//history.
//v1 by lostcalpolydude, initial functionality
//v2 by mstieler, multiclosetting no longer a thing
//v3 by nworbetan, fancied up
//v4 by Veracity, fixed script not working anymore
//v5 by taltamir, verbosity now has levels, instead of popup you set run/simulate in config, list item mall price if set to verbose, remove pluralization in verbose so you can copy paste it into searchbar without need to start futzing with it.
//v6 by Thok, missing comment caught

//CONFIG START - set your options below


int minimum_value = 5000; // Closet everything stealable worth more than this; 0 = closet everything stealable.
int verbose = 1; //0 = don't print individual items; 1 = print closeted items; 2 = also too cheap to closet; 3 = also unstealable.
boolean go = true; //false to simulate, true to run script.


//CONFIG ENDS


void main()
{
    if (minimum_value < 0) abort ("A minimum_value less than zero makes no sense at all.");
    int count_cheap, count_closet, count_total, count_unstealable;
    int [item] inv = get_inventory();
    boolean [item] pvp_unimportant = $items[tenderizing hammer, dramatic range, Queue Du Coq cocktailcrafting kit];
    boolean is_stealable(item it) { return is_tradeable(it) && is_discardable(it); }
    foreach it, qty in inv {
        int price = -1;
        if (is_stealable(it) && !(pvp_unimportant contains it)) price = historical_price(it);
        if (price < 0) 
        {
            count_unstealable += 1;
            if (verbose>=3) print_html("<span color=\"green\">Unstealable: " + qty + " " + it + "</span>");
        }
        else if (price < minimum_value) 
        {
            count_cheap += 1;
            if (verbose>=2) print_html("<span color=\"red\">Don't closet " + qty + " " + it + " @ " + historical_price(it) + " each in the mall.</span>");
        }
        else if (price >= minimum_value) 
        {
            count_closet += 1;
            if (verbose>=1) print_html("<span color=\"teal\">" + (go ? "Closet " : "Simulate closet ") + qty + " " + it + " @ " + historical_price(it) + " each in the mall.</span>");


            if (go) put_closet(qty, it);
        }
        
    }
    count_total = count_closet + count_cheap + count_unstealable;
    print(""); //linebreak
    if (count_closet > 0) print("+ " + count_closet + (go ? "" : " woulda been") + " closeted", "teal");
    if (count_cheap > 0) print("+ " + count_cheap + " worth less than " + minimum_value + " meat", "red");
    if (count_unstealable > 0) print("+ " + count_unstealable + " unstealable", "green");
    if (count_total > 0) print(" = " +  count_total + " of " + count(inv) + " items accounted for.");
    print_html("<b>Done! <a href=\"http://kolmafia.us/showthread.php?10059\">discussion thread link</a></b>");
}
 
Last edited:
Slight bug there. Needs a comment character, like so:

Code:
int verbose = 1; // 0 = don't print individual items; 1 = print closeted items; 2 = also too cheap to closet; 3 = also unstealable.
 
Slight bug there. Needs a comment character, like so:

Code:
int verbose = 1; // 0 = don't print individual items; 1 = print closeted items; 2 = also too cheap to closet; 3 = also unstealable.
thanks. I accidentally deleted the // symbol when I rephrased that comment for clarity
 
Last edited:
Back
Top