Priority in bounty.ash

mottsy

Member
Hey all:

I was wondering

Is it possible to assign either
1. priorities
or 2. go choose this, if it doesn't exist, then choose this and so on

for the use in bounty hunting (e.g castle in the clouds as first, if that isnt available, choose something with the least amount of items needed (i'm a spooky puttier)

i am aware of bounty.ash, so i am wondering how i would integrate something like the above into that.
 

Bale

Minion
I took a look at bounty.ash and it seems that

bounty smallest

will do what you want by choosing the bounty with the fewest items.

As for ensuring that it will always accept the castle in the clouds, even if there is one with fewer items, you'll need to add one line to accept_best_bounty:

Code:
boolean accept_best_bounty(boolean smallest) {
   int flag = 41;
   item chosen;
   for i from 2 downto 0 {
      [COLOR="Red"]if (bounty[bopts[i]].where == $location[Giant's Castle]) return accept_bounty(bopts[i]);[/COLOR]
      print("Checking bounty hunt possibility in " + bounty[bopts[i]].where + "...");
      if (can_has_bounty(bopts[i], my_defstat())) {
         if (smallest) {
            if (bounty[bopts[i]].amount < flag) {
               flag = bounty[bopts[i]].amount;
               chosen = bopts[i];
            }
         } else return accept_bounty(bopts[i]);
      } else print("Impossible! Skipping...");
   }
   if (smallest) return (can_adv(bounty[chosen].where,true) && accept_bounty(chosen));
   return false;
}
 

mottsy

Member
I think i may have put it in the wrong place
im new to scripting so please give me a break

** i have also put in the error i got as well as where i put the bounty pref that bale suggested
 

Attachments

  • BaleBounty.txt
    12.3 KB · Views: 73
  • error.txt
    8.1 KB · Views: 54

Spiny

Member
I think i may have put it in the wrong place
im new to scripting so please give me a break

** i have also put in the error i got as well as where i put the bounty pref that bale suggested

The biggest problem that I see is that it seems that you're using an old version of bounty.ash and Bale's modifications were for the latest version of the script. The other problem is that the script should be saved as .ash, not .txt. Check out post #89 on this page. Then make the adjustments Bale suggested and see if that works any better.

Edit: Do note that you'll need a copy of canadv.ash to get Zarqon's version of bounty.ash to work.
 
Last edited:

Heffed

Member
I was entertaining the thought that it was caught in some sort of forum wormhole. It was posted on an entirely different forum and by some quirk of time and space it ended up here. ;)
 

mottsy

Member
I was entertaining the thought that it was caught in some sort of forum wormhole. It was posted on an entirely different forum and by some quirk of time and space it ended up here. ;)

My threads use the latest wormhole technologies
 
bounty.ash has a usage function built into it. I you call bounty.ash and leave the input box blank you will see some other options as well:

bounty.ash {COUNT|*}
bounty.ash list
bounty.ash accept {best|small|easy|1|normal|2|hard|3}
bounty.ash abort
 

ki77bot

Member
Something changed with the latest updates of zlib, ftf and/or SmartStasis. bounty.ash searches for bounty-hunts not available on that day (I had the same error yesterday...meaning the script was looking for the same hunt yesterday...

Code:
> bounty.ash *

Checking bounty hunt possibility in Spooky Forest...
Accepting the hunt for 3 triffid barks...
Bounty hunt failed.

It is probably some flag I have to set in either of the above-mentioned files or one of the data-files...

Any ideas?

Cheers ki77bot

---

edit:
argl, well I did NOT use the latest daily build...works again fine now!
 
Last edited:

Teel

New member
How does one script the choice of smallest into their mafia?

Would you do:
call bounty.ash accept small or
call bounty.ash smallest or
something else altogether?

Thank you.
 

Bazaaretw

Member
[11822] Fernswarthy's Ruins
Encounter: Weretaco
Strategy: C:\Documents and Settings\Compaq_Owner.YOUR-D0F670B45A\Desktop\KOL Mafia\ccs\default.ccs [default]
Round 0: bazaaretw wins initiative!
1/6 monsters dropping 1 goals.
This monster drops all your remaining goals!
Round 1: bazaaretw uses the Spooky Putty sheet!
You acquire an item: Spooky Putty monster
You gain 42 Meat
You acquire an item: taco shell
You acquire an item: uncooked chorizo
You acquire an item: wilted lettuce
You gain 2 Strongness
You gain 1 Wizardliness
You gain 2 Cheek

Request 9 of 100 (Tower: Fernswarthy's Ruins) in progress...

[11823] Fernswarthy's Ruins
Encounter: Brainsweeper
Strategy: C:\Documents and Settings\Compaq_Owner.YOUR-D0F670B45A\Desktop\KOL Mafia\ccs\default.ccs [default]
Round 0: bazaaretw wins initiative!
1/6 monsters dropping 1 goals.
Round 1: bazaaretw attacks!
You gain 43 Meat
You acquire an item: disembodied brain
You gain 3 Strongness
You gain 1 Mysteriousness
You gain 2 Roguishness



I have no idea what this is about, I choose to accept the smallest bounty, then choose to adv with an arbitrary amount of adventures, so it putties the monster but doesn't use the putty? whats up with that? did I do something incorrectly?
 
Top