Duckey Yoda
Member
Will BuyCrap buy it if you already have it?
It uses acquire, so no, it won't purchase stuff you already own. In fact, it probably won't buy insanely expensive stuff (subject to Mafia's cost threshold) even if you don't own it.Will BuyCrap buy it if you already have it?
main(string filename) {
int [item] mycrap
file_to_map(filename+".txt", mycrap);
foreach it in mycrap
if(item_amount(it) < mycrap[it])
print(it+": Have only "+item_amount(it)+" of "+mycrap[it], "red");
print("All other items are good!", "green");
}
buy(mycrap[it] - item_amount(it),it);
main(string filename) {
int [item] mycrap
file_to_map(filename+".txt", mycrap);
foreach it in mycrap {
if(item_amount(it) < mycrap[it])
buy(mycrap[it] - item_amount(it),it);
print(it+": Have only "+item_amount(it)+" of "+mycrap[it], "red");
}
print("All other items are good!", "green");
}
#Priority - item name - number to pull (may be zero) - if not pulled by this level, never pull. dayone = pull
before starting the first day. never = do not auto-pull.
1 rock and roll legend 1 dayone
1 Spooky Putty Mitre 1 dayone
1 jewel-eyed wizard hat 0 dayone
1 Haiku Katana 0 dayone
1 ice sickle 0 dayone
1 Bag o' Tricks 0 dayone
1 pilgrim shield 0 dayone
1 Travoltan Trousers 0 dayone
1 V for Vivala mask 0 dayone
1 navel ring of navel gazing 0 dayone
1 moveable feast 1 dayone
1 C.A.R.N.I.V.O.R.E. button 1
1 stainless steel scarf 1
1 Mr. Accessory Jr. 0
1 Mr. Accessory 1
1 quadroculars 1 never
1 aquaviolet jub-jub bird 1 never
1 clockwork pirate skull 1 dayone
1 facsimile dictionary 1 dayone
1 dope wheels 1 dayone
1 chef-in-the-box 1 dayone
1 bartender-in-the-box 1 dayone
3 Spooky-Gro fertilizer 1
4 filthy knitted dread sack 1 never
4 filthy corduroys 1 never
4 bugbear beanie 1 never
4 bugbear bungguard 1 never
4 Knob Goblin elite helm 1
4 Knob Goblin elite pants 1
4 Knob Goblin elite polearm 1
5 ring of conflict 1
5 monster bait 1
6 sonar-in-a-biscuit 4 4
7 harem veil 1
7 harem pants 1
7 knob goblin perfume 2 4
8 disassembled clover 3
8 7-Foot Dwarven mattock 1 9
8 miner's helmet 1 9
8 miner's pants 1 9
8 asbestos ore 3 never
8 chrome ore 3 never
8 linoleum ore 3 never
8 pool cue 1
8 handful of hand chalk 1
1 dingy planks 1
10 dungeoneer's dungarees 1 9
10 goat cheese 6 9
11 668 scroll 1 9
11 30669 scroll 1 9
11 64067 scroll 1 9
12 big book of pirate insults 1 9
12 swashbuckling pants 1 9
12 stuffed shoulder parrot 1 9
12 hot wing 1 9
12 mullet wig 1 9
12 briefcase 1 9
13 awful poetry journal 1 10
13 furry fur 1 10
13 giant needle 1 10
14 dusty bottle of marsala 1 11
14 dusty bottle of merlot 1 11
14 dusty bottle of muscat 1 11
14 dusty bottle of pinot noir 1 11
14 dusty bottle of port 1 11
14 dusty bottle of zinfandel 1 11
14 wet stew 1 11
14 ketchup hound 1 11
14 stunt nuts 1 11
14 drum machine 1 11
14 tomb ratchet 11 never
15 beer helmet 1 12
15 bejeweled pledge pin 1 12
15 bullet-proof corduroys 1 12
15 distressed denim pants 1 12
15 reinforced beaded headband 1 12
15 round purple sunglasses 1 12
15 Mick's IcyVapoHotness Inhaler 1 12
15 cyclops eyedrops 1 12
15 scroll of ancient forbidden unspeakable evil 1 12
16 adder bladder 1 never
16 Angry Farmer candy 1 never
16 Black No. 2 1 never
16 gremlin juice 1 never
16 Mick's IcyVapoHotness Rub 1 never
16 pygmy pygment 1 never
16 super-spikey hair gel 1 never
16 thin black candle 1 never
16 wussiness potion 1 never
16 handsomeness potion 1 never
16 jabañero-flavored chewing gum 1 never
16 lime-and-chile-flavored chewing gum 1 never
16 marzipan skull 1 never
16 Meleegra™ pills 1 never
16 pickle-flavored chewing gum 1 never
16 tamarind-flavored chewing gum 1 never
17 large box 4 never
17 bubbly potion 2 never
17 cloudy potion 2 never
17 dark potion 2 never
17 effervescent potion 2 never
17 fizzy potion 2 never
17 milky potion 2 never
17 murky potion 2 never
17 smoky potion 2 never
17 swirly potion 2 never
18 barbed-wire fence 1 never
18 baseball 1 never
18 black pepper 1 never
18 bronzed locust 1 never
18 chaos butterfly 1 never
18 disease 1 never
18 fancy bath salts 1 never
18 frigid ninja stars 1 never
18 inkwell 1 never
18 Knob Goblin firecracker 1 never
18 leftovers of indeterminate origin 1 never
18 mariachi G-string 1 never
18 meat vortex 1 never
18 NG 1 never
18 photoprotoneutron torpedo 1 never
18 plot hole 1 never
18 powdered organs 1 never
18 pygmy blowgun 1 never
18 razor-sharp can lid 1 never
18 sonar-in-a-biscuit 1 never
18 spider web 1 never
18 Stick of dynamite 1 never
18 tropical orchid 1 never
19 acoustic guitarrr 1 never
19 bone rattle 1 never
19 star crossbow 1 never
19 star hat 1 never
19 star staff 1 never
19 star sword 1 never
19 white pixel 30 never
19 star 8 never
19 line 8 never
19 star chart 1 never
19 filthy poultice 6
19 Wand of Nagamar 1
0 glass of goat's milk 1 never
0 milk of magnesium 4 never
0 Boris's key lime pie 1 never
0 jarlsberg's key lime pie 1 never
0 sneaky pete's key lime pie 1 never
0 delicious spicy noodles 4 never
0 Knob sausage stir-fry 12 never
0 bat wing stir-fry 12 never
0 rat appendix stir-fry 12 never
0 bat wing chow mein 6 never
0 knob sausage chow mein 6 never
0 rat appendix chow mein 6 never
0 spaghetti with Skullheads 6 never
0 gnocchetti di Nietzsche 6 never
0 fettucini Inconnu 6 never
0 hot hi mein 6 never
0 stinky hi mein 6 never
0 sleazy hi mein 6 never
0 Hell broth 6 never
0 digital key lime pie 4 never
0 star key lime pie 4 never
0 Mon Tiki 20 never
0 gimlet 20 never
0 prussian cathouse 20 never
0 fuzzbump 20 never
0 roll in the hay 20 never
0 perpendicular hula 20 never
0 corpsedriver 4 never
0 corpse on the beach 4 never
0 corpsetini 4 never
0 not-a-pipe 12 never
0 glimmering roc feather 6 never
0 prismatic wad 6 never
The header on the file defines the columns - priority, item name, number to pull, and point at which you should no longer pull.
I figured that one out thx
My problem now is that something on this line:
16 adder bladder 1 never
16 Angry Farmer candy 1 never
16 Black No. 2 1 never
16 gremlin juice 1 never
16 Mick's IcyVapoHotness Rub 1 never
16 pygmy pygment 1 never
16 super-spikey hair gel 1 never
16 thin black candle 1 never
16 wussiness potion 1 never
16 handsomeness potion 1 never
16 jabañero-flavored chewing gum 1 never
16 lime-and-chile-flavored chewing gum 1 never
16 marzipan skull 1 never
16 Meleegra™ pills 1 never
16 pickle-flavored chewing gum 1 never
16 tamarind-flavored chewing gum 1 never
Is misspelled, and I can't figure it out, because when I cut this entire list out it says there are not any misspellings, but I tried cutting sections of this and it still says there are misspellings, I figured it was the meleegra pills, but that's not it...
I know this is a bit of necrosis here, but can anybody please tell me how to change the script so it will buy anything I'm missing from the mall, and not try to create it if I have the ability? I somehow didn't realize it would do that
Thanks for such a fast response. I'll test it out soon.I believe that in BuyCrap.ash, you want to change
cli_execute("acquire "+number+" "+it);
to
cli_execute("buy "+number+" "+it);
I'm not sure why it was a problem though, since you can just buy the ingredients it used.