Crimbo 2010

mredge73

Member
For : 5
Against : 3
Undecided : 3

Disclaimer:
A Mafia is not a democracy, the devs can make this thread disappear whenever they want.
 

twilightsun

New member
I, for one, suck at scripting. I would love to be able to automate Crimbo. Instead of sitting and manually clicking for an hour, I'd be done in minutes. That's better for the kingdom as a whole, getting people on and off faster, right? Alas, I can't get either of the scripts posted here to work for me. I hope Jick tells Veracity to go for it. My husband and son would prefer me not to be glued to my laptop clicking all night long. (I've already done it for quite some time today.) XD
 

bumcheekcity

Active member
Code:
ash while (my_adventures() > 0) { visit_url("adventure.php?snarfblat=247"); run_combat(); }

Paste in the CLI. Laziest way of doing it.

Also, it's worth noting that Eleron's kolproxy scripts Crimbo.
 
Last edited:

twilightsun

New member
Have I told you lately that I love you?

I laughed heartily at all the new content this morning. I even IMed the combat text to my husband so he could chuckle at it from the office. But now? I just want my scrip. :)
 
Last edited:

EdFox

Member
I, for one, suck at scripting. I would love to be able to automate Crimbo. Instead of sitting and manually clicking for an hour, I'd be done in minutes. That's better for the kingdom as a whole, getting people on and off faster, right? Alas, I can't get either of the scripts posted here to work for me. I hope Jick tells Veracity to go for it. My husband and son would prefer me not to be glued to my laptop clicking all night long. (I've already done it for quite some time today.) XD

I also suck, but I do know enough to get the two scripts posted to work. Change the very first line to this:

