• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - Anyone feel like fixing my holy code? :)

Joined
Mar 24, 2018
RedCents
5,569¢
I am not a coder so I figured out how to make this by reading others and asking a few questions and generally being a smarty pants. But it didn't actually work, so not smart enough! My goal is to have the 3 disciplines I like to use get cycled during a named fight, and during none named, just one of them get used.

holyshit0=/if (${Me.Combat} && ${Me.CombatAbilityReady[${Spell[Last Stand Discipline].RankName}]} && (${Target.Named} || ${Me.XTarget}>4)) /multiline ; /stopdisc ; /timed 5 ; /disc Last Stand Discipline ; /echo Last Stand Engaging

holyshit1=/if (${Me.Combat} && ${Me.CombatAbilityReady[${Spell[Fortitude Discipline].RankName}]} && ${Target.Named} && !${Me.CombatAbilityReady[${Spell[Last Stand Discipline].RankName}]} && ${If[${Me.ActiveDisc.Name.Find[Stand]},TRUE,FALSE]}) /multiline ; /stopdisc ; /timed 5 ; /disc Fortitude Discipline ; /echo Fortitude Engaging

holyshit2=/if (${Me.Combat} && ${Me.CombatAbilityReady[${Spell[Stout Defense].RankName}]} && !${Target.Named} || !${Me.CombatAbilityReady[${Spell[Last Stand Discipline].RankName}]} && !${Me.CombatAbilityReady[${Spell[Fortitude Discipline].RankName}]}) /multiline ; /disc Stout Defense ; /echo Stout Defense


So the first one, it checks for named or lots of mobs (I put that part in brackets but not even sure if I should have), and then if so, it runs stopdisc (to get rid of any lesser discs active, then engages my uber Last Stand.
Step 2, the idea is to not run this unless the Last Stand has expired, so it checks for nameds, checks for last stand, again removes my weaker disc if that is active, then engages Fortitude.
Step 3, if not a named, so on 99% of the stuff I fight, then use this general disc (Stout Defense). OR, if the other two discs are down, run this one.

Sounds convoluted but it makes sense in my head. I just gotta work out how to code it. I tested it on a noob named and it engaged Last Stand for 2 seconds then disabled it and did nothing else. I figured I could get this to work if I kept trial and error-ing it, but if any helpful coders here felt like saving me a job, please go ahead :)
 
Issue but not an issue - ${Me.Combat} is already checked as a holyshit will only fire if ${Me.Combat} is true.

Problem code -
Rich (BB code):
/timed 5 ; /disc Last Stand Discipline ;
is wrong. The /timed command does not get it's own line, remove the ; between the command and the timed portion.
Rich (BB code):
/timed ## /command
, in this case,
Rich (BB code):
/timed 5 /disc Last Stand Discipline ;

Again with
Rich (BB code):
/timed 5 ; /disc Fortitude Discipline ;
Should be
Rich (BB code):
/timed 5 /disc Fortitude Discipline ;

Bracketing on the holy's appears fine.

Possible issue - Once you create a holyshit you must also create a holyflag for each holy/down you create. This is done by making

Holyflag#=1/0

For the above you need

Holyflag0=1
holyflag1=1
holyflag2=1

where 1 is on, 0 is off. I don't know if you have that already or not, so including as a potential issue.

Verify your conditions are valid in the situations you want them to be valid in. Target a named mob. then /echo your entire condition for the holyshit, see if the output is what you expect it to be.

What I read is that if last stand is ready and you have a named, or last stand is ready and you have more than 4 things on XTarget, you want to stop a disc, and then fire last stand discipline, followed by echoing that you're using last stand.

if your Fortitude disc is up, and the target is named and the last stand isn't ready and if the active disc doesn't have the word "stand" in the name, then you want to stop disc, fire Fortitude and echo that you turned on fortitude.

and finally, if stout defense is ready and the target IS NOT named, OR Last Stand is not ready and Fortitude disc isn't ready (both the ones from previous two holys) then you want to fire stout defense and echo that you are doing so.

Sounds good to me.
 
Also, using /timed in this way can cause issues and you'll want to be careful how you use it.

What is the timed command.

The timed command will say hey, in ## time I want you to do something for me, but until you do, go ahead and keep looking at other code.

An example.

Rich (BB code):
/timed 10 /echo Hi
/timed 5 /echo Don't you hi me. 
/echo I do what I want.

In this case, I do what I want will come first, followed by don't you hi me. and finally the echo for hi.

I just wanted to make sure you understand what that was doing.

Another thing I see as a potential issue.

