Yellow Ray Consult script

kain

Member
So I've tired of fighting harem girls and dwarf miners and filthy hippies .... when I could just disintegrate them!

Attached is a combat consult script. It looks at a property called "_YOROIDS_target" for the particular monster to stasis/yellow ray.

Since I didn't really know how to insert this into FTF or SmartStasis, I also wrote a hack-y script to set the _YOROIDS_target variable and adventure in <location> until <goal> is satisfied. This is mostly-satisfactory ... but not 100%, because some goals can be dropped by multiple monsters. For example, you could get the mining outfit from EITHER a 7-foot dwarf or a 7-foot dwarf foreman ... and I don't know how to do that.

The yellowray.ash script is hack-y because you currently have to edit it to tell it what goal you're looking for and what area to adventure in to get it.

I'm sure this could simply and easily be tweaked into something polished and elegant, but for right now, it's working (for me, at least) so I thought I'd share.
 

Attachments

  • yellowray.ash
    1.6 KB · Views: 98
  • yoroids.ash
    1.2 KB · Views: 85

Bale

Minion
I'd probably solve the issue by having my consult script compare the drops of whatever monster I'm fighting to is_goal().

Code:
[COLOR="#808000"]> goal set outfit[/COLOR]

Condition set: miner's helmet
miner's helmet
Condition set: 7-Foot Dwarven mattock
miner's helmet
7-Foot Dwarven mattock
Condition set: miner's pants
miner's helmet
7-Foot Dwarven mattock
miner's pants
miner's helmet
7-Foot Dwarven mattock
miner's pants

[COLOR="#808000"]> ash is_goal($item[miner's pants])[/COLOR]

Returned: true
Then use that in the consult script something like this...

Code:
boolean yellow_ray = false;
foreach key in item_drops( foe )
   if(is_goal(key)) yellow_ray = true;
If you want to get fancy, you can have it only use a yellow ray if the monster drops at least 2 items that are goals. That will increase the consult script's generic utility. :D

Code:
boolean yellow_ray = false;
if (get_counters("Major Yellow Recharge", 0, 151) == "") {
   int item_goals = 0;
   foreach key in item_drops( foe )
      if(is_goal(key)) item_goals = item_goals + 1;
   yellow_ray = item_goals > 1;
}
Yeah, that's starting to look pretty good. Now you can just rewrite your entire script to make use of that boolean. ;)
 
Last edited:

kain

Member
Interesting use of "goal set outfit" ... I didn't know that existed!

I shall start a rewrite tomorrow, thanks for the tips/pointers.
 
Top