View Full Version : Assembling the misshapen familiar
itamaram
09-23-2006, 03:13 AM
So seeing how so very awesome that new familiar is, I want to get another one for my DC. But I really want to improve my ascension record, so I don't want to farm there for another 3 days. Only other option is to buy the pieces in the mall. Sigh. searching for 100 different items by hand? I don't think so.
Luckily, all of the dusty bones are concentrated together on the item number range of 1800 to 1899 (both inclusive).
The only question is how to use that to write a script? Do I just write buy($item[1800],1) to search for item number1800 in the mall? For some reason it seems wrong... How DO I do that?
Once I know the right syntax all I need is just nest it inside a for loop. Right?
I am sure many people would find this script mighty useful.
Thanks, Itamar
efilnikufecin
09-23-2006, 03:33 AM
instead of $item[1] use int_to_item(1)
itamaram
09-23-2006, 03:53 AM
instead of $item[1] use int_to_item(1)
so:
buy(int_to_item(1),1) ?
Thanks a lot. Would finish the script in a sec.
EDIT:done. On the other hand, will it work? Or do I need a newer version of KolMafia which supports the new items? I am sure that the create function won't work seeing how the recepie isn't programmed yet, but will a simple purchase work?
exdeath
09-23-2006, 04:16 AM
Unless a daily build came out in the last hour or two then there isn't a version that supports the new items by name, but that int_to_item might work? Try it with a few before you write the whole thing.
efilnikufecin
09-23-2006, 04:18 AM
items 1797-1909 do not appear to be in kolmafia's internal database yet. I'm sure it will not work till they are added.
itamaram
09-23-2006, 04:28 AM
Ah. I was afraid so. Oh well. I was about to wait for the prices to drop anyway.
I am pretty sure all of this stuff would be implemented in a week or so.
EDIT: Ach! I thought I could run the script on the 9.0 build, but apprentally the dusty bones are not all there! Only about every fifth bone was added to the database. Sigh. Guess I am still waiting for the next build.
holatuwol
09-24-2006, 01:44 AM
Actually zero bones were added to the item database.* The ones that you're seeing are the ones that KoLmafia automatically registered based on your inventory.* Knowing this, you can theoretically determine the item IDs for all the ones you're missing by checking against $item[none].
for i from 1800 to 1899
* * if ( int_to_item(i) == $item[none] )
* * * * print( "Have not yet seen item #" + i );
itamaram
09-24-2006, 05:28 AM
Actually zero bones were added to the item database. The ones that you're seeing are the ones that KoLmafia automatically registered based on your inventory. Knowing this, you can theoretically determine the item IDs for all the ones you're missing by checking against $item[none].
for i from 1800 to 1899
if ( int_to_item(i) == $item[none] )
print( "Have not yet seen item #" + i );
I don't get it... what exactly is $item[none] is? And what is the loop suppose to achieve? Also, aren't for loops in ash are of the form for x to a1 upto a2...?
holatuwol
09-24-2006, 05:48 AM
To answer your question, $item[none] is the null item value.* In other words, if int_to_item() determines that the item does not exist, it returns $item[none].* And you may be right about me being wrong about the loop construct ... the accurate loop is:
for x from a1 upto a2
I had the "from" right, but it should be "upto" instead of "to". Adding a simpler "to" which automatically counts up or down based on where the endpoint is relative to the start point has been weighing on my mind for awhile, and it leaked into my thought process here on the forums. :)
itamaram
09-24-2006, 06:41 AM
Fair enough. So I now understand how this thing works, but how can I get KolMafia to get all those item gaps I am missing? How can I introduce temporary items to the database? I now know that having them in the inventory does that, but it kind of beats the purpose on this current script... Will seeing them in a mall store/DC do the same thing? (Using the relay browser that is). If not, what will?
Or as I said before, I can always wait for the next build...
holatuwol
09-24-2006, 07:01 AM
No, doing things in the relay browser will not result in KoLmafia recognizing new items. Sometimes, doing a search using the internal mall interface will do it (but it's not easy, since sometimes KoLmafia refuses to do searches if it thinks no item matches those search parameters). So, for full reliability you'll have to wait until the next build.
itamaram
09-28-2006, 07:51 AM
Just saying seeing how the new items are in the database I can now get as many skeletons as I can. hoorah! eh, I mean muhahahahaha!
pfooti
10-02-2006, 01:46 PM
so:
buy(int_to_item(1),1) ?
Thanks a lot. Would finish the script in a sec.
EDIT:done. On the other hand, will it work? Or do I need a newer version of KolMafia which supports the new items? I am sure that the create function won't work seeing how the recepie isn't programmed yet, but will a simple purchase work?
Hey, itamaram, that script you posted was wrong, and dangerously so.
The buy command goes buy (quantity, item), and the create and use commands are inside the for loop. I was fidding around with getting buy to work (without reading the directions), and I very nearly bought 1800 of item 1. Well, not nearly actually, since buy doesn't take ints as arguments. But anyway, a better script for purchasing the bones looks like:
void main()
{
for i from 1800 upto 1899 {
buy(1,int_to_item(i));
}
}
The paste/use script is fine as an exercise for the reader, since I just wanted to script the purchasing. The assembly, I want to see!
EDIT: Oops, it turns out I DID purchase a number of "1-ball" items when I was messing around with this. Zoiks! Luckily I had the foresight to closet most of my meat before fiddling with looped purchase orders.
EDIT EDIT: Double-oops. It's actually because the 1-ball is item 1900. so the script has been modified from going to 1900 to 1899. Difference in range bound semantics, I suppose. Upto != <.
angeredtsuzuki
05-01-2007, 05:04 AM
Hey, I edited it so after you get all of the bones, it makes the hatchling and puts it into your terrarium
buy 1 Dusty animal cranium
buy 1 Dusty animal jawbone
buy 1 Dusty animal pelvis
buy 1 Dusty eighth caudal vertebra
buy 1 Dusty eighth thoracic vertebra
buy 1 Dusty eleventh thoracic vertebra
buy 1 Dusty fifth caudal vertebra
buy 1 Dusty fifth cervical vertebra
buy 1 Dusty fifth lumbar vertebra
buy 1 Dusty fifth thoracic vertebra
buy 1 Dusty first caudal vertebra
buy 1 Dusty first cervical vertebra
buy 1 Dusty first lumbar vertebra
buy 1 Dusty first thoracic vertebra
buy 1 Dusty fourth caudal vertebra
buy 1 Dusty fourth cervical vertebra
buy 1 Dusty fourth lumbar vertebra
buy 1 Dusty fourth thoracic vertebra
buy 1 Dusty left clavicle
buy 1 Dusty left eighth rib
buy 1 Dusty left eleventh rib
buy 1 Dusty left femur
buy 1 Dusty left fibula
buy 1 Dusty left fifth rib
buy 1 Dusty left first front claw
buy 1 Dusty left first rear claw
buy 1 Dusty left first rib
buy 1 Dusty left fourth front claw
buy 1 Dusty left fourth rear claw
buy 1 Dusty left fourth rib
buy 1 Dusty left humerus
buy 1 Dusty left kneecap
buy 1 Dusty left ninth rib
buy 1 Dusty left radius
buy 1 Dusty left scapula
buy 1 Dusty left second front claw
buy 1 Dusty left second rear claw
buy 1 Dusty left second rib
buy 1 Dusty left seventh rib
buy 1 Dusty left sixth rib
buy 1 Dusty left tenth rib
buy 1 Dusty left third front claw
buy 1 Dusty left third rear claw
buy 1 Dusty left third rib
buy 1 Dusty left thumb
buy 1 Dusty left tibia
buy 1 Dusty left twelfth rib
buy 1 Dusty left ulna
buy 1 Dusty ninth caudal vertebra
buy 1 Dusty ninth thoracic vertebra
buy 1 Dusty right clavicle
buy 1 Dusty right eighth rib
buy 1 Dusty right eleventh rib
buy 1 Dusty right femur
buy 1 Dusty right fibula
buy 1 Dusty right fifth rib
buy 1 Dusty right first front claw
buy 1 Dusty right first rear claw
buy 1 Dusty right first rib
buy 1 Dusty right fourth front claw
buy 1 Dusty right fourth rear claw
buy 1 Dusty right fourth rib
buy 1 Dusty right humerus
buy 1 Dusty right kneecap
buy 1 Dusty right ninth rib
buy 1 Dusty right radius
buy 1 Dusty right scapula
buy 1 Dusty right second front claw
buy 1 Dusty right second rear claw
buy 1 Dusty right second rib
buy 1 Dusty right seventh rib
buy 1 Dusty right sixth rib
buy 1 Dusty right tenth rib
buy 1 Dusty right third front claw
buy 1 Dusty right third rear claw
buy 1 Dusty right third rib
buy 1 Dusty right thumb
buy 1 Dusty right tibia
buy 1 Dusty right twelfth rib
buy 1 Dusty right ulna
buy 1 Dusty sacral vertebrae
buy 1 Dusty second caudal vertebra
buy 1 Dusty second cervical vertebra
buy 1 Dusty second lumbar vertebra
buy 1 Dusty second thoracic vertebra
buy 1 Dusty seventh caudal vertebra
buy 1 Dusty seventh cervical vertebra
buy 1 Dusty seventh lumbar vertebra
buy 1 Dusty seventh thoracic vertebra
buy 1 Dusty sixth caudal vertebra
buy 1 Dusty sixth cervical vertebra
buy 1 Dusty sixth lumbar vertebra
buy 1 Dusty sixth thoracic vertebra
buy 1 Dusty tenth caudal vertebra
buy 1 Dusty tenth thoracic vertebra
buy 1 Dusty third caudal vertebra
buy 1 Dusty third cervical vertebra
buy 1 Dusty third lumbar vertebra
buy 1 Dusty third thoracic vertebra
buy 1 Dusty twelfth thoracic vertebra
make 1 Dusty animal skull
use 1 Dusty animal skull
use 1 Misshapen animal skeleton
IvanIvanovich
09-14-2007, 10:57 PM
I know this is a bit old but this was the easiest script I found for this so I thought I'd add my improvement in case someone else stumbles upon this topic like I did.
Using angeredtusuki's CLI script, I added a command to use any piles of dusty animal bones you may have first then I changed the buy commands to acquire instead since this will pull from your inventory, clan stash and I think your closet first before buying the missing bones from the mall.
Here's the edited CLI script:
use * pile of dusty animal bones
acquire 1 Dusty animal cranium
acquire 1 Dusty animal jawbone
acquire 1 Dusty animal pelvis
acquire 1 Dusty eighth caudal vertebra
acquire 1 Dusty eighth thoracic vertebra
acquire 1 Dusty eleventh thoracic vertebra
acquire 1 Dusty fifth caudal vertebra
acquire 1 Dusty fifth cervical vertebra
acquire 1 Dusty fifth lumbar vertebra
acquire 1 Dusty fifth thoracic vertebra
acquire 1 Dusty first caudal vertebra
acquire 1 Dusty first cervical vertebra
acquire 1 Dusty first lumbar vertebra
acquire 1 Dusty first thoracic vertebra
acquire 1 Dusty fourth caudal vertebra
acquire 1 Dusty fourth cervical vertebra
acquire 1 Dusty fourth lumbar vertebra
acquire 1 Dusty fourth thoracic vertebra
acquire 1 Dusty left clavicle
acquire 1 Dusty left eighth rib
acquire 1 Dusty left eleventh rib
acquire 1 Dusty left femur
acquire 1 Dusty left fibula
acquire 1 Dusty left fifth rib
acquire 1 Dusty left first front claw
acquire 1 Dusty left first rear claw
acquire 1 Dusty left first rib
acquire 1 Dusty left fourth front claw
acquire 1 Dusty left fourth rear claw
acquire 1 Dusty left fourth rib
acquire 1 Dusty left humerus
acquire 1 Dusty left kneecap
acquire 1 Dusty left ninth rib
acquire 1 Dusty left radius
acquire 1 Dusty left scapula
acquire 1 Dusty left second front claw
acquire 1 Dusty left second rear claw
acquire 1 Dusty left second rib
acquire 1 Dusty left seventh rib
acquire 1 Dusty left sixth rib
acquire 1 Dusty left tenth rib
acquire 1 Dusty left third front claw
acquire 1 Dusty left third rear claw
acquire 1 Dusty left third rib
acquire 1 Dusty left thumb
acquire 1 Dusty left tibia
acquire 1 Dusty left twelfth rib
acquire 1 Dusty left ulna
acquire 1 Dusty ninth caudal vertebra
acquire 1 Dusty ninth thoracic vertebra
acquire 1 Dusty right clavicle
acquire 1 Dusty right eighth rib
acquire 1 Dusty right eleventh rib
acquire 1 Dusty right femur
acquire 1 Dusty right fibula
acquire 1 Dusty right fifth rib
acquire 1 Dusty right first front claw
acquire 1 Dusty right first rear claw
acquire 1 Dusty right first rib
acquire 1 Dusty right fourth front claw
acquire 1 Dusty right fourth rear claw
acquire 1 Dusty right fourth rib
acquire 1 Dusty right humerus
acquire 1 Dusty right kneecap
acquire 1 Dusty right ninth rib
acquire 1 Dusty right radius
acquire 1 Dusty right scapula
acquire 1 Dusty right second front claw
acquire 1 Dusty right second rear claw
acquire 1 Dusty right second rib
acquire 1 Dusty right seventh rib
acquire 1 Dusty right sixth rib
acquire 1 Dusty right tenth rib
acquire 1 Dusty right third front claw
acquire 1 Dusty right third rear claw
acquire 1 Dusty right third rib
acquire 1 Dusty right thumb
acquire 1 Dusty right tibia
acquire 1 Dusty right twelfth rib
acquire 1 Dusty right ulna
acquire 1 Dusty sacral vertebrae
acquire 1 Dusty second caudal vertebra
acquire 1 Dusty second cervical vertebra
acquire 1 Dusty second lumbar vertebra
acquire 1 Dusty second thoracic vertebra
acquire 1 Dusty seventh caudal vertebra
acquire 1 Dusty seventh cervical vertebra
acquire 1 Dusty seventh lumbar vertebra
acquire 1 Dusty seventh thoracic vertebra
acquire 1 Dusty sixth caudal vertebra
acquire 1 Dusty sixth cervical vertebra
acquire 1 Dusty sixth lumbar vertebra
acquire 1 Dusty sixth thoracic vertebra
acquire 1 Dusty tenth caudal vertebra
acquire 1 Dusty tenth thoracic vertebra
acquire 1 Dusty third caudal vertebra
acquire 1 Dusty third cervical vertebra
acquire 1 Dusty third lumbar vertebra
acquire 1 Dusty third thoracic vertebra
acquire 1 Dusty twelfth thoracic vertebra
make 1 Dusty animal skull
use 1 Dusty animal skull
use 1 Misshapen animal skeleton
This way you don't buy duplicates of bones you may already have.
Other than that angeredtusuki's script was spot-on with the item names and worked great once I just did a search-and-replace to change buy to acquire.
FYI, I was using KoLMafia 11.6 when I last used this. YMMV
Ruffielal
10-10-2007, 03:59 PM
Erm, first post. Hello all.
I have just been messing around with the above code and just to test it out I converted it to an .ash script (I'm sure there are easier 'for loop' ones around but I feel safer seeing the correct names in there in case Jick or someone moves items around.)
#use any unused piles of animal bones before you go off to buy stuff
use (item_amount($item[pile of dusty animal bones]),$item[pile of dusty animal bones] );
#then check inv,storage, clan stash etc for item before buying it from the mall
retrieve_item (1, , $item [Dusty animal cranium]);
retrieve_item (1 , $item [Dusty animal jawbone]);
retrieve_item (1 , $item [Dusty animal pelvis ]);
retrieve_item (1 , $item [Dusty eighth caudal vertebra ]);
retrieve_item (1 , $item [Dusty eighth thoracic vertebra ]);
retrieve_item (1 , $item [Dusty eleventh thoracic vertebra ]);
retrieve_item (1 , $item [Dusty fifth caudal vertebra ]);
retrieve_item (1 , $item [Dusty fifth cervical vertebra ]);
retrieve_item (1 , $item [Dusty fifth lumbar vertebra ]);
retrieve_item (1 , $item [Dusty fifth thoracic vertebra ]);
retrieve_item (1 , $item [Dusty first caudal vertebra ]);
retrieve_item (1 , $item [Dusty first cervical vertebra ]);
retrieve_item (1 , $item [Dusty first lumbar vertebra ]);
retrieve_item (1 , $item [Dusty first thoracic vertebra ]);
retrieve_item (1 , $item [Dusty fourth caudal vertebra ]);
retrieve_item (1 , $item [Dusty fourth cervical vertebra ]);
retrieve_item (1 , $item [Dusty fourth lumbar vertebra]);
retrieve_item (1 , $item [Dusty fourth thoracic vertebra ]);
retrieve_item (1 , $item [Dusty left clavicle ]);
retrieve_item (1 , $item [Dusty left eighth rib ]);
retrieve_item (1 , $item [Dusty left eleventh rib ]);
retrieve_item (1 , $item [Dusty left femur ]);
retrieve_item (1 , $item [Dusty left fibula ]);
retrieve_item (1 , $item [Dusty left fifth rib ]);
retrieve_item (1 , $item [Dusty left first front claw ]);
retrieve_item (1 , $item [Dusty left first rear claw ]);
retrieve_item (1 , $item [Dusty left first rib ]);
retrieve_item (1 , $item [Dusty left fourth front claw]);
retrieve_item (1 , $item [Dusty left fourth rear claw ]);
retrieve_item (1 , $item [Dusty left fourth rib ]);
retrieve_item (1 , $item [Dusty left humerus ]);
retrieve_item (1 , $item [Dusty left kneecap ]);
retrieve_item (1 , $item [Dusty left ninth rib ]);
retrieve_item (1 , $item [Dusty left radius ]);
retrieve_item (1 , $item [Dusty left scapula ]);
retrieve_item (1 , $item [Dusty left second front claw]);
retrieve_item (1 , $item [Dusty left second rear claw ]);
retrieve_item (1 , $item [Dusty left second rib ]);
retrieve_item (1 , $item [Dusty left seventh rib ]);
retrieve_item (1 , $item [Dusty left sixth rib ]);
retrieve_item (1 , $item [Dusty left tenth rib ]);
retrieve_item (1 , $item [Dusty left third front claw ]);
retrieve_item (1 , $item [Dusty left third rear claw ]);
retrieve_item (1 , $item [Dusty left third rib ]);
retrieve_item (1 , $item [Dusty left thumb ]);
retrieve_item (1 , $item [Dusty left tibia ]);
retrieve_item (1 , $item [Dusty left twelfth rib ]);
retrieve_item (1 , $item [Dusty left ulna ]);
retrieve_item (1 , $item [Dusty ninth caudal vertebra ]);
retrieve_item (1 , $item [Dusty ninth thoracic vertebra ]);
retrieve_item (1 , $item [Dusty right clavicle ]);
retrieve_item (1 , $item [Dusty right eighth rib ]);
retrieve_item (1 , $item [Dusty right eleventh rib ]);
retrieve_item (1 , $item [Dusty right femur ]);
retrieve_item (1 , $item [Dusty right fibula ]);
retrieve_item (1 , $item [Dusty right fifth rib ]);
retrieve_item (1 , $item [Dusty right first front claw ]);
retrieve_item (1 , $item [Dusty right first rear claw ]);
retrieve_item (1 , $item [Dusty right first rib ]);
retrieve_item (1 , $item [Dusty right fourth front claw ]);
retrieve_item (1 , $item [Dusty right fourth rear claw ]);
retrieve_item (1 , $item [Dusty right fourth rib ]);
retrieve_item (1 , $item [Dusty right humerus ]);
retrieve_item (1 , $item [Dusty right kneecap ]);
retrieve_item (1 , $item [Dusty right ninth rib ]);
retrieve_item (1 , $item [Dusty right radius ]);
retrieve_item (1 , $item [Dusty right scapula ]);
retrieve_item (1 , $item [Dusty right second front claw ]);
retrieve_item (1 , $item [Dusty right second rear claw ]);
retrieve_item (1 , $item [Dusty right second rib ]);
retrieve_item (1 , $item [Dusty right seventh rib ]);
retrieve_item (1 , $item [Dusty right sixth rib ]);
retrieve_item (1 , $item [Dusty right tenth rib ]);
retrieve_item (1 , $item [Dusty right third front claw ]);
retrieve_item (1 , $item [Dusty right third rear claw ]);
retrieve_item (1 , $item [Dusty right third rib ]);
retrieve_item (1 , $item [Dusty right thumb ]);
retrieve_item (1 , $item [Dusty right tibia ]);
retrieve_item (1 , $item [Dusty right twelfth rib ]);
retrieve_item (1 , $item [Dusty right ulna ]);
retrieve_item (1 , $item [Dusty sacral vertebrae ]);
retrieve_item (1 , $item [Dusty second caudal vertebra ]);
retrieve_item (1 , $item [Dusty second cervical vertebra ]);
retrieve_item (1 , $item [Dusty second lumbar vertebra ]);
retrieve_item (1 , $item [Dusty second thoracic vertebra ]);
retrieve_item (1 , $item [Dusty seventh caudal vertebra ]);
retrieve_item (1 , $item [Dusty seventh cervical vertebra ]);
retrieve_item (1 , $item [Dusty seventh lumbar vertebra ]);
retrieve_item (1 , $item [Dusty seventh thoracic vertebra ]);
retrieve_item (1 , $item [Dusty sixth caudal vertebra ]);
retrieve_item (1 , $item [Dusty sixth cervical vertebra ]);
retrieve_item (1 , $item [Dusty sixth lumbar vertebra ]);
retrieve_item (1 , $item [Dusty sixth thoracic vertebra ]);
retrieve_item (1 , $item [Dusty tenth caudal vertebra ]);
retrieve_item (1 , $item [Dusty tenth thoracic vertebra ]);
retrieve_item (1 , $item [Dusty third caudal vertebra ]);
retrieve_item (1 , $item [Dusty third cervical vertebra ]);
retrieve_item (1 , $item [Dusty third lumbar vertebra ]);
retrieve_item (1 , $item [Dusty third thoracic vertebra ]);
retrieve_item (1 , $item [Dusty twelfth thoracic vertebra ]);
#combines the correct 2 bones to make the skull then uses it to create the hatchling.
# then use the hatchling to put the new animal in your terranium
retrieve_item (1 , $item [Dusty animal skull]);
use (1 , $item [Dusty animal skull]);
use (1 ,$item[Misshapen animal skeleton]);
Again, i hope it helps somebody. I had fun messing with it :)
#edit# Oh and the whole thing cost me around 35,000 meat.
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.