Meat Pasting

Does anyone know the correct format for the meat pasting url via inventory?  I have been trying all sorts of
Code:
returnText = visit_url("combine.php?item1=118&item2=119");

I understand that I could use create sprocket assembly, but I like doing it this way as it assures that it will work (no offense to any developers) everytime. It's just part of my crazy ash style.
 
make meat paste:
Code:
combine.php?action=makepaste&quantity=1
combine item:
Code:
combine.php?action=combine&pwd&item1=430&item2=404&quantity=1&combine=Combine
For future reference: this info was obtained using the mini browser in kolmafia.
I attempted (Knowing of imminent failure) to combine an acid-squirting flower with an acoustic guitarrr. That gave me the url, and the rest can be figured out with basic knowledge of urls and form submission.
 
Cool, thanks so much. I was trying to use the relay browser to figure it out and I didn't even think about the minibrowser. I was getting ready to set up a packet sniffer. You saved me a lot of effort and I really appreciate that.
 
[quote author=senseihitokiri link=topic=485.msg2371#msg2371 date=1159926973]
I was getting ready to set up a packet sniffer. You saved me a lot of effort and I really appreciate that.
[/quote]

Umm that's like using a train engine to pull a single empty semi trailer. Overkill!

The following instructions would lead to the url:

open the combine items page.

in firefox right click a blank area of the frame you want to view the source code in, and select "this frame" Then "view frame source"
in IE right click the frame you want to view, and select "view source".

find "form name"
Code:
form name=combine action=combine.php
That tells you that you are looking at combine.php
forms always have a ? following the base web address.
combine.php?
next you will see:
Code:
input type=hidden name=action value="combine"
so now we have combine.php?action=combine
to seperate any following fields after the first is an & character
next:
Code:
input type=hidden name=pwd value="modified for security"
for kolmafia script purposes only we just use "pwd"
combine.php?action=combine&pwd
next:
Code:
<center>Combine<br><select name=item1><option value=0>-select an item-</option>
so now we have:
combine.php?action=combine&pwd&item1=###
### denotes a variable number based on user selection
now we need to search for the next occurance of "</select>" using the search function of our text viewing software.
and we see immediately after that:
Code:
<select name=item2><option value=0>-select an item-</option>
now we have:
combine.php?action=combine&pwd&item1=###&item2=###
again we need to search for the next occurance of "</select>" using the search function of our text viewing software.
and we see immediately after that:
Code:
<p>Make <input class=text type=text size=5 value=1 name=quantity>
combine.php?action=combine&pwd&item1=###&item2=###&quantity=###
next:
Code:
<input type=checkbox name=makemax>
checkboxes have a possibility of on or off. This part can be omitted for off.
combine.php?action=combine&pwd&item1=###&item2=###&quantity=###&makemax=off
next:
Code:
<input class=button type=submit value="Combine">
combine.php?action=combine&pwd&item1=###&item2=###&quantity=###&makemax=off&combine=Combine

Now we know the full format for the url...We can rule the world!

HaHa anyway, I just wanted to demonstrate how easy it is to read html forms and convert them to url. Holatuwol has to do this often unless he has a program to do it for him.

Oh and I hope I got everything right...if not, I'm sure someone will correct me.
 

Nightmist

Member
[quote author=efilnikufecin link=topic=485.msg2373#msg2373 date=1159931608]
Umm that's like using a train engine to pull a single empty semi trailer. Overkill![/quote]
Uhh if your using firefox... try this:

Right click -> "View Page Info" -> "Forms" tab... Tahdah!

In more depth:
Finding the page name:
Note the "Form Action" Heading on your top left... yeah it's the page the request is being sent to, in this case: "http://www4.kingdomofloathing.com/combine.php" for me currently. So thats "combine.php".

Post Data:
Well when we click on that "combine" line on the top, in the bottom area we get a list of "something"... That would be the things to put into our little url. "Field Name" and "Current Value" headings means "Field Name=Current Value" in the url to write.

So basically we have this: "combine.phpFieldName=CurrentValue"

Oh yeah don't forget to add a "?" after the link.
So: "combine.php?FieldName=CurrentValue"

And when we have multiple values stick a "&" between them.
So: "combine.php?FieldName1=CurrentValue1&FieldName2=CurrentValue2"

Of course this doesn't really tell you what each "Field Name" does but you should be able to figure that out yourself. (If you can't then play around with it but just in case, put your rares and meat into a closet first =P)

PS. You will notice a line in there that doesn't have a item under the "Field Name" heading, it will be the last item in that list. It's just pointless and you can leave that out of your URL.


And that concludes the mass of confusing text that was supposed to be a guide to using "Page Info in firefox".


Edit: Oh yeah I never explained the list with "Type" heading.
hidden = ... Wow ok is there even a need for this part of the guide...
select-one = Heres your drop down box... because you like select one from the list...
text = Uh a text box thing...
checkbox = ... Seriously is there a need for this guide...
submit = Name shown on the button you click for posting the data.
 
Got a better way in IE? I mean every computer that runs microsoft windows 98 through xp have internet explorer on them. I'm all ears. :)
 

holatuwol

Developer
It involves ActiveX.  Are you sure you want to continue this discussion?

That said, while I don't really take offense that someone's manually crafting URLs so that they bypass all of KoLmafia's internal checking, might I recommend using KoL CLI instead if that's all you're planning on doing?  I mean, having high level functions is the whole point of mafia, and if you're just going straight back to micro-managing, KoL CLI would suit your tastes a lot better.
 
Top