Any advice on runnig a vacation script on a Mac OS 10.5

jalapenojoe

New member
Hello,
I have had some success in setting up a few scripts to maintain my character while I am away on vacation. I have in the past used a WinXP machine to run a batch file and run simple gCLI scripts. I have been reading up on the .ash scripting here and I am excited to try to code something up to work on a certain black pudding related trophy while I am on vacation for to weeks. As well as utilize Nash Crosby's Still and burn a few turns with the BBH.

So I have tried using the Automator on the Mac but that really failed miserably.

Is there anyone out there using a Mac and has had success with running the equalivent of a batch script, scheduled task on the PC?

I am planning on using the BBH code available in the script forums, but I will post anything new that comes of this in the appropriate forum when I am done.

thanks!
 

Ethelred

Member
More than a year ago I was running a clan bot and used Terminal and crontab to handle running the bot's daily turns. It worked quite well and reliably. Since then, there have been some changes in the way mafia file I/O and command line invocation work, but such an approach should still work. In terminal, enter "man crontab" for more information. A Unix primer may prove useful if you don't have a Unix background. Be sure and allow a few days to debug your process since Unix commands and shell scripting are arcane at best. Best of luck.
 

jalapenojoe

New member
thank you!
I would assume there is a batch file that calls mafia?

that should be the nudge i needed to get this working. My Unix Foo is only ok, but i bet i can get it working with crontab.

-Joe
 

skyrich62

New member
Hi,

I'm a *nix Guru. If you need help with this just let me know.

You can use a script, (note: not *batch* -- that's M$ terminology:) to start mafia, or just use a crontab command.

Assuming you have the .jar file handy, you can setup a crontab entry like this:

$ cat >mytab.txt
0 12 * * * (cd kolmafia-home; java -jar KoLmafia.jar)
^D
$ crontab <mytab.txt


This will create a cron job which will run at noon everyday. It will start up KoLmafia. If you have KoLmafia preferences set to auto-login, and run appropriate "breakfast", "login" and "logout" scripts, then everything will be automated for you.

Good luck!

--R
 

tebee

Member
Well I can't help you with running the scripts, but I've got a few scripts I've written/modified to help run my turns semi-automatically as I'm spending far too much time renovating my new but old house just now - damned inconsiderate partners who want luxuries like bedrooms to sleep in........

Here is one to use the still everyday - it sells the results in the mall but if you do not want to do this just comment that bit out. It's set to produce the most popular drinks but you can change these to whatever you want.

The second one is to do the mushroom fields - it will produce knoll mushrooms until the time is right to start the sequence for the gloomy black ones and the switch to that. This is however a work in progress - If I remember correctly the bug in it is that I assumed the moon phases went from 1-16 when they in fact go from 0-15, but it's been a while since l had time to look at it.

Nither of these are my own work originally, they came from this forum, but they are both somewhat modified my me - please send thanks to the original authors as well!

Anything else you are looking for, feel free to ask!

Tom
 

Attachments

  • scdrinks.ash
    4.9 KB · Views: 53
  • mrooms.ash
    14 KB · Views: 52

jalapenojoe

New member
Thanks for the scripts Tebee! Everyone is just so nice and helpful in this forum.

I have some basic scripts automated on my PC.

And I have scripts running properly on my mac, the paths for the home directory and the script direction were a bit different.. I am going to now create the cron job and see how things go on the mac.

Ideally I want the script to work on the Aww YEah trophy for me each day.
So that is an ASH script that I hope to have working before I go on vacation.

Later this week I'll post some info I have learned and share the trophy script when I get it working.

-Joe
 

tebee

Member
I've been asked about changing the script I posted earlier to use the still to consume the drinks it created instead of selling them.

I thought about it for a bit and decided to hack it and my existing eating and drinking script somewhat and now I give you the resulting scripts here. Run the make the drinks script then the use the drink script of course!

The eating and drinking scripts uses hi miens and the best super advanced cocktailing crafting drinks that you hopefully produced earlier currently in your inventory. If it can't find anything it defaults to using, and if necessary buying, the best advanced cocktailing crafting drink instead. Some of the code in this is a bit messy, if anyone wants to tidy it up, feel free.

Once again both these scripts are my mods of other peoples work, thanks to them too.

Tom
 

Attachments

  • scdrinks1.ash
    4.5 KB · Views: 49
  • eatd1.ash
    6.7 KB · Views: 54
Top