How do I execute a command line in a script? (feeding a slimeling)

Kow_

New member
Hey guys I just bought a slimeling and wanted to make a script to use in my moods such that when my mp is low, it will feed my slimeling. Typing "slimeling <item>" into the cli works, but I cannot get it to work in a script.

This is what I wish would work:

Code:
void main()
{
	if( my_mp() < 400)
	{
		slimeling antique greaves
	}
}

I have searched these forums as well as online and cannot find how to get a command line to work from within a script. If anyone knows a way to make this work or a better way all together, please let me know.
 
Last edited:
The ash functiion for cli commands is cli_execute(string);
So, try this:

Code:
void main()
{
	if( my_maxmp() < 400)
	{
		cli_execute("slimeling antique greaves");
	}
}
 

Grotfang

Developer
It looks as though you are trying to use a CLI command within an ASH script.

As a very basic script, use cli_execute to carry CLI commands through:

Code:
void main()
{
	if( my_maxmp() < 400)
	{
		cli_execute( "slimeling antique greaves" );
	}
}

This is entirely untested, but I see no reason for it not to work, if you are correct that "slimeling antique greaves" works as anticipated.

EDIT: Damn ninjas!
 

Kow_

New member
awesome, thank you, this is working now, I guess I didn't look hard enough. I also used my_maxmp instead of my_mp by accident.
 
Last edited:

Bale

Minion
It is amazingly awesome what a slimeling can do with normally useless antique gear. I did a 100% slimeling run as a muscle class. As soon as I opened up the gallery for leveling, mana started coming out of my ears.
 

Bale

Minion
It's surprising what can be done with moods. I only just learned this trick a few days ago here!

Code:
unconditional trigger:

if On the Trail < 1; olfact monster zombie waltzers
 
Top