Natarm2006-06-29 04:27:41
Ok, so I'm posting this here so I can have someone look at it...I need advice. I seem to be having trouble getting variables switching from 0 to 1, using afflict lines as triggers. Following is a general idea how my system is set up. If its totally fubar...well, I'd appreciate the help.
Herb/Salve/Elixir Aliases
outr 1 Galingale
eat 1 Galingale
herbbalance=0.5
#alarm +2 {#if @herbbalance="0.5" {herbbalance=1}}
Curing Code
#if (@Asleep=0 and @Unconcious=0 and @Anorexia=0 and @SlitThroat=0) {#if @Crotamine=1}{Antidote}{#if @Scalping=1}{Sanguine}{#if @BlackLung=1}{MelChest}{#if @Vomitting=1}{Choleric}{#if @Worms=1}{Choleric}{#if @Dysentery=1}{Choleric}{#if @LoversCurse=1}{Choleric}{#if @Hypersomnia=1}{Choleric}
Afflict Code Triggers (Resetting Afflict Variable to zero is done basically the same way but with UnAfflict lines)
#trigger {You are stunned by a vision of divine astral beings.} {#var @Hallucinate = 1}
Any help is appreciated.
Herb/Salve/Elixir Aliases
outr 1 Galingale
eat 1 Galingale
herbbalance=0.5
#alarm +2 {#if @herbbalance="0.5" {herbbalance=1}}
Curing Code
#if (@Asleep=0 and @Unconcious=0 and @Anorexia=0 and @SlitThroat=0) {#if @Crotamine=1}{Antidote}{#if @Scalping=1}{Sanguine}{#if @BlackLung=1}{MelChest}{#if @Vomitting=1}{Choleric}{#if @Worms=1}{Choleric}{#if @Dysentery=1}{Choleric}{#if @LoversCurse=1}{Choleric}{#if @Hypersomnia=1}{Choleric}
Afflict Code Triggers (Resetting Afflict Variable to zero is done basically the same way but with UnAfflict lines)
#trigger {You are stunned by a vision of divine astral beings.} {#var @Hallucinate = 1}
Any help is appreciated.
Unknown2006-06-29 06:49:47
Copy right infringement on the title of this thread. You stole my thread title!
But yea... you are on the right path to make a basic system.
Can you be more specific on what sort of trouble you are having?
But yea... you are on the right path to make a basic system.
Can you be more specific on what sort of trouble you are having?
Soll2006-06-29 08:20:51
#trigger {You are stunned by a vision of divine astral beings.} {#var @Hallucinate = 1}
You're referencing variables wrong. You need this:
#trigger {You are stunned by a vision of divine astral beings.} {#var Hallucinate 1}
or
#trigger {You are stunned by a vision of divine astral beings.} {Hallucinate=1}
---
For the alias, you need to include as many closing parenthesis as #if statements.
#if (@Asleep=0 and @Unconcious=0 and @Anorexia=0 and @SlitThroat=0) {#if @Crotamine=1}{Antidote}{#if @Scalping=1}{Sanguine}{#if @BlackLung=1}{MelChest}{#if @Vomitting=1}{Choleric}{#if @Worms=1}{Choleric}{#if @Dysentery=1}{Choleric}{#if @LoversCurse=1}{Choleric}{#if @Hypersomnia=1}{Choleric}}}}}}}}}
You're referencing variables wrong. You need this:
#trigger {You are stunned by a vision of divine astral beings.} {#var Hallucinate 1}
or
#trigger {You are stunned by a vision of divine astral beings.} {Hallucinate=1}
---
For the alias, you need to include as many closing parenthesis as #if statements.
#if (@Asleep=0 and @Unconcious=0 and @Anorexia=0 and @SlitThroat=0) {#if @Crotamine=1}{Antidote}{#if @Scalping=1}{Sanguine}{#if @BlackLung=1}{MelChest}{#if @Vomitting=1}{Choleric}{#if @Worms=1}{Choleric}{#if @Dysentery=1}{Choleric}{#if @LoversCurse=1}{Choleric}{#if @Hypersomnia=1}{Choleric}}}}}}}}}
Unknown2006-06-29 10:47:20
Oh yea, didn't notice that because I just looked over it real fast, didn't think to check his syntax, just thought he was asking if that's how you'd do it.
Just wanted to post about the title, and then felt bad that I didn't add anything useful so I edited my post, heheh.
Just wanted to post about the title, and then felt bad that I didn't add anything useful so I edited my post, heheh.
Unknown2006-06-29 13:06:01
It doesn't look like you have spaces between blocks of code, either. You need to break your curly brackets up with spaces. Also, you have some things in the wrong place entirely, such as "#if @Crotamine=1}" where you should either have a curly bracket before @Crotamine or get rid of the trailing bracket (or use parentheses, which is always my preference).
As an aside, I'd like to point out that melancholic isn't an elixir any more and shouldn't be grouped with these other purgatives. It should be in your salve curing alias now.
CODE
#if (@Asleep=0 and @Unconscious=0 and @Anorexia=0 and @SlitThroat=0) {#if (@Crotamine=1) {Antidote} {#if (@Scalping=1) {Sanguine} {#if (@BlackLung=1) {MelChest} {#if (@Vomiting=1) {Choleric} {#if (@Worms=1) {Choleric} {#if (@Dysentery=1) {Choleric} {#if (@LoversCurse=1) {Choleric} {#if (@Hypersomnia=1) {Choleric}}}}}}}}}
As an aside, I'd like to point out that melancholic isn't an elixir any more and shouldn't be grouped with these other purgatives. It should be in your salve curing alias now.
Natarm2006-06-29 18:16:18
Yeah, I got the variable problem solved. I'll need to go back and edit the spacing and brackets. As it stands now, though, it seems like my major issue is that its not accepting the OUTR and EAT commands out of my herb aliases. And I also slipped melancholic into its proper place in the salve queue. Silly newb mistakes on my part with the syntax, but thats what I get for trying to code in a language that I know absolutely NOTHING about the syntax, and simply tried to learn by reading how others do their code =p
Natarm2006-06-30 22:14:05
Ok, so I've made some progress. All the variables are firing right, and all the curing script is working right up until I get to the stage of actually eating/smoking said cure. Herbs outrift and pipes light fine, but eating/smoking are just giving me the "Brilliant!" message, like I'm sending an invalid command. Any suggestions?
Unknown2006-06-30 22:28:55
Use "eat galingale" rather than "eat 1 galingale". You can't eat numbers of things.
Natarm2006-07-01 01:03:37
Yeah. I realised that. Needlessto say, the script now actually runs. I'm having a few other probelms with it, but I'll get the kinks worked out.