Temporarily Silence CLI Output?

TwirlyRotini

New member
I like to run Ezandora's farfuture.ash each day, but the cli gets cluttered pretty quickly. I commented out all places where the script announces what it is doing, and now I just see a bunch of
Code:
Encounter: The Far Future
Encounter: Starship Company :: In your Quarters
Encounter: Starship Company :: In your Quarters
Encounter: Starship Company :: In the Bridge
Encounter: Starship Company :: In the Turbolift
Encounter: Starship Company :: In Engineering
which I believe comes from mafia itself, not the script. Is there any way to turn off this output just while the script runs? Or maybe divert it to a log file which I can ignore or delete?
 

lostcalpolydude

Developer
Staff member
The script could have cli_execute( "clear" ) added so that the output is gone from the CLI when the script is done.
 

TwirlyRotini

New member
I would prefer to still see confirmation that I ran the script and got my once-a-day item. Plus, I often run this via my daily script, which has other output I'd like to keep.
 

Pazleysox

Member
You can always make sure that the Farfuture.ash script is the first thing that runs, and when it's done, you can put in
Code:
cli_execute("cls");

If you always use or sell the current item, you can always put a check in the daily script to see what you got. If you keep items in your inventory, see the 2nd code below

Code:
        cli_execute("cls");
	if($item[Shot of Kardashian Gin].available_amount() >= 1 )
	{	print( "You got Shot of Kardashian Gin from the far future");	}
	if($item[Riker's Search History].available_amount() >= 1 )
	{	print( "You got Riker's Search History from the far future");	}
	if($item[Tea\, Earl Grey\, Hot].available_amount() >= 1 )
	{	print( "You got Tea\, Earl Grey\, Hot from the far future");	}
	if($item[memory disk\, alpha].available_amount() >= 1 )
	{	print( "You got memory disk\, alpha from the far future");	}
OR
if you keep stuff in your inventory, and want to see what you got today only, you can try this instead:
Code:
//this will check todays logs only, and print out the name of the item you obtained.
string name = my_name();
boolean gin = false;
boolean riker = false;
boolean tea = false;
boolean memory = false;

string [int] log = session_logs( my_name(), 1 );
foreach day in log
{
	if ( log[day].contains_text( "Shot of Kardashian Gin" ))
	{  gin = true;	}
	if ( log[day].contains_text( "Riker's Search History" ))
	{  riker = true;	}
	if ( log[day].contains_text( "Tea\, Earl Grey\, Hot" ))
	{  tea = true;	}
	if ( log[day].contains_text( "memory disk\, alpha" ))
	{  memory = true;	}
}
	if (gin) {print ("Shot of Kardashian Gin obtained from FarFuture today", "green");	}
	if (riker) {print ("Riker's Search History obtained from FarFuture today", "green");	}
	if (tea) {print ("Tea\, Earl Grey\, Hot obtained from FarFuture today", "green");	}
	if (memory) {print ("memory disk\, alpha obtained from FarFuture today", "green");	}

Both ways are tested, and work nicely.
 
Last edited:
Top