rpherbig / dr-scripts

A series of Lich 5 (https://github.com/elanthia-online/lich-5) scripts for use with DragonRealms (http://www.play.net/dr/). Donations are welcome (http://www.paypal.me/rcuhljr)!
GNU General Public License v2.0
53 stars 178 forks source link

Appraisal.lic Appraise focus with OM running #3836

Closed Windamere closed 5 years ago

Windamere commented 5 years ago

Hit a snag with the new update Appraise focus

Needs a catch for running scripts like OM that interfere with research.

@no_use_scripts = settings.appraisal_no_use_scripts (probably needs a yaml addition as well)

return if @no_use_scripts.any? { |name| Script.running?(name)

Things like zills, summoning, outdoors, and athletics shouldn't affect it, but any magic skills or locksmithing causes it to break..

jbrock24 commented 5 years ago

This pauses and waits for the script to finish. Are you running those other scripts during this?

jbrock24 commented 5 years ago

What you're asking for will only not run the appraisal if those things aren't running, but if they are run while appraisal is running, it will still break it. Every script would have to be changed to avoid running while appraisal is running.

drgabellia commented 5 years ago

I'm the one that prompted this.....I have a script that runs in the background that keeps my OM orb full via harnessing when it drops to a certain threshold. If it harnesses during appraisal focus it stops the focus. I was looking for a way to either pause or stop my harness script during ;appraisal focus.

rcuhljr commented 5 years ago

It's probably easier to change the background script to just not execute while appraisal is running. The sanowret crystal script should be a good example of this.

drgabellia commented 5 years ago

I would be happy to amend my script to not execute while appraisal is running. Unfortunately, even after looking at the sanowret crystal script I do not know how to do this.

Tarhish commented 5 years ago

I could take a look, but for an OM maintaining script it might be just adding an unless Script.running?('appraisal') at the end of whatever line is actually doing the harnessing.

Like, focus_orb(blahblah) unless Script.running?('appraisal')

Sarvatt commented 5 years ago

share it on slack, i'm sure a bunch of us will help. it's not a script in dr-scripts so its not really an issue here to be honest. What Tarhish said is all you need to add :)

Tarhish commented 5 years ago

She ran it by me just a little bit earlier, and it turns out some enterprising soul had already added a no_use_almanac list += an array of a couple other scripts, so in the end it was even easier. I just plopped it onto the end of the array. I have a feeling this script has been passed around a few times. 😄

drgabellia commented 5 years ago

More than a few, I think! Thank you again for your help, Tarhish. It's working great!

jbrock24 commented 5 years ago

@Windamere Can you close this please? Thanks!