add stipend backoff timer to prevent repeated stipend attempts when server lies about quest readiness
Some checks failed
/ test (push) Failing after 18s

This commit is contained in:
Erik 2026-04-06 13:57:13 +02:00
parent b50a96957b
commit 67be466cdf
4 changed files with 234 additions and 6 deletions

View file

@ -64,6 +64,8 @@ STATE: {hunt} ~~ {
DO: DoAll DO: DoAll
DoExpr {setvar[serviceClock,stopwatchcreate[]]} DoExpr {setvar[serviceClock,stopwatchcreate[]]}
DoExpr {stopwatchstart[getvar[serviceClock]]} DoExpr {stopwatchstart[getvar[serviceClock]]}
IF: Not Expr {testvar[stipendBackoffSeconds]}
DO: DoExpr {setvar[stipendBackoffSeconds, 86400]}
IF: Death IF: Death
DO: DoAll DO: DoAll
Chat {/a I died! But I will comeback!} Chat {/a I died! But I will comeback!}
@ -289,6 +291,9 @@ STATE: {service_decide} ~~ {
DoExpr {clearvar[bellaBackoffClock]} DoExpr {clearvar[bellaBackoffClock]}
IF: All IF: All
Expr {getqueststatus[`stipendtimer_0812`]==1} Expr {getqueststatus[`stipendtimer_0812`]==1}
Not All
Expr {testvar[stipendBackoffClock]}
Expr {stopwatchelapsedseconds[getvar[stipendBackoffClock]]<getvar[stipendBackoffSeconds]}
DO: SetState {service_stipend} DO: SetState {service_stipend}
IF: All IF: All
Expr {getvar[disableAugmentServices]!=1} Expr {getvar[disableAugmentServices]!=1}
@ -316,6 +321,8 @@ STATE: {service_stipend} ~~ {
Chat {/vt opt set enablecombat false} Chat {/vt opt set enablecombat false}
Chat {/vt opt set enablelooting false} Chat {/vt opt set enablelooting false}
Chat {/vt opt set enablenav true} Chat {/vt opt set enablenav true}
DoExpr {setvar[stipendBackoffClock, stopwatchcreate[]]}
DoExpr {stopwatchstart[getvar[stipendBackoffClock]]}
DoExpr {touchvar[stipendNavLoaded]} DoExpr {touchvar[stipendNavLoaded]}
EmbedNav nav0__stipend_nav {stipend.nav} EmbedNav nav0__stipend_nav {stipend.nav}
IF: All IF: All

View file

@ -94,6 +94,8 @@ STATE: {Default} ~~ {
DO: DoExpr {setvar[bellaJawRunRecoverAttempts, 0]} DO: DoExpr {setvar[bellaJawRunRecoverAttempts, 0]}
IF: Not Expr {testvar[bellaBackoffSeconds]} IF: Not Expr {testvar[bellaBackoffSeconds]}
DO: DoExpr {setvar[bellaBackoffSeconds, 86400]} DO: DoExpr {setvar[bellaBackoffSeconds, 86400]}
IF: Not Expr {testvar[stipendBackoffSeconds]}
DO: DoExpr {setvar[stipendBackoffSeconds, 86400]}
IF: Not Expr {testvar[serviceCheckInterval]} IF: Not Expr {testvar[serviceCheckInterval]}
DO: DoExpr {setvar[serviceCheckInterval, 43200]} DO: DoExpr {setvar[serviceCheckInterval, 43200]}
IF: Not Expr {testvar[serviceClock]} IF: Not Expr {testvar[serviceClock]}
@ -362,6 +364,9 @@ STATE: {service_decide} ~~ {
DoExpr {clearvar[bellaBackoffClock]} DoExpr {clearvar[bellaBackoffClock]}
IF: All IF: All
Expr {getqueststatus[`stipendtimer_0812`]==1} Expr {getqueststatus[`stipendtimer_0812`]==1}
Not All
Expr {testvar[stipendBackoffClock]}
Expr {stopwatchelapsedseconds[getvar[stipendBackoffClock]]<getvar[stipendBackoffSeconds]}
DO: SetState {service_stipend} DO: SetState {service_stipend}
IF: All IF: All
Expr {getvar[disableAugmentServices]!=1} Expr {getvar[disableAugmentServices]!=1}
@ -390,6 +395,8 @@ STATE: {service_stipend} ~~ {
Chat {/vt opt set enablecombat false} Chat {/vt opt set enablecombat false}
Chat {/vt opt set enablelooting false} Chat {/vt opt set enablelooting false}
Chat {/vt opt set enablenav true} Chat {/vt opt set enablenav true}
DoExpr {setvar[stipendBackoffClock, stopwatchcreate[]]}
DoExpr {stopwatchstart[getvar[stipendBackoffClock]]}
DoExpr {touchvar[stipendNavLoaded]} DoExpr {touchvar[stipendNavLoaded]}
EmbedNav nav1__stipend_nav {stipend.nav} EmbedNav nav1__stipend_nav {stipend.nav}
IF: All IF: All

View file

@ -11,7 +11,7 @@ n
n n
n n
n n
224 225
i i
1 1
i i
@ -216,6 +216,43 @@ stopwatchstart[getvar[serviceClock]]
s s
hunt hunt
i i
21
i
7
TABLE
2
K
V
n
n
1
i
26
TABLE
2
k
v
n
n
1
s
e
s
testvar[stipendBackoffSeconds]
TABLE
2
k
v
n
n
1
s
e
s
setvar[stipendBackoffSeconds, 86400]
s
hunt
i
8 8
i i
3 3
@ -2820,7 +2857,7 @@ K
V V
n n
n n
1 2
i i
26 26
TABLE TABLE
@ -2834,6 +2871,50 @@ s
e e
s s
getqueststatus[`stipendtimer_0812`]==1 getqueststatus[`stipendtimer_0812`]==1
i
21
TABLE
2
K
V
n
n
1
i
2
TABLE
2
K
V
n
n
2
i
26
TABLE
2
k
v
n
n
1
s
e
s
testvar[stipendBackoffClock]
i
26
TABLE
2
k
v
n
n
1
s
e
s
stopwatchelapsedseconds[getvar[stipendBackoffClock]]<getvar[stipendBackoffSeconds]
s s
service_stipend service_stipend
s s
@ -3044,7 +3125,7 @@ K
V V
n n
n n
5 7
i i
2 2
s s
@ -3069,6 +3150,32 @@ n
s s
e e
s s
setvar[stipendBackoffClock, stopwatchcreate[]]
i
7
TABLE
2
k
v
n
n
1
s
e
s
stopwatchstart[getvar[stipendBackoffClock]]
i
7
TABLE
2
k
v
n
n
1
s
e
s
touchvar[stipendNavLoaded] touchvar[stipendNavLoaded]
i i
4 4

View file

@ -11,7 +11,7 @@ n
n n
n n
n n
302 303
i i
20 20
i i
@ -873,6 +873,43 @@ n
s s
e e
s s
testvar[stipendBackoffSeconds]
TABLE
2
k
v
n
n
1
s
e
s
setvar[stipendBackoffSeconds, 86400]
s
Default
i
21
i
7
TABLE
2
K
V
n
n
1
i
26
TABLE
2
k
v
n
n
1
s
e
s
testvar[serviceCheckInterval] testvar[serviceCheckInterval]
TABLE TABLE
2 2
@ -3620,7 +3657,7 @@ K
V V
n n
n n
1 2
i i
26 26
TABLE TABLE
@ -3634,6 +3671,50 @@ s
e e
s s
getqueststatus[`stipendtimer_0812`]==1 getqueststatus[`stipendtimer_0812`]==1
i
21
TABLE
2
K
V
n
n
1
i
2
TABLE
2
K
V
n
n
2
i
26
TABLE
2
k
v
n
n
1
s
e
s
testvar[stipendBackoffClock]
i
26
TABLE
2
k
v
n
n
1
s
e
s
stopwatchelapsedseconds[getvar[stipendBackoffClock]]<getvar[stipendBackoffSeconds]
s s
service_stipend service_stipend
s s
@ -3857,7 +3938,7 @@ K
V V
n n
n n
5 7
i i
2 2
s s
@ -3882,6 +3963,32 @@ n
s s
e e
s s
setvar[stipendBackoffClock, stopwatchcreate[]]
i
7
TABLE
2
k
v
n
n
1
s
e
s
stopwatchstart[getvar[stipendBackoffClock]]
i
7
TABLE
2
k
v
n
n
1
s
e
s
touchvar[stipendNavLoaded] touchvar[stipendNavLoaded]
i i
4 4