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