Making sure a script is rune once a day only.

tebee

Member
Does anyone know a way of making sure a script has not been run before that KOL day? I.e from rollover to rollover.

The only date functions I can find seem to use real-world date/day which may or may not coincide with the KOL one.


Tom
 

tebee

Member
Re: Making sure a script is run once a day only.

I was planning on doing a version of the mushroom script which could be run as or added to, the daily start-up script run automatically when you start Maifa. Last time I tried to test the current version I forgot to run it one day and so messed up..... ah, the joy's of getting old.... no, come to think about it, I've always been a bit like that, must just be the joy's of being me.....

But of course there's always the possibility you might log in twice the same day....

Tom
 
Option 1: If using ash, you can manually read the current state of the mushroom plot using visit_url and knowing your image names.

Option 2: at the very end of the script buy a raffle ticket. If you have 1 in inventory, then the script has ran. If you don't, the script has not.

Option 3: if using ash and only farming 1st gen mushrooms, store the quantity of mushrooms you have in a variable, then use "field harvest" if you have more mushrooms then you didn't do it yet. If you don't have more then your already ran it.

I can think of many more.
 
Top