void main(){

I really hope I'm not stepping on any toes here and that wasn't supposed to be obscured.
 

Theraze

Active member
Yeah... as it stood, they posted it as it would be used as part of another script file. You'd import that file, then run the function.

But if you save it to its own file? rename function to main and it should run again.
 

Veracity

Developer
Staff member
Also, it's worth noting that Eleron's kolproxy scripts Crimbo.
This is, actually, worth noting.

Eleron was in my clan today, chatting. Somebody had already come up with and was distributing the adventures.txt and zonelist.txt overrides necessary for KoLmafia to automate the cubicles. Eleron made a point of telling us that kolproxy didn't require an update in order to automate the zone.

Eleron is on the dev team.

I asked him if Jick had commented on whether he cared about automating the zone. Eleron said "Jick has said nothing about it."

I'm going to submit it. If Jick responds to my note and asks me to disable it, I will comply, but I just might ask him about his opinion on kolproxy automation, if so.
 
Last edited:

huvanile

New member
I dunno if my opinion counts or not since I'm pretty new to both the forums and to mafia, but I also appreciate the ability to automate Crimbo. Before the scripts in this thread got me started down the right path to automating it, I was getting pretty bored with the clicking (and clicking and clicking). Thanks for the scripts people!
 
I have a cleaner one if you like. Many less server hits and emulates exactly how I am fighting with 2 clicks:
PHP:
void Crimbo2010(){
	Print("Crimbo 2010, Wasting Adventures the Easy Way","blue");
	if( !contains_text( visit_url( "mountains.php" ) , "crimbcohq.gif" ) ){
		print( "I'm sorry, Crimbo2010 is currently closed!","red" );
		return;}
		
	int start_boredom_level(){
		matcher Boredom=create_matcher("Boredom:</td><td><b><font color=blue>(\\d+)%", visit_url("charpane.php"));	
		if(Boredom.find()) return to_int(Boredom.group(1));
		return 0;}
	
	int total_boredom_level=start_boredom_level();
	while( total_boredom_level < 50 && my_adventures()>0 ){
		bbsaction();
		string page_text = visit_url( "adventure.php?snarfblat=247" );
		if( contains_text( page_text , "Combat" ) ){
			buffer finale=visit_url("fight.php?action=macro&macrotext=use facsimile dictionary; repeat !pastround 9; attack; repeat");
			matcher boredom_test=create_matcher("<td valign=center><b>Boredom \\+(\\d+)%", finale);
			if(boredom_test.find()){
				total_boredom_level+=to_int(boredom_test.group(1));}
			print("Boredom level:"+total_boredom_level);}
		else if( contains_text( page_text , "choice.php" )  ) abort("Unknown Choice");}
	print("Done!");}
You hit once to check for the HQ, once to get your boredom level, then 2 per adventure (once to start the fight and once again to send the macro). Your boredom level is returned from the fight results page rather than reloading the charpane each time. I wouldn't recommend using this with a lanyard, but this'll let you stasis if you're going for anything else, like getting drops from Crowned familiars.

Right now, combat scripts can fail because monsters aren't in the system yet. SS makes mafia freak because it's asking for a "bad monster value".

A couple things to note. First, I set the adventures to 50 because I'm hitting tea to keep my boredom down (designated faxer). Second, the "bbsaction()" is from an imported script. Use your own or delete it as needed.

This line:

Code:
buffer finale=visit_url("fight.php?action=macro&macrotext=use facsimile dictionary; repeat !pastround 9; attack;

is due to stasising with a stocking mimic to gain meat, correct? If I want it to instead attack immediately (due to using a Squamous Gibberer to generate more turns instead) I would I use

Code:
buffer finale=visit_url("fight.php?action=macro&macrotext=attack;

Correct?

(Some what moot as it looks like we're getting support for automating and I can just use my CCS but it will help me understand scripting better).
 

bumcheekcity

Active member
This is, actually, worth noting.

Eleron was in my clan today, chatting. Somebody had already come up with and was distributing the adventures.txt and zonelist.txt overrides necessary for KoLmafia to automate the cubicles. Eleron made a point of telling us that kolproxy didn't require an update in order to automate the zone.

Eleron is on the dev team.

I asked him if Jick had commented on whether he cared about automating the zone. Eleron said "Jick has said nothing about it."

I'm going to submit it. If Jick responds to my note and asks me to disable it, I will comply, but I just might ask him about his opinion on kolproxy automation, if so.

Yeah, KolProxy doesn't have to be updated with zones and monsters. It will always be able to automate a zone without update, so Eleron would have to specifically DISable support for certain snarfblats, but old versions would still be able to automate.

That said, I'm no expert on it, and I have no idea how many people use Mafia and/or KoLProxy.
 

Fluxxdog

Active member
This line:

Code:
buffer finale=visit_url("fight.php?action=macro&macrotext=use facsimile dictionary; repeat !pastround 9; attack;

is due to stasising with a stocking mimic to gain meat, correct?
Partly. I also have a Crown of Thrones and am trying to get goodies to drop as well.
If I want it to instead attack immediately (due to using a Squamous Gibberer to generate more turns instead) I would I use

Code:
buffer finale=visit_url("fight.php?action=macro&macrotext=attack;

Correct?
Actually, it should be more like:
Code:
buffer finale=visit_url("fight.php?action=macro&macrotext=attack; repeat;
This way, it'll attack more than once, in case of fumble or you're not strong enough to take it out in one blow.

On a side note, this may be posted like this because the last repeat got snipped, but hope that helps you understand my madness ^^
 
Partly. I also have a Crown of Thrones and am trying to get goodies to drop as well.Actually, it should be more like:
Code:
buffer finale=visit_url("fight.php?action=macro&macrotext=attack; repeat;
This way, it'll attack more than once, in case of fumble or you're not strong enough to take it out in one blow.

On a side note, this may be posted like this because the last repeat got snipped, but hope that helps you understand my madness ^^

Thanks.
 

mredge73

Member
For : 10
Against : 3
Undecided : 1

Disclaimer:
A Mafia is not a democracy, the devs can make this thread disappear whenever they want.
 

Theraze

Active member
Counting is irrelevant at this point... maybe we stop rubbing people's faces in it?

Since the goal at this point is to make the automation as efficient for the servers as possible, here's what I'm currently using.
PHP:
void Crimbo2010(){
    Print("Crimbo 2010, Wasting Adventures the Easy Way","blue");
    if( !contains_text( visit_url( "mountains.php" ) , "crimbcohq.gif" ) ){
        print( "I'm sorry, Crimbo2010 is currently closed!","red" );
        return;}
    int start_boredom_level(){
        matcher Boredom=create_matcher("Boredom:</td><td><b><font color=blue>(\\d+)%", visit_url("charpane.php"));
        if(Boredom.find()) return to_int(Boredom.group(1));
        return 0;}
    int total_boredom_level=start_boredom_level();
    while( total_boredom_level < 50 && my_adventures()>0 ){
        adventure(1, $location[CRIMBCO cubicles]);
        total_boredom_level=start_boredom_level();
            print("Boredom level: "+total_boredom_level);}
    print("Done!");}
This adventures up to 50 boredom, then stops, so I can decide if I want to run another 50/51 adventures for a BGE form, drink 2 workytime teas and run the script again, or whatever... What I like about this is that, since it uses my normal BBS and CCS and CCS (interesting that both Custom Combat and Counter Checker fall under those. Well, interesting to me, at least.) and I won't end up missing out on more semi-rares than I absolutely have to...
 

mredge73

Member
Remember, I was attacked first and this is my thread.
I am not interested in fighting or arguing, but I want to keep counting so I will do so.
I actually thought it would have evened out by now instead of being fully supported.

I am sure we will do this again next year. Merry Crimbo!
 

Veracity

Developer
Staff member
I am not interested in fighting or arguing, but I want to keep counting so I will do so.
This is called "attitude". This whole thread has oozed attitude. I was not happy when it appeared, have not been impressed with your "counting", and am now completely pissed off that you persist in it.

You know something? I can solve it for myself. Welcome to my ignore list.
 

Rinn

Developer
Here's the ash script to buy from the gift shop as mafia won't acquire from coinmasters I guess? Is that a bug? Should there be a command to trade in? I'm pretty sure you can't automate trading in during wossname either without visit_url.

Code:
void BuyGift(item i, int num)
{
    visit_url("crimbo10.php?pwd=&action=buygift&whichitem="+to_int(i)+"&howmany="+num);
}

void BuySSGift(item i, int num)
{
    visit_url("crimbo10.php?pwd=&action=buyssgift&whichitem="+to_int(i)+"&howmany="+num);
}

Also you need to check for boredom two ways to account for either the full or compact charpane
Code:
// Full
matcher Boredom=create_matcher("Boredom:</td><td><b><font color=blue>(\\d+)%", visit_url("charpane.php"));
// Compact
matcher Boredom=create_matcher("Bored:</td><td aligh=left><b><font color=blue>(\\d+)%", visit_url("charpane.php"));
 
Last edited:

Fluxxdog

Active member
Counting is irrelevant at this point... maybe we stop rubbing people's faces in it?
Ya think? My biggest gripe is where I was counted. I should have been undecided. But that's not important.
Since the goal at this point is to make the automation as efficient for the servers as possible, here's what I'm currently using.
PHP:
adventure(1, $location[CRIMBCO cubicles]);
total_boredom_level=start_boredom_level();
The reason I checked the fight page to add to boredom was so it wouldn't keep hitting charpane.php over and over again. This adds an extra hit similar to the original.

Another reason I imported the bBS that I used and called it as a function is an oddity I noticed of late. It seems that between each battle, naturally ^^, there's a large delay from loading in my bBS. This is because my bBS is probably very large and imports about 10 different scripts. But with the version of this I put up, it never leaves memory. The script ran viciously faster. Just wish I could do that for all my adventuring, though scripts that I'm fully automating is going to have a "fight,choice,or otherwise" function. So hey! Merry Crimbo to me! I learned something and got a nice idea ^^
 

Theraze

Active member
Yeah... if my CC would run with the fast version, I'd be happy using that. Losing semirares though because I forgot to stop the script at the right spot meant missing out on a couple of lunchboxes, which just feels sad.

And yes, if I could get the fight code into the buffer, I would... but adventure returns a boolean, as does adv1. If I were 100% certain I'd never lose a fight, I could just increment automatically as I go, but...
 
Top