You check to see if both of the previous abilities are down, but don't verify you don't currently have an active disc before trying to fire stout defense, which undoubtedly will spam you. add an && !${Me.ActiveDisc.ID} to the end of both sides of your or statement which would be the same as the following.

Rich (BB code):
(!${Me.ActiveDisc.ID} && (${Me.Combat} && ${Me.CombatAbilityReady[${Spell[Stout Defense].RankName}]} && !${Target.Named} || !${Me.CombatAbilityReady[${Spell[Last Stand Discipline].RankName}]} && !${Me.CombatAbilityReady[${Spell[Fortitude Discipline].RankName}]}))
I believe.
 
${Me.Combat} is when your auto attack is on, holyshits only are checked when melee is on, so dont need that part. could change it to combat state and a check for mobs being in range so you dont fire it like when named is 500 feet out


starting with the last one first
Rich (BB code):
holyshit2=/if (${Me.CombatAbilityReady[Stout Defense]} !${Me.ActiveDisc.ID}) /multiline ; /disc Stout Defense ; /echo Stout Defense
We dont care what target we fight, we only care about there being activediscs and our disc to be ready.

Rich (BB code):
holyshit 1=/if (${Target.Named} && ${Me.CombatAbilityReady[Fortitude Discipline]} && !${Me.CombatAbilityReady[Last Stand Discipline]} && ${Bool[${Me.ActiveDisc.Name.Find[Stand]}]}) /multiline ; /stopdisc ; /timed 2 /disc Fortitude Discipline ; /echo Fortitude Engaging
fixed the code up a bit, and made sure /timed 2 /disc is properly called.

Rich (BB code):
holyshit0=/if (${Me.CombatAbilityReady[Last Stand Discipline]} && (${Target.Named} || ${Me.XTarget}>4)) /multiline ; /stopdisc ; /timed 2 /disc Last Stand Discipline ; /echo Last Stand Engaging
and same here, fixed code a bit and fixed timed call

i believe this should work

i dun goofed i removed all the dumb spell things i shouldnt have.
 
Awesome thanks!!! I previously had just the disciplines in kiss and it was ok, but if I was fighting some trash and then a named shows up, it wouldn't update the discipline. Then I saw the /stopdisc thing and figured this would be nice to always check on each target. Thanks again! I should have a pretty uber ini to post once I get to 110.
 
Rich (BB code):
holyshit2=/if (${Me.CombatAbilityReady[Stout Defense]} && !${Me.ActiveDisc.ID}) /multiline ; /disc Stout Defense ; /echo Stout Defense
In Kaen's example, he was missing the && between the first check and the second check. Also, checking to ensure the others are down, or the target is named seems like a logical check to me. This way if it checks holyshit2 and the first disc is down, but the second one is up it won't use the endurance to start the stout defense disc just to check holyshit1 on the next series of checks and stop the disc you just used endurance to start another disc. I thought the line of thought was well done from the original post, just some syntax issues that might have been breaking things.

I'm not sure I understand the point in a bool wrapper for this
Rich (BB code):
${Bool[${Me.ActiveDisc.Name.Find[Stand]}]}
entirely. When you use the Find feature on a string, if it is found it will return the index where it is found. In the case of Last Stand Discipline, it would find Stand at 6, which is the character count where the substring starts. 6 is a valid return to report true as it is a non-negative int value. Another thing you could do instead is compare the actual ID, which will use fewer resources/time to consider. While we're only talking milliseconds, those add up when you start providing more and more holyshits/downshits. My Berserker, for example, has 32 holyshits. There is a delay from the time the first holy is completed and the last holy is completed for this reason. Reducing the amount of strain is always a preference. So while the bool wrapper isn't wrong, it isn't required that I know of. If I am mistaken I welcome the criticism
 
Thanks! I ran outta thanks clickies but it is appreciated :dance:

With all the suggestions it looks like this:

holyshit0=/if (${Me.CombatAbilityReady[Last Stand Discipline]} && (${Target.Named} || ${Me.XTarget}>4)) /multiline ; /stopdisc ; /timed 2 /disc Last Stand Discipline ; /echo Last Stand Engaging
holyshit1=/if (${Target.Named} && ${Me.CombatAbilityReady[Fortitude Discipline]} && !${Me.CombatAbilityReady[Last Stand Discipline]}) /multiline ; /stopdisc ; /timed 2 /disc Fortitude Discipline ; /echo Fortitude Engaging
holyshit2=/if (${Me.CombatAbilityReady[Stout Defense]} && (!${Target.Named} || !${Me.ActiveDisc.ID})) /multiline ; /disc Stout Defense ; /echo Stout Defense
 
Question - Anyone feel like fixing my holy code? :)

Users who are viewing this thread

Back
Top
Cart