simple Haunted Pantry Script.

hauntedguy

New member
Hi I'm new. I'm still getting used to the basic interface of this, and I would like a simple script that would just :

1 Run in the the haunted pantry for all my adventures.

2 stop if I'm dead- goto camp, Rest X 3.

3. Go back to haunted pantry.

4. Eat all food I can eat untill full, basicly just "use" all food in inv as well as any magicalness in a can.

5. Repeat.

Thanks for any help on this.
:)
 
1 through 3 are simple.... 4 gets a little complicated with the food... Here is a start that others can work from to help you out.

Code:
void main()
{
   while( my_adventures() > 0)
   {
     if( my_hp() < 1)
     {
        cli_execute( "rest");
        cli_execute( "rest");
        cli_execute( "rest");
     }
     adventure( 1, $location[haunted pantry]);
   }
   if( item_amount( $item[magicalness-in-a-can]) > 0)
   {
      use( item_amount( $item[magicalness-in-a-can]), $item[magicalness-in-a-can]);
   }
}

Now, if you meant to use the magicalness-in-a-cans as you get them this script is wrong. And I'll see what I can do about the food after work tonight.
 

hauntedguy

New member
thank you very much!
It really did not matter when it was used as long as it gets used, I guess having it send things to a name would be rather complex?
I'm of course looking to have it send "x" name the razor sharp can lids, I can play with this basic script to see how it works. Thank you very much for that fast responce and futher help if any :D

ok , first things first, where do I put the code when I start the ap?

:D
 

macman104

Member
[quote author=hauntedguy link=topic=102.msg385#msg385 date=1145641509]
thank you very much!
It really did not matter when it was used as long as it gets used, I guess having it send things to a name would be rather complex?
I'm of course looking to have it send "x" name the razor sharp can lids, I can play with this basic script to see how it works.[/quote]That's actually pretty easy, include this line of code where ever you want to send,
Code:
cli_execute("send x razor-sharp can lids to person);
Just replace x with whatever number you want, and person with the name of the individual. if you are using the gCLI or CLI, then just type the stuff that's inside the parenthesis. The cli_execute is if you use it in an ASH script.

ok , first things first, where do I put the code when I start the ap?
You'll want to copy and paste the code into a text file, like from notepad or something, then save the file with whatever filename, but add ".ash" at the end, to make it an ASH file. You'll see that whatever folder mafia runs in, there should also be a "scripts" folder in the same folder as mafia, drop your script in there. You'll be able to go to the scripts menu and choose it that way, or type in the file name from the CLI.
 

hauntedguy

New member
thank you, since I do not know the value I will have each time:

}
if( item_amount( $item[razor-sharp can lid]) > 0)
{
cli_execute("send item_amount( $item[razor-sharp can lid]), $item[razor-sharp can lid] to mynamehere);
}
}

will this work?
 

Tirian

Member
No. But I'm pretty sure that "send * razor-sharp can lids to hauntedguy" will work. Even "send * razor to hauntedguy", for that matter. You don't even need the if statement, since it will just send none if you have none.

And, for what it's worth, this is not going to help you get the Defend the Gourd trophy, if that's what you're aiming for.
 
Code:
}
     if( item_amount( $item[razor-sharp can lid]) > 0)
     {
//will only work in version 7.1
           cli_execute("send " + item_amount($item[razor-sharp can lid])  + ", " $item[razor-sharp can lid] + " to mynamehere");
     }
}
or even
Code:
}
     if( item_amount( $item[razor-sharp can lid]) > 0)
     {
           cli_execute("send * razor-sharp can lids to mynamehere");
     }
}

But either way, That is considered multi abuse. Multi abuse can lead to your account on KOL being deleted by the multiczar. It is also not the intended purpose of kolmafia.
 

macman104

Member
well, if you want to send all of your items, yea, just replace the amount with a *, so it would be
Code:
cli_execute("send * razor-sharp can lids to person");
However, know that you can only execute the same send command once per session. If you want to collect them, you can't be sending items to put in your mains display collection, I don't think.
 

hauntedguy

