Priority Curing

by Unknown

Back to Mechanic's Corner.

Unknown2006-06-17 01:12:16
Hail again, all! I'm just gonna make this short.

How do you set up Diag curing based on Priorities? I need to know this. Thanks!

-Ryld
Unknown2006-06-17 01:23:39
I believe you would have it work like so. You diagnose. You have claustrophobia, anorexia, confusion, and dizzyness. When you diagnose, you have a script that looks at all the thingies you have, and sets variables to 1 if you have the affliction. In this case, when you diagnose, you will then have claustrophobia, anorexia, confusion and dizzyness all set to 1, with everything else at 0. After you diagnose, the script then will then do a cure alias or something similar. This alias goes down a list of all the afflictions on the line, curing them if they equal 1. You write this list in the order you want things cured. Obviously, anorexia is an important one to have cured first, while claustophobia is a 'what the heck, who cares' one and is somewhere at the end. The curing alias would go through and cure each thing you had. However, you also have to have an herb-balance checker as well, otherwise you would eat (in this case) three herbs at once. This herb-balance checker would set another variable to 0 if you ate an herb, and 1 once you regain herb balance. This herb-balance thingie should probably also call the cure-list alias at the end, so you don't have to re-diagnose every time you regain herb balance in order to start it over again.

This is just how I imagine it would be done, from reading other people's posts on how to make systems and priority queus, and my own common sense reasoning of the problem. However, I don't know how feasable such a system would be in Nexus. Something like this is fairly resource intensive, what with the long lists of affliction variables, long curing aliases, and other such things. It simply might be too much for Nexus to handle at reasonable playing speeds. Sure, it can cure you, but you will be long dead from damage by the time it actually gets around to it. MAYBE. If I can find time to actually write something up, maybe I can test it someday.
Unknown2006-06-17 02:07:37
ugh... Shiri, where are you and your Godly coding instincts?
Shiri2006-06-17 02:21:46
I suck at coding actually, I just play around with Nexus a lot. tongue.gif

I'll get back to this later, but I gotta go now!
Mirk2006-06-17 04:33:29
Please note that I didn't really make it out completly, you'll have to fill in some of the blanks yourself, and I didn't really prioritize it...
Also, please note that I'm not a great coder, and probably have made some mistakes, and probably made it longer than neccesary...
Also, I'm not really into combat, and can't tell you what cures what off the top of my head
CODE

alias: diag (please note, while using this, if you just wanted to use diagnose, you'd have to use #send diag, or diagnose, and will be needed to start the curing system)
group: autocure
code:
#set totalafflict 0
#set daydreaming 0
#set puncturedaura 0
and so on for each affliction, this essentialy resets your curing system, so if you have it set to catch afflictions from the game, I'm guessing it would help against people who use illusions.
#groupon diagnosing
diag
cure0 (new alias, listed below)

alias: cure0
group: autocure
code:
#groupoff diagnosing
#if $paralyzed = 1 {
#if $impatient = 1 {focus mind, or if you're feeling lucky, a pipe with whatever cures impatience and hope it's lit}  (will diagnose work if you're impatient and paralyzed?)
}else {
autoherb
autovialcure

alias: autoherb
group: autocure
code:
#if $herbafflict = 0 {#wait 500; autoherb
} elsif $herbbalance = 0 {#wait 500; autoherb
} else {
#if anorexic = 0 {
#if $puncturedaura = 1 {outr reishi; eat reishi; #set puncturedaura 0}
} elsif {another affliction, proceeded by any restrictions in use of it, and so on, until your done, at which point, you use } on seperate lines until nexus likes it

and that's pretty much the same for stuff that requires sip and salve balance

other triggers you would need

trigger: You may eat or smoke another herb (that may be incorrect...)
group: autocure
code:
#set herbbalance 1

trigger {<} anorexic {>}
group: diagnosing
#set anorexic 1

trigger: {<} whatever the affliction line for anorexia is {>}
group: autocure
#set anorexic 1

I hope this helps...

note: I think ; works as a line seperator, Shiri posted it somewhere, so if the ; doesn't work, just take those out and seperate them by lines.
Shiri2006-06-18 06:08:38
>> is the line seperator, not ;.
Unknown2006-06-18 10:54:09
QUOTE
alias: diag (please note, while using this, if you just wanted to use diagnose, you'd have to use #send diag, or diagnose, and will be needed to start the curing system)
group: autocure
code:
#set totalafflict 0
#set daydreaming 0
#set puncturedaura 0
and so on for each affliction, this essentialy resets your curing system, so if you have it set to catch afflictions from the game, I'm guessing it would help against people who use illusions.
#groupon diagnosing
diag
cure0 (new alias, listed below)

alias: cure0
group: autocure
code:
#groupoff diagnosing
#if $paralyzed = 1 {
#if $impatient = 1 {focus mind, or if you're feeling lucky, a pipe with whatever cures impatience and hope it's lit} (will diagnose work if you're impatient and paralyzed?)
}else {
autoherb
autovialcure


alias: autoherb
group: autocure
code:
#if $herbafflict = 0 {#wait 500; autoherb
} elsif $herbbalance = 0 {#wait 500; autoherb
} else {
#if anorexic = 0 {
#if $puncturedaura = 1 {outr reishi; eat reishi; #set puncturedaura 0}
} elsif {another affliction, proceeded by any restrictions in use of it, and so on, until your done, at which point, you use } on seperate lines until nexus likes it

and that's pretty much the same for stuff that requires sip and salve balance

other triggers you would need

trigger: You may eat or smoke another herb (that may be incorrect...)
group: autocure
code:
#set herbbalance 1

trigger {<} anorexic {>}
group: diagnosing
#set anorexic 1

trigger: {<} whatever the affliction line for anorexia is {>}
group: autocure
#set anorexic 1


o.O Holy crap!! Okay. I'll get started on this, REALLY quick! Thanks for the help, Mirk! WOOHOOO!