KoLmafia Guide: Running ASH Scripts: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
No edit summary
imported>Heeheehee
m Minor formatting.
Line 6: Line 6:




1) First, we need to find a script we want to execute. For this lesson, point your browser to the KolMafia forum. (link at the top of the guide). This mafia forum has a compendum of various scripts that you can look through in the future. For now, in <span class="plainlinks">[http://kolmafia.us/showthread.php?t=1736&highlight=tattoo this forum thread]</span>, scroll to the last entry and find the most updated Tattoo.ash attachment.
# First, we need to find a script we want to execute. For this lesson, point your browser to the KolMafia forum. (link at the top of the guide). This mafia forum has a compendium of various scripts that you can look through in the future. For now, in <span class="plainlinks">[http://kolmafia.us/showthread.php?t=1736&highlight=tattoo this forum thread]</span>, scroll to the last entry and find the most updated Tattoo.ash attachment.
# Click and download the Tattoos.ash attachment.
# Go find the downloaded Tattoos.ash. You might have to join the KolMafia forum to do the download. It is not a bad idea to do so anyways, so go ahead and do it.
# Open the script using Notepad or similar text browser. Take a look. This is just so you can see what a script looks like, and also for your own peace of mind.
# Do a Find, and look for "buy", "sell", "notify", and "send" text. This is a quick security check. Notify is a one-time mailing to the developer of a script which just lets them know you use their script. Good for epeen value I guess. Send/csend can actually mail people Meat or Items so ensure that nothing funny is going on there. Buy/Sell deals with item manipulation. You want to make sure a script is not gonna go sell all your stuff or buy expensive things. Even the best meaning script can bankrupt you.
# Move the Tattoos.ash script to where your KoL executable lives. Remember in our first lesson we put KolMafia in a folder. Since then, Mafia created several sub-folders where it stores its settings and stuff. In particular, a sub-directory called 'Scripts' should be present. Move Tattoos.ash into the scripts subdirectory.
# At the top, click Scripts and 'Refresh Menu'. Go to Scripts again and you will see 'Tattoo.ash' in the list. You could click it to execute. Do not do this right now though.
# Back in Mafia, click the Graphical CLI tab.
# At the very bottom of the screen there is a text entry field. Type Tattoos.ash and hit enter. (or Tattoos will suffice)
# The Tattoos.ash will then be executed. I am assuming that you finished the Artist quest as it is one of the first ones you received. If so, the script will equip any outfit that you don't have a trophy for already then visit the Tattoo Artist. If you have not done the artist quest this ascension, I have no idea what the script does.
In any case, you will see exactly what the script does since you are already in the CLI tab.


2) Click and download the Tattoos.ash attachment.
Anyways, this script is pretty cool. Normally it takes a good deal of work to determine when you have a 'new' outfit with no tattoo for it. Then to equip it, visit the Tattoo shop, then put your original equipment back on. It also tells you which outfits you are lacking for unreceived tattoos.
 
3) Go find the downloaded Tattoos.ash. You might have to join the KolMafia forum to do the download. It is not a bad idea to do so anyways, so go ahead and do it.
 
4) Open the script using Notepad or similar text browser. Take a look. This is just so you can see what a script looks like, and also for your own peace of mind.
 
5) Do a Find, and look for "buy", "sell", "notify", and "send" text. This is a quick security check. Notify is a one-time mailing to the developer of a script which just lets them know you use their script. Good for epeen value I guess. Send/csend can actually mail people Meat or Items so ensure that nothing funny is going on there. Buy/Sell deals with item manipulation. You want to make sure a script is not gonna go sell all your stuff or buy expensive things. Even the best meaning script can bankrupt you.
 
6) Move the Tattoos.ash script to where your KoL executable lives. Remember in our first lesson we put KolMafia in a folder. Since then, Mafia created several sub-folders where it stores its settings and stuff. In particular, a sub-directory called 'Scripts' should be present. Move Tattoos.ash into the scripts subdirectory.
 
7) At the top, click Scripts and 'Refresh Menu'. Go to Scripts again and you will see 'Tattoo.ash' in the list. You could click it to execute. Do not do this right now though.


8) Back in Mafia, click the Graphical CGI tab.
9) At the very bottom of the screen there is a text entry field. Type Tattoos.ash and hit enter. (or Tattoos will suffice)
10) The Tattoos.ash will then be executed. I am assuming that you finished the Artist quest as it is one of the first ones you received. If so, the script will equip any outfit that you don't have a trophy for already then visit the Tattoo Artist. If you have not done the artist quest this ascension, I have no idea what the script does.
In any case, you will see exactly what the script does since you are already in the CGI tab.
Anyways, this script is pretty cool. Normally it takes a good deal of work to determine when you have a 'new' outfit with no tattoo for it. Then to equip it, visit the Tattoo shop, then put your original equipment back on. It also tells you which outfits you are lacking for unreceived tattoos.


