allow to set lootTime and mobsClose on login
All checks were successful
/ test (push) Successful in 21s

This commit is contained in:
Johan Lundberg 2025-04-10 00:35:05 +02:00
parent 41665df304
commit f3b1e1b841
2 changed files with 148 additions and 13 deletions

16
bore.af
View file

@ -79,10 +79,18 @@ STATE: {hunt} ~~ {
DO: DoAll DO: DoAll
ChatExpr {\/me is to close to +wobjectgetname[wobjectfindnearestbyobjectclass[14]]} ChatExpr {\/me is to close to +wobjectgetname[wobjectfindnearestbyobjectclass[14]]}
ChatExpr {\/me at +coordinatetostring[getplayercoordinates[]]} ChatExpr {\/me at +coordinatetostring[getplayercoordinates[]]}
IF: MobsInDist_Name 2 6 {} IF: All
Any
Expr {getvar[mobsClose] == 0}
Expr {getvar[mobsClose] == 1}
MobsInDist_Name 1 6 {}
DO: SetState {combat} DO: SetState {combat}
IF: All IF: All
Expr {stopwatchelapsedseconds[getvar[lootclock]]>21600} Expr {getvar[mobsClose] == 2}
MobsInDist_Name 2 6 {}
DO: SetState {combat}
IF: All
Expr {stopwatchelapsedseconds[getvar[lootclock]]>getvar[lootTime]}
DO: DoAll DO: DoAll
Chat {/vt opt set enablecombat true} Chat {/vt opt set enablecombat true}
SetState {loot} SetState {loot}
@ -117,7 +125,7 @@ STATE: {loot_rare} ~~ {
SetState {hunt} SetState {hunt}
~~ } ~~ }
STATE: {Default} ~~ { STATE: {Default} ~~ {
IF: All IF: Always
DO: DoAll DO: DoAll
Chat {/ub opt set VTank.PatchExpressionEngine true} Chat {/ub opt set VTank.PatchExpressionEngine true}
ChatExpr {\/vt nav load bore_circuit+getvar[navNumber]} ChatExpr {\/vt nav load bore_circuit+getvar[navNumber]}
@ -131,6 +139,8 @@ STATE: {Default} ~~ {
DoExpr {setvar[lootclock,stopwatchcreate[]]} DoExpr {setvar[lootclock,stopwatchcreate[]]}
DoExpr {stopwatchstart[getvar[lootclock]]} DoExpr {stopwatchstart[getvar[lootclock]]}
SetState {hunt} SetState {hunt}
IF: Not Expr {testvar[lootTime]}
DO: DoExpr {setvar[lootTime, 21600]}
~~ } ~~ }
STATE: {avoid_portal} ~~ { STATE: {avoid_portal} ~~ {
IF: SecsInStateGE 1 IF: SecsInStateGE 1

145
bore.met
View file

@ -11,7 +11,7 @@ n
n n
n n
n n
47 49
i i
1 1
i i
@ -327,11 +327,104 @@ s
s s
hunt hunt
i i
13 2
i i
1 1
TABLE TABLE
2 2
K
V
n
n
2
i
3
TABLE
2
K
V
n
n
2
i
26
TABLE
2
k
v
n
n
1
s
e
s
getvar[mobsClose] == 0
i
26
TABLE
2
k
v
n
n
1
s
e
s
getvar[mobsClose] == 1
i
13
TABLE
2
k
v
n
n
3
s
n
s
s
c
i
1
s
r
d
6
s
combat
s
hunt
i
2
i
1
TABLE
2
K
V
n
n
2
i
26
TABLE
2
k
v
n
n
1
s
e
s
getvar[mobsClose] == 2
i
13
TABLE
2
k k
v v
n n
@ -376,7 +469,7 @@ n
s s
e e
s s
stopwatchelapsedseconds[getvar[lootclock]]>21600 stopwatchelapsedseconds[getvar[lootclock]]>getvar[lootTime]
TABLE TABLE
2 2
K K
@ -651,15 +744,10 @@ hunt
s s
loot_rare loot_rare
i i
2 1
i i
3 3
TABLE i
2
K
V
n
n
0 0
TABLE TABLE
2 2
@ -746,6 +834,43 @@ hunt
s s
Default Default
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[lootTime]
TABLE
2
k
v
n
n
1
s
e
s
setvar[lootTime, 21600]
s
Default
i
6 6
i i
8 8