Clothing checkpoint/restore

degrassi

New member
I was struggling with a way to easily save/restore clothing sets in ash, and put this together to handle it for me.

These are two separate small scripts that will save/restore your clothing. It doesn't save it as a custom outfit since there doesn't seem to be an easy way to do that through ash. This works pretty well though.

I made them two separate scripts so that if you put them in your script folder you can simply type "checkpoint" or "restore" and it'll work in the gCLI. Alternately, if you want to use them in your ash script, just import the files and use "checkpoint()" or "restore_checkpoint()".

It doesn't save familiars or their equipment. I think of them as separate from outfits when I'm adventuring, but if you wanted them to save that info, it wouldn't be hard to add.
 

Attachments

  • checkpoint.ash
    632 bytes · Views: 75
  • restore.ash
    1.4 KB · Views: 71

hippymon

Member
I figured I would simplify this script for you so here it is:
Code:
cli_execute("checkpoint");
Also, an easy way to save custom outfits:
Code:
boolean save_outfit(string outfitlabel){
	visit_url("inv_equip.php?which=2&action=customoutfit&outfitname=" + outfitlabel);
	return true;
}
 

degrassi

New member
I got pretty stopped when I saw posts saying that the ash command "checkpoint()" was removed that I didn't think to look to see if it was still there in the CLI command set. Dang. That's way easier.

Thanks!
 

zarqon

Well-known member
But if you use the cli "checkpoint" command, what is the command to put the saved outfit back on? It's not "outfit Backup". Mafia appears to store the checkpoint outfit internally rather than via KoL, so how can we access that?

And, a more useful return value for the save_outfit() function:

Code:
boolean save_outfit(string outfitlabel) {
     return (contains_text(visit_url("inv_equip.php?which=2&action=customoutfit&outfitname="+
            outfitlabel), "Your custom outfit has been saved."));
}
 
Top