• 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

Request - Proposed KissAssist Change: Mechanism To Allow Lua/React Scripting to Affect Conditions

SomeRandomDude

Well-known member
Joined
Jan 29, 2023
RedCents
208¢
Hi all. I'd like to propose that the following functionality be added to KissAssist. I've made and tested these changes and they work as I intended and I think other people may appreciate these changes. I'm sorry if there is a different mechanism for proposing KA changes, I'm not aware of what that is.

Purpose of the change: To allow Lua/React scripting to affect KA conditions. The point being that it would be handy to trigger spell casting from Lua/react, however, when there is a cast time involved then it is "dangerous" since KA may somewhat simultaneously decide to move, sit, cast, etc. This mechanism would allow KA to do the spell casting while Lua/react provides the logic for when to allow casting.

[CODE title="Here are the KA changes that I made locally"]#bind ForceCondition /forcecondition

| ----------------------------------------------------------------------------
| SUB: ForceCondition allows external scripting to force KA conditions
| Usage Examples:
| /noparse /forcecondition 1 "${Me.PctHPs} < 75"
| /forcecondition 1 "TRUE"
| ----------------------------------------------------------------------------
Sub Bind_ForceCondition(int condNum, string newValue)
/if (${condNum} < 1 || ${condNum} > ${Cond.Size}) {
/echo Bind_ForceCondition error: condNum ${condNum} is out of the range 1 .. ${Cond.Size}
/return
}
/if (${MacroQuest.Parser}!=2) {
/squelch /engine parser 2 noauto
/while (${MacroQuest.Parser}!=2) {
/delay 5
}
}
/varset Cond[${condNum}] ${Parse[1,${newValue}]}
/return
[/CODE]

Note that I'm a little bit of a noob on the scripting, so there may be a slightly better way to ensure that "Parse" is available, etc. I just copied the above from elsewhere in KA.

My test case to ensure that it worked was as follows:
1. I updated the above function to print all conditions every time I changed any of them.
2. Ran: /noparse /forcecondition 1 "${Me.WIS} > 500"
Note: I did WIS because I tested on an ENC and could easily affect my WIS with KEI (or the like).
3. Saw that the printed output for condition 1 was something like "632 > 500" (good because my WIS was 632 at the time)
4. Cast KEI (or some equivalent)
5. Did /forcecondition on a different condition index (to not affect my value assigned in step 2 above, but to force it to print)
6. Observed that condition 1 had something like "657 > 500"
So clearly the condition text was still storing the ${Me.WIS} since it was tracking with my WIS changes.

Note that this change allows for any sort of string to be applied to the condition, but mostly it makes sense to assign "TRUE" and "FALSE" (at least that's how I intend to use it). My purpose is so that I can easily implement a SK epic clicky rotation. The SK epic duration is shorter than the recast time, so I need to coordinate across multiple SKs to keep the buff on all the time.
 
Maybe a different way of looking at it, but this wouldn't require modifying Kiss.

You could add a global variable/timer in ingame.cfg (or as a start command for kiss).

[CODE title="ingame.cfg"]/if (!${Defined[doSkEpic]}) /declare doSkEpic timer global[/CODE]

Then in your kiss cond
[CODE title="kiss KConditions"]Cond1=${doSkEpic}[/CODE]

then you just do "/varset doSkEpic 30s" to trigger kiss to fire the epic.
 
Request - Proposed KissAssist Change: Mechanism To Allow Lua/React Scripting to Affect Conditions

Users who are viewing this thread

Back
Top
Cart