Bonus) Browse the KolMafia scripts forum briefly. You can see that there are some pretty cool scripts available, such as ones that automate several annoying aspects of quests for you. You might note that some scripts have prerequisites. One script in particular, ZLib, was created solely as a programming library for other script-writers and is widely used.
Bonus) Browse the KolMafia scripts forum briefly. You can see that there are some pretty cool scripts available, such as ones that automate several annoying aspects of quests for you. You might note that some scripts have prerequisites. One script in particular, ZLib, was created solely as a programming library for other script-writers and is widely used.
Line 33: Line 25:
Bonus2) I just started doing the Slime Tube and it sure is a pain. I found a cool slime.ash program which would outfit you, fight the slime, then rinse off when the Covered In Slime effect would kill you. However, it would make me take up to 99% of my HPs in Slime, then waste tons of healing aids to get me back to max. I modified it to auto-rinse after taking 500 damage from a single Covered in Slime effect. This let me kill slime without needing any healing effects at all.
Bonus2) I just started doing the Slime Tube and it sure is a pain. I found a cool slime.ash program which would outfit you, fight the slime, then rinse off when the Covered In Slime effect would kill you. However, it would make me take up to 99% of my HPs in Slime, then waste tons of healing aids to get me back to max. I modified it to auto-rinse after taking 500 damage from a single Covered in Slime effect. This let me kill slime without needing any healing effects at all.


The point is that it is very do-able to download someone elses script then hack it to make it do what you want it to do... or to remove undesired behavior. (notifys, use of consumables, buying things from the mall, etc)
The point is that it is very do-able to download someone else's script then hack it to make it do what you want it to do... or to remove undesired behavior. (notifys, use of consumables, buying things from the mall, etc)





Revision as of 05:53, 28 March 2010

KolMafia has the capability to execute scripts which can perform just about any KoL action. Mafia scripting uses an .ash extension and is simply a text file that contains a bunch of Mafia commands with some programming language constructs as needed. You can browse, download, and execute scripts that other people have written to help automate specific functions or expand Mafia capabilities.

This poses a bit of a security risk, obviously. Mafia is all open-source and examined by many people and is relatively trustworthy. Some random dude's script.... not so much. Feel free to skip this lesson if this makes you nervous.

In this lesson, we are going to find a simple script, download it, store it, then execute it.


  1. First, we need to find a script we want to execute. For this lesson, point your browser to the KolMafia forum. (link at the top of the guide). This mafia forum has a compendium of various scripts that you can look through in the future. For now, in this forum thread, scroll to the last entry and find the most updated Tattoo.ash attachment.
  2. Click and download the Tattoos.ash attachment.
  3. Go find the downloaded Tattoos.ash. You might have to join the KolMafia forum to do the download. It is not a bad idea to do so anyways, so go ahead and do it.
  4. Open the script using Notepad or similar text browser. Take a look. This is just so you can see what a script looks like, and also for your own peace of mind.
  5. Do a Find, and look for "buy", "sell", "notify", and "send" text. This is a quick security check. Notify is a one-time mailing to the developer of a script which just lets them know you use their script. Good for epeen value I guess. Send/csend can actually mail people Meat or Items so ensure that nothing funny is going on there. Buy/Sell deals with item manipulation. You want to make sure a script is not gonna go sell all your stuff or buy expensive things. Even the best meaning script can bankrupt you.
  6. Move the Tattoos.ash script to where your KoL executable lives. Remember in our first lesson we put KolMafia in a folder. Since then, Mafia created several sub-folders where it stores its settings and stuff. In particular, a sub-directory called 'Scripts' should be present. Move Tattoos.ash into the scripts subdirectory.
  7. At the top, click Scripts and 'Refresh Menu'. Go to Scripts again and you will see 'Tattoo.ash' in the list. You could click it to execute. Do not do this right now though.
  8. Back in Mafia, click the Graphical CLI tab.
  9. At the very bottom of the screen there is a text entry field. Type Tattoos.ash and hit enter. (or Tattoos will suffice)
  10. The Tattoos.ash will then be executed. I am assuming that you finished the Artist quest as it is one of the first ones you received. If so, the script will equip any outfit that you don't have a trophy for already then visit the Tattoo Artist. If you have not done the artist quest this ascension, I have no idea what the script does.

In any case, you will see exactly what the script does since you are already in the CLI tab.

Anyways, this script is pretty cool. Normally it takes a good deal of work to determine when you have a 'new' outfit with no tattoo for it. Then to equip it, visit the Tattoo shop, then put your original equipment back on. It also tells you which outfits you are lacking for unreceived tattoos.


Bonus) Browse the KolMafia scripts forum briefly. You can see that there are some pretty cool scripts available, such as ones that automate several annoying aspects of quests for you. You might note that some scripts have prerequisites. One script in particular, ZLib, was created solely as a programming library for other script-writers and is widely used.

Bonus2) I just started doing the Slime Tube and it sure is a pain. I found a cool slime.ash program which would outfit you, fight the slime, then rinse off when the Covered In Slime effect would kill you. However, it would make me take up to 99% of my HPs in Slime, then waste tons of healing aids to get me back to max. I modified it to auto-rinse after taking 500 damage from a single Covered in Slime effect. This let me kill slime without needing any healing effects at all.

The point is that it is very do-able to download someone else's script then hack it to make it do what you want it to do... or to remove undesired behavior. (notifys, use of consumables, buying things from the mall, etc)


BOTTOM LINE: There are a lot of really useful scripts people have already written which can help you out.

Continue to Lesson 14: Useful Commands