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

145
bore.met
View file

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