New member
so should I just leave that part out of the script to stay within the rulls of kol and the intentions of the KOLmafia? I dont want to break the rulls. I can always just log in and get the things latter its not hard. :D
 

macman104

Member
[quote author=hauntedguy link=topic=102.msg394#msg394 date=1145652513]
so should I just leave that part out of the script to stay within the rulls of kol and the intentions of the KOLmafia? I dont want to break the rulls. I can always just log in and get the things latter its not hard. :D[/quote]well sending items from one account to another whether or not its with mafia may attract attention, it depends on how big of a show you're making of it. If you are just putting them in a display case, you may not attract much attention, but if you start becoming a huge collector, or if you are selling them off to make a profit, then you may attract attention of the evil eye. Whether or not you use mafia.
 

hauntedguy

New member
-offtopic- my clan regualry shares items with one anther and sends them all to me to redis if and when neaded, will this get me into problems, I offen recive tons of stuff from everyone at once-
-pannics-
I think this script is done, execpt for the food eating deal.
 

Tirian

Member
You should probably look at or post to the official Forums of Loathing to see what people think about collections and multi abuse. It's pretty easy for us to say "Oh, that's no big deal" or "ZOMG h4XX0RZ", but there are people much closer to the source of whether the Multi Czar would care.

Back to scripting... :)

Assuming that you're just living off of what you pick up from the Pantry, you would use all of the proceeds with something like

cli_execute("eat * tomato");
cli_execute("eat * stalk of asparagus");
cli_execute("use * magicalness-in-a-can");

And, for that matter,

cli_execute("autosell * meat paste");

And, if you aren't doing anything with your meat and want to get really fancy, at the end of your adventuring you can add

cli_execute("buy 5 salty dog");
cli_execute("drink * salty dog");

which will give you Boozerbear's cheap booze.
 

hauntedguy

New member
ok this is what I have:

