I need help with coding a few things.

Leperconartist

New member
I'm new to KolMafia, and I've just started scripting things, and I have a few questions.

#1) I don't know why but, when I set buy from NPC's to false it doesn't change anything. Scripts will still make me buy cocktail crafting kits, and E-Z Cook Oven's from the (Market Demon). Note that these items sell in the mall for 500 meat (they sell for 1000 meat at the market demon) I'm using KolMafia-6072.

I'm working on a script that I can just click on and it will change my NPC preference, buy me a cheap E-Z cook oven, and then change my preference back. Unfortunately changing my NPC preference doesn't do anything with E-Z Cook Oven's and Cocktail Crafting Kits. But it seems to work fine with all other items. Does Holatuwol (sorry if I misspelled that) want it to be this way for a reason? If so why?

Void Main(){
Boolean ChangedAuto = False;
//Sees if I am buying from NPC's, if so change it so that I don't.
If ( get_property( "autoSatisfyWithNPCs") == True){
set_property( "autoSatisfyWithNPCs", "False");
ChangedAuto = True;
}
buy( 1, $item[E-Z Cook Oven] );
//If I edited buy from NPC's change it back to the way it was before.
If (ChangedAuto = True) set_property( "autoSatisfyWithNPCs", "True");
}

#2) How do I send meat to a non-buffbot player, or to Itembot?

#3) Can I create an integer that once I run a script a box will pop up and ask me to give it a value, or even just give it a value via the Graphical CLI? If so how?
 
1: Dunno

2: send * meat to efilnikufecin
where * is the amount, * means all and my name is the user you are sending to.
also note:
send * disco ball to efilnikufecin
will send me your disco balls.
Both are cli commands, wrap in a cli_execute command.

3:
Code:
void main(int howmany)
{
eat(howmany, $item[chrome sword]);
}

Chrome swords!!! yummy!
When main has parameters kolmafia will prompt you for a value.
How many Chrome swords can you eat?
 

Leperconartist

New member
Well thanks for the try with number 2, but this is exactly what I typed into the Graphical CLI

[size=10pt]send * meat to efilnikufecin[/size]
[size=10pt]Please use 'csend' if you need to transfer meat.[/size]
[size=10pt]csend * meat to efilnikufecin[/size]
[size=10pt]Sending kmail to efilnikufecin...
Message sent to efilnikufecin[/size]

It appears that a message went out. but if it did it didn't contain any meat. I only did this because I already knew that it didn't work, but sending items does work. As for number 3, thanks a bunch, I owe you all my meat, but I can't figure out how to send it to you ;).
 

Leperconartist

New member
Okay 1 more question and then I'm pretty sure I'll be able to do everything I want to do.

Is there something I can type into the Graphical CLI that will show me all the CLI functions I can use? Sort of like the Ashref thing I just learned about except for the Cli?
 
Top