Ending Script

And this is what I use to shut down mafia.

It verifies that I have had my nightcap, and put on my Nightly outfit.

Code:
if( can_drink())
{
	int drunklimit;
	drunklimit = 15;
	if( have_skill( $skill[liver of steel]))
	{
		drunklimit = 20;
	}
	if( have_skill( $skill[the ode to booze]) && have_effect( $effect[ode to booze]) == 0 && my_maxmp() > 49)
	{
		cli_execute( "abort You have not cast Ode yet.");
	}
	if( my_inebriety() < drunklimit)
	{
		cli_execute( "abort You have not had your nightcap yet.");
	}
}
cli_execute( "outfit nightly");
cli_execute( "exit");
 

Attachments

  • ClosingScriptASH.ash
    460 bytes · Views: 88

PsychoKlown

New member
That looks awesome. One party kinda confuses me though.
What does this do? I'm kinda new to ASH, I dont even know what it means -_-. I can code PHP, so I understand the code, but I don't see where it came from.
Code:
cli_execute( "outfit nightly");
 

macman104

Member
[quote author=PsychoKlown link=topic=21.msg127#msg127 date=1144106251]
That looks awesome. One party kinda confuses me though.
What does this do? I'm kinda new to ASH, I dont even know what it means -_-. I can code PHP, so I understand the code, but I don't see where it came from.
Code:
cli_execute( "outfit nightly");
[/quote]I imagine this is some sort of outfit geared to give extra turns at rollover. The cli_execute command is used in the ASH to use some standard scripting engine commands that do not exist in the ASH system. One such thing is the ability to don outfits, this is not currently possible through an "ASH" command, so the cli_execute allows for the use of the standard scripting command
Code:
outfit <outfit name>
 
macman104 has the idea.

My current project is a script to sort of create the best possible outfit for rollover. But until that is finished, I have to manually make an outfit and save it in KoL. (The custom outfit feature.)

I call my "rollover" outfit Nightly.

So that line tells mafia to have KoL put on my custom outfit Nightly.

(I had many occasions where I would forget to do so. And since rollover happens when I am at, or coming home from, work - I just do not get the chance to correct that oversite often.)

If I ever get around to the very, very, complicated project of making a drink select script, I can take out the abort commands and have mafia cast Ode and drink my nightcap.

But I am digressing, aren't I? ;)
 
Top