void main()
{
while( my_adventures() > 0)
{
if( my_hp() < 1)
{
cli_execute( "rest");
cli_execute( "rest");
cli_execute( "rest");
}
adventure( 1, $location[haunted pantry]);
}
if( item_amount( $item[magicalness-in-a-can]) > 0)

cli_execute("eat * tomato");
cli_execute("eat * stalk of asparagus");
cli_execute("use * magicalness-in-a-can");
cli_execute("autosell * meat paste");

-I'll just ask my clan guys and girls to send less offen i guess, i was setting this up to send to other people in my clan so i would not have to do it myself, but eh, its no bigie, and yes, I do live in the haunted pantry.
I'm totaly going to just keep all the can lids and put them in desplay and do nothing but adv there. If i do that and never send them to anything else i dont think anyone will really care eh?
 
You need to set up a fullness counter of some sort, or the script will halt when you eat too much.
Yes the haunted pantry can give you to much food in a day.
 

macman104

Member
[quote author=efilnikufecin link=topic=102.msg402#msg402 date=1145654930]
You need to set up a fullness counter of some sort, or the script will halt when you eat too much.
Yes the haunted pantry can give you to much food in a day.
[/quote]Actually, I was just looking at the SVN, which is the most current updated source code, and it looks like holatuwol made it so overeating does not create an error state. But don't bank on it. I'm sure it will be in the next release, unless something with it goes wrong, so yea.
 
[quote author=macman104 link=topic=102.msg405#msg405 date=1145657168]
Actually, I was just looking at the SVN, which is the most current updated source code, and it looks like holatuwol made it so overeating does not create an error state.  But don't bank on it.  I'm sure it will be in the next release, unless something with it goes wrong, so yea.
[/quote]
That wil be a welcomed feature, especially since my icy peak meat farming scripthad to be set up to not eat if you have one drunkness or higher. kolmafia halting in the middle of a script is a major problem for me since I use scripting to babysit other peoples accounts. It can be tedious manually fixing eating and drinking problems especially when the script could just carry on when max fullness is reached.
 
[quote author=hauntedguy link=topic=102.msg400#msg400 date=1145654469]
ok this is what I have:[/quote]

Just as a matter of practice, I'll adjust your script formatting a bit.

Code:
void main()
{
   while( my_adventures() > 0)
   {
     if( my_hp() < 1)
     {
        cli_execute( "rest");
        cli_execute( "rest");
        cli_execute( "rest");
     }
     adventure( 1, $location[haunted pantry]);
   }
   cli_execute("eat * tomato");
   cli_execute("eat * stalk of asparagus");
   cli_execute("use * magicalness-in-a-can");
   cli_execute("autosell * meat paste");
}

Notice that except for removing an unnecessary if statement, I didn't change anything. Just adjusted the format.

[quote author=hauntedguy link=topic=102.msg400#msg400 date=1145654469]
-I'll just ask my clan guys and girls to send less offen i guess, i was setting this up to send to other people in my clan so i would not have to do it myself, but eh, its no bigie, and yes, I do live in the haunted pantry.
I'm totaly going to just keep all the can lids and put them in desplay and do nothing but adv there. If i do that and never send them to anything else i dont think anyone will really care eh?[/quote]

I am not going to get into the discusion of multi abuse or not...

But why not use the clan stash?

And as far as collecting can lids, I would suggest the best way to do it would be to have your "farmer" put them in his store for a reasonable price. Say, within 100 meat of lowest, or higher if you want to be really safe. And then have your collector buy them.

This addresses multi abuse two ways. 1) It sets up a fair exchange between characters with records. And 2) Unless you have both characters logged on at the same time and buy them up immediately - it actually gives other people a chance at buying them.

Of course, I do not know Multi Czars take on this method... So use at your own risk.
 

Tirian

Member
[quote author=Presto Ragu link=topic=102.msg411#msg411 date=1145679409]

And as far as collecting can lids, I would suggest the best way to do it would be to have your "farmer" put them in his store for a reasonable price. Say, within 100 meat of lowest, or higher if you want to be really safe. And then have your collector buy them.
[/quote]

I don't agree. If multi-faming can lids for a main's collection is on Multi Czar's list of things to punish, then suspicious mall store activity is not going to make him any happier. Overpaying for can lids is definitely suspicious, and buying min-priced items from a store that doesn't advertise when there are thousands in stores that do advertise is also suspicious. And Multi Czar doesn't publish the tools that he uses to find out what our multis are, but I think that we can assume that they are nigh-omniscient. :)

I'm not arguing whether this is multi-abuse. I'm just saying that if it is multi abuse then trying to be sneaky about it is not going to work and might just make things worse.

Obligatory script comment: I'm still a little suspicious of resting three times in this script. It's hard to imagine a character who uses this script day after day who couldn't trivially survive the zone even while Beaten Up, especially if you've got obvious equipment like a couple of Sneaky Pete breath sprays equipped. So I'd just rest once and assume that I am now as healthy as I need to be to get back to work.
 

hauntedguy

New member
ok just so everyone knows, the clans stoped the share process in the way we had it set up just for now untill we can find out how to do it in a way that will not seem like we are doing something we should not be doing.
----

Back to the haunted thing-

Ok yeah I don't nead to rest x3 - I only nead to rest once. I've got enough gear on to be able to smash in one attack anything thats in there, I'm also going to have on rings of agu monster, so i lessen the amount of non-monster encounters I have in there, I want to fight the monsters, I want to get what they drop, and thats it.

Now, for the can lids. They are going to go into my desplay case. Thats it.
Thats all thats going to be in my case.

I'm not having the script handle this function as I like to put them in myself.
The only thing I nead the script to do is run the pantry, and I'm glad to say, it does it now wonderfully. I belive its also eating whatever I get as well as using the magiclness in a can. At some point I'll stop adv in the haunted pantry and actualy play more of the game. I'm not sure when maybe when I get like 1000 can lids. Then I can be like "Ok, now I'm cool." And move on :D
lol. Ok I'll never be cool, but thats not the point!

------
Script is done I belive. Thanks all for the help and for making me feel welcomed. I hope that I can read up on how the scripts work and start making my own for you guys and (girls? are they here? can I have there number call me ;) ) thanks.


---

eek edit- it stops the script if you reach fullness. @_@;
 
Top