Castle farming script

Xenthes

Member
I made this script a couple of weeks ago and since someone was asking about how to write one in this thread I thought I would post what I did.

This script does need zlib.ash and the updated version of EatDrink.ash
bounty.ash needed for the bounty hunter section.


What is does:
* Eats and spleens up to your max fullness and your spleen
* Finds best outfit and familiar for item drop
* Does the the bounty hunter for the day using bounty.ash
* Finds the best outfit and familiar for meat farming
* Does some basic buff upkeepView attachment Castle_farming.ash
* Farms the castle for however many adventures you have remaning
* Uses the warm subject gift certificates and autosells the rest
* Finds and equips the best rollover items in your inventory
* Drinks up to your max drunkness then overdrinks.
* Prints out how much you got from autoselling the items and how much you got from using the WSGCs in your inventory in the gCLI

Any suggestions for improvements are welcomed.
 
Last edited:

icon315

Member
I would make
PHP:
eatdrink(15, 0, 15, false);
eatdrink(0, 19, 0, true);
Into
PHP:
eatdrink(fullness_limit(), 0, spleen_limit(), false);
eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), true);

AND
PHP:
cli_execute("maximize meat");
PHP:
cli_execute("maximize meat -equip sns crossbow");
Just in case


Also add this
PHP:
string bhh_page = visit_url("bhh.php");
boolean hunt_today() {
switch {
case bhh_page.contains_text("I can't assign you a new one"):
        print("Bounty hunt already completed today.", "red");
        return false;
 case bhh_page.contains_text("I'm still waiting for you to bring me"):
        print("You're already on a bounty hunt!", "green");
        return false;
case bhh_page.contains_text("5 discarded pacifiers"):
        print("Hunting for 5 discarded pacifiers!", "green");
        visit_url("bhh.php?pwd&action=takebounty&whichitem=2415");
        return true;  }
    print("Not asking for a good bounty today.", "red");
    return false;
 }
}

Also i added a script i made
 
Last edited:

Xenthes

Member
Is there a way to skip the BHH part if I add that in if I already have the outfit, sniffy tome, and hounddog? Two of the characters I might be using this with already has all of that.
 

icon315

Member
you could do something like
PHP:
if (my_name() == "MyMain")

or
PHP:
if ( ! have_outfit( "Bounty-Hunting Rig" ) && ! have_familiar ($familiar[Jumpsuited Hound Dog]) && ! have_skill($skill[Transcendent Olfaction]) )
 
Last edited:

Bale

Minion
Is there a way to skip the BHH part if I add that in if I already have the outfit, sniffy tome, and hounddog? Two of the characters I might be using this with already has all of that.

Code:
if(available_amount($item[bounty-hunting helmet]) > 0) 
  && available_amount($item[bounty-hunting pants]) > 0)
  && available_amount($item[bounty-hunting rifle]) > 0) 
  && have_familiar($familiar[jumpsuited hound dog]) 
  && have_skill($skill[Transcendent Olfaction]))
 

heeheehee

Developer
Staff member
Code:
if(available_amount($item[filthy lucre]) < 15*(available_amount($item[bounty-hunting helmet])==0).to_int()
   + 15*(available_amount($item[bounty-hunting pants])==0).to_int() + 15*(available_amount($item[bounty-hunting rifle])==0).to_int()
   + 100*(available_amount($item[pompadour'd puppy])==0 || have_familiar($familiar[jumpsuited hound dog])).to_int()
   + 200*(available_amount($item[tome of transcendent olfaction])==0 || have_skill($skill[transcendent Olfaction])).to_int())
Overkill much?
 
Last edited:

heeheehee

Developer
Staff member
Erm, yeah. Noticed that there were two item_amount()'s that should've been available_amount()'s. Fixed!
 

kain

Member
but you mean you don't want to collect lucres, just in case something new comes into the BHH? *dances on his pile of 125 'extra' lucre*
 

heeheehee

Developer
Staff member
Yeah, I dunno. If J&S introduced a new item, people* would complain so much more, man.

*Refers to those who either haven't bothered to lucre consistently as well as newbies who still haven't gotten all 345 lucre yet.
 

Bale

Minion
Or you could just change/comment out those lines in the script. It's hardly a big project with hidden repercussions to any change. Just sayin'.
 

Xenthes

Member
Updated the script a bit. It now eats and spleens up to your characters max fullness and spleen, does the bounty hunter using the script listed in the first post and then drinks up to your max drunkness then over drinks.

Thanks to all who suggested changes.
 

fraed

New member
Love your script. works just like I wanted to do myself but I don't know scripting. I am having a problem with the eatdrink script it always runs in sim mode. I have edited the vars_mycharactername.txt file and it still runs in sim mode. I have tried finding info on eatdrink in the other form but didn't find anything there.

Again thanks for a great script.
 

icon315

Member
well not sure what is wrong, but here is a new version i cooked up. it will try to get more free buffs which will help your farming
 

Attachments

  • EveryoneFarm.ash
    4 KB · Views: 103

fraed

New member
well not sure what is wrong, but here is a new version i cooked up. it will try to get more free buffs which will help your farming

Thank you. This one worked GREAT. One question I do have is why do the scripts do all the drinking after your done? Sorry I'm a real noob on this.
 

Xenthes

Member
Thank you for using it and the compliment on the script.

Thank you. This one worked GREAT. One question I do have is why do the scripts do all the drinking after your done? Sorry I'm a real noob on this.

So that you have more adventures to use the next day.
 

icon315

Member
i never got that either :p, but if you want to do that before just change

in line 83
PHP:
eatdrink(fullness_limit(), 0, spleen_limit(), false);

to

PHP:
eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);
 
Top