Help!!

skateboard34

New member
I pretty much know what scripts are, but I want to know how to use them. How do I input them into KOL Mafia? I know you don't paste it into Word, but what do I do? Thanks! I'm new here, so you might think it's a stupid question.
 

DerDrongo

Member
where ever you placed your kolmafia executable there should be a directory called scripts... so...
c:\kol\kolmafia.exe
would mean the scripts directory was
c:\kol\scripts\

once you have added a script to the right directory it should apear in the scripts menu within kol (refresh menu if you added the script after starting mafia), you can also just type the script's name into the "Graphical CLI" tab to run it
 

Bale

Minion
[quote author=skateboard34 link=topic=2096.msg10621#msg10621 date=1229883091]
I can't find the Scripts directory. I have attacks, buffs, settings, and more, but I can't find scripts.
[/quote]

It's a directory. On your hard-drive.

Go to the directory where you saved kolmafia and you'll see that there are a number of subdirectory. Put the script into the /scripts directory. If you're using Windows, then use Windows Explorer to do this, if you're on a mac there should be another method.l
 

skateboard34

New member
Bale, I told you guys. I don't have that subdirectory. I have the Buffs subdirectory, attacks, and more, but not scripts. And Rinn, if I create it, will it still input in KOL Mafia?
 

lostcalpolydude

Developer
Staff member
[quote author=skateboard34 link=topic=2096.msg10632#msg10632 date=1229901141]
Bale, I told you guys. I don't have that subdirectory. I have the Buffs subdirectory, attacks, and more, but not scripts. And Rinn, if I create it, will it still input in KOL Mafia?
[/quote]
Yes it will. Create the folder, put scripts in it, and everything will work the way it is supposed to work.
 

Veracity

Developer
Staff member
I've seen this too many times. As of revision 6649, KoLmafia will create a "scripts" directory in the correct place, if necessary, when it starts up.
 

skateboard34

New member
[quote author=DerDrongo link=topic=2096.msg10581#msg10581 date=1229788460]
where ever you placed your kolmafia executable there should be a directory called scripts... so...
c:\kol\kolmafia.exe
would mean the scripts directory was
c:\kol\scripts\

once you have added a script to the right directory it should apear in the scripts menu within kol (refresh menu if you added the script after starting mafia), you can also just type the script's name into the "Graphical CLI" tab to run it
[/quote]
Thanks, but what would classify as the script title? Do you enter all the code or what? Sorry if this is getting annyoying.
 

DerDrongo

Member
[quote author=skateboard34 link=topic=2096.msg10655#msg10655 date=1229987341]
what would classify as the script title? Do you enter all the code or what?
[/quote]

im not sure what you mean by script title, but typing a scripts filename will execute all the code inside of it

try creating a file called hotwing.txt in your scripts directory and paste in the following...
Code:
buy 1 hot wing
eat 1 hot wing
typing "hotwing.txt" (without the quotes) should buy then eat 1 hot wing

you can find more commands at http://kolmafia.sourceforge.net/scripting.html
 

skateboard34

New member
DerDrongo, you're awesome, man! Now I can even start making scripts! But, is that all you have to do? You don't have to use fancy code? That's awesome!
 

DerDrongo

Member
there are two scriping methods, CLI and ASH, any filename ending with the .ash extension is considered to be programmed in ASH... its a more complex system but it allows conditional statements, if you reprogrammed hotwings.txt into ash you could check that you needed to buy a hot wing instead or if you had already eaten too much

I would definitely like to learn more about scripting in KOL. Can somebody fill me in on the basics? Ex. How to adventure places, how to stop adventuring at a certain point, etc. If you could do this, it would be greatly appreciated. Thanks!
your best start is with the CLI reference (http://kolmafia.sourceforge.net/scripting.html), once you need to do conditional statements and loops you can find more info on them at http://wiki.kolmafia.us/
once you have written a few simple scripts in ash reading other peoples scripts can help understand the language a lot more
 
Top