From f88481f0d1c7d4824b49244a90a2cbeb756f8e39 Mon Sep 17 00:00:00 2001 From: Erik Date: Tue, 14 Apr 2026 22:10:22 +0200 Subject: [PATCH] lockandkey: add chat feedback for portal summoning, fizzle retries, and queue status --- af/lockandkey.af | 28 +++++++++--- met/lockandkey.met | 110 +++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 124 insertions(+), 14 deletions(-) diff --git a/af/lockandkey.af b/af/lockandkey.af index 1367b90..4603432 100644 --- a/af/lockandkey.af +++ b/af/lockandkey.af @@ -78,6 +78,7 @@ STATE: {summon_primary} DO: SetState {death} IF: Always DO: DoAll + Chat {/a Summoning 125 Eaters portal...} Chat {/vt opt set enablecombat false} Chat {/ub face 180} DoExpr {setcombatstate[`magic`]} @@ -88,13 +89,18 @@ STATE: {summon_primary} ~~ Fizzle: retry cast IF: ChatMatch {Your spell fizzled.} DO: DoAll + Chat {/a Fizzled! Retrying 125 Eaters portal...} DoExpr {actiontrycastbyid[157]} SetState {summon_primary} ~~ Queue incoming tells while casting IF: ChatCapture {(^(\[[A-z]+?\] |)You|.*\[^\<]*)\>.+\<\\Tell\>) .*, ".*primary.*"$} {} - DO: DoExpr {setvar[queuePrimary, 1]} + DO: DoAll + Chat {/a Queued 125 Eaters portal, will summon shortly.} + DoExpr {setvar[queuePrimary, 1]} IF: ChatCapture {(^(\[[A-z]+?\] |)You|.*\[^\<]*)\>.+\<\\Tell\>) .*, ".*secondary.*"$} {} - DO: DoExpr {setvar[queueSecondary, 1]} + DO: DoAll + Chat {/a Queued Bellas portal, will summon shortly.} + DoExpr {setvar[queueSecondary, 1]} IF: SecsInStateGE 17 DO: SetState {summon_done} @@ -104,6 +110,7 @@ STATE: {summon_secondary} DO: SetState {death} IF: Always DO: DoAll + Chat {/a Summoning Bellas portal...} Chat {/vt opt set enablecombat false} Chat {/ub face 90} DoExpr {setcombatstate[`magic`]} @@ -114,22 +121,31 @@ STATE: {summon_secondary} ~~ Fizzle: retry cast IF: ChatMatch {Your spell fizzled.} DO: DoAll + Chat {/a Fizzled! Retrying Bellas portal...} DoExpr {actiontrycastbyid[2648]} SetState {summon_secondary} ~~ Queue incoming tells while casting IF: ChatCapture {(^(\[[A-z]+?\] |)You|.*\[^\<]*)\>.+\<\\Tell\>) .*, ".*primary.*"$} {} - DO: DoExpr {setvar[queuePrimary, 1]} + DO: DoAll + Chat {/a Queued 125 Eaters portal, will summon shortly.} + DoExpr {setvar[queuePrimary, 1]} IF: ChatCapture {(^(\[[A-z]+?\] |)You|.*\[^\<]*)\>.+\<\\Tell\>) .*, ".*secondary.*"$} {} - DO: DoExpr {setvar[queueSecondary, 1]} + DO: DoAll + Chat {/a Queued Bellas portal, will summon shortly.} + DoExpr {setvar[queueSecondary, 1]} IF: SecsInStateGE 17 DO: SetState {summon_done} STATE: {summon_done} ~~ Check queue: process next summon request or return to idle IF: Expr {testvar[queuePrimary]} - DO: SetState {summon_primary} + DO: DoAll + Chat {/a Processing queued 125 Eaters portal...} + SetState {summon_primary} IF: Expr {testvar[queueSecondary]} - DO: SetState {summon_secondary} + DO: DoAll + Chat {/a Processing queued Bellas portal...} + SetState {summon_secondary} IF: Always DO: SetState {idle} diff --git a/met/lockandkey.met b/met/lockandkey.met index d2babb9..b22b5e9 100644 --- a/met/lockandkey.met +++ b/met/lockandkey.met @@ -593,7 +593,11 @@ K V n n -5 +6 +i +2 +s +/a Summoning 125 Eaters portal... i 2 s @@ -674,7 +678,11 @@ K V n n +3 +i 2 +s +/a Fizzled! Retrying 125 Eaters portal... i 7 TABLE @@ -697,7 +705,7 @@ summon_primary i 28 i -7 +3 TABLE 2 k @@ -713,6 +721,19 @@ s c s +TABLE +2 +K +V +n +n +2 +i +2 +s +/a Queued 125 Eaters portal, will summon shortly. +i +7 TABLE 2 k @@ -729,7 +750,7 @@ summon_primary i 28 i -7 +3 TABLE 2 k @@ -745,6 +766,19 @@ s c s +TABLE +2 +K +V +n +n +2 +i +2 +s +/a Queued Bellas portal, will summon shortly. +i +7 TABLE 2 k @@ -790,7 +824,11 @@ K V n n -5 +6 +i +2 +s +/a Summoning Bellas portal... i 2 s @@ -871,7 +909,11 @@ K V n n +3 +i 2 +s +/a Fizzled! Retrying Bellas portal... i 7 TABLE @@ -894,7 +936,7 @@ summon_secondary i 28 i -7 +3 TABLE 2 k @@ -910,6 +952,19 @@ s c s +TABLE +2 +K +V +n +n +2 +i +2 +s +/a Queued 125 Eaters portal, will summon shortly. +i +7 TABLE 2 k @@ -926,7 +981,7 @@ summon_secondary i 28 i -7 +3 TABLE 2 k @@ -942,6 +997,19 @@ s c s +TABLE +2 +K +V +n +n +2 +i +2 +s +/a Queued Bellas portal, will summon shortly. +i +7 TABLE 2 k @@ -968,7 +1036,7 @@ summon_secondary i 26 i -1 +3 TABLE 2 k @@ -980,6 +1048,19 @@ s e s testvar[queuePrimary] +TABLE +2 +K +V +n +n +2 +i +2 +s +/a Processing queued 125 Eaters portal... +i +1 s summon_primary s @@ -987,7 +1068,7 @@ summon_done i 26 i -1 +3 TABLE 2 k @@ -999,6 +1080,19 @@ s e s testvar[queueSecondary] +TABLE +2 +K +V +n +n +2 +i +2 +s +/a Processing queued Bellas portal... +i +1 s summon_secondary s