guard portal checks against null worldobject
All checks were successful
/ test (push) Successful in 33s
All checks were successful
/ test (push) Successful in 33s
This commit is contained in:
parent
a1bfac92db
commit
d989f54672
2 changed files with 84 additions and 28 deletions
18
bore/bore.af
18
bore/bore.af
|
|
@ -80,10 +80,12 @@ STATE: {hunt} ~~ {
|
|||
IF: DistToRteGE 1000
|
||||
DO: SetState {really_stuck}
|
||||
IF: All
|
||||
Expr {coordinatedistancewithz[getplayercoordinates[], wobjectgetphysicscoordinates[wobjectfindnearestbyobjectclass[14]]]<=4}
|
||||
Not Expr {wobjectgetname[wobjectfindnearestbyobjectclass[14]]==Singularity Caul}
|
||||
Expr {setvar[nearPortal, wobjectfindnearestbyobjectclass[14]]}
|
||||
Expr {istrue[getvar[nearPortal]]}
|
||||
Expr {coordinatedistancewithz[getplayercoordinates[], wobjectgetphysicscoordinates[getvar[nearPortal]]]<=4}
|
||||
Not Expr {wobjectgetname[getvar[nearPortal]]==Singularity Caul}
|
||||
DO: DoAll
|
||||
ChatExpr {\/me is to close to +wobjectgetname[wobjectfindnearestbyobjectclass[14]]}
|
||||
ChatExpr {\/me is to close to +wobjectgetname[getvar[nearPortal]]}
|
||||
ChatExpr {\/me at +coordinatetostring[getplayercoordinates[]]}
|
||||
IF: All
|
||||
Any
|
||||
|
|
@ -102,9 +104,10 @@ STATE: {hunt} ~~ {
|
|||
SetState {loot}
|
||||
IF: All
|
||||
Expr {setvar[portal, wobjectfindnearestbyobjectclass[14]]}
|
||||
Expr {istrue[getvar[portal]]}
|
||||
Expr {coordinatedistancewithz[getplayercoordinates[], wobjectgetphysicscoordinates[getvar[portal]]] <= 8}
|
||||
Not Expr {wobjectgetname[wobjectfindnearestbyobjectclass[14]]==Singularity Caul}
|
||||
Not Expr {wobjectgetname[wobjectfindnearestbyobjectclass[14]]#Destroyed.*}
|
||||
Not Expr {wobjectgetname[getvar[portal]]==Singularity Caul}
|
||||
Not Expr {wobjectgetname[getvar[portal]]#Destroyed.*}
|
||||
Expr {wobjectisvalid[getvar[portal]]}
|
||||
Expr {setvar[portalHeading, getheadingto[getvar[portal]]]}
|
||||
Expr {setvar[playerHeading, getheading[wobjectgetplayer[]]]}
|
||||
|
|
@ -243,9 +246,10 @@ STATE: {loot} ~~ {
|
|||
SetState {hunt}
|
||||
IF: All
|
||||
Expr {setvar[portal, wobjectfindnearestbyobjectclass[14]]}
|
||||
Expr {istrue[getvar[portal]]}
|
||||
Expr {coordinatedistancewithz[getplayercoordinates[], wobjectgetphysicscoordinates[getvar[portal]]] <= 8}
|
||||
Not Expr {wobjectgetname[wobjectfindnearestbyobjectclass[14]]==Singularity Caul}
|
||||
Not Expr {wobjectgetname[wobjectfindnearestbyobjectclass[14]]#Destroyed.*}
|
||||
Not Expr {wobjectgetname[getvar[portal]]==Singularity Caul}
|
||||
Not Expr {wobjectgetname[getvar[portal]]#Destroyed.*}
|
||||
Expr {wobjectisvalid[getvar[portal]]}
|
||||
Expr {setvar[portalHeading, getheadingto[getvar[portal]]]}
|
||||
Expr {setvar[playerHeading, getheading[wobjectgetplayer[]]]}
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ K
|
|||
V
|
||||
n
|
||||
n
|
||||
2
|
||||
4
|
||||
i
|
||||
26
|
||||
TABLE
|
||||
|
|
@ -319,7 +319,33 @@ n
|
|||
s
|
||||
e
|
||||
s
|
||||
coordinatedistancewithz[getplayercoordinates[], wobjectgetphysicscoordinates[wobjectfindnearestbyobjectclass[14]]]<=4
|
||||
setvar[nearPortal, wobjectfindnearestbyobjectclass[14]]
|
||||
i
|
||||
26
|
||||
TABLE
|
||||
2
|
||||
k
|
||||
v
|
||||
n
|
||||
n
|
||||
1
|
||||
s
|
||||
e
|
||||
s
|
||||
istrue[getvar[nearPortal]]
|
||||
i
|
||||
26
|
||||
TABLE
|
||||
2
|
||||
k
|
||||
v
|
||||
n
|
||||
n
|
||||
1
|
||||
s
|
||||
e
|
||||
s
|
||||
coordinatedistancewithz[getplayercoordinates[], wobjectgetphysicscoordinates[getvar[nearPortal]]]<=4
|
||||
i
|
||||
21
|
||||
TABLE
|
||||
|
|
@ -341,7 +367,7 @@ n
|
|||
s
|
||||
e
|
||||
s
|
||||
wobjectgetname[wobjectfindnearestbyobjectclass[14]]==Singularity Caul
|
||||
wobjectgetname[getvar[nearPortal]]==Singularity Caul
|
||||
TABLE
|
||||
2
|
||||
K
|
||||
|
|
@ -361,7 +387,7 @@ n
|
|||
s
|
||||
e
|
||||
s
|
||||
\/me is to close to +wobjectgetname[wobjectfindnearestbyobjectclass[14]]
|
||||
\/me is to close to +wobjectgetname[getvar[nearPortal]]
|
||||
i
|
||||
8
|
||||
TABLE
|
||||
|
|
@ -548,7 +574,7 @@ K
|
|||
V
|
||||
n
|
||||
n
|
||||
12
|
||||
13
|
||||
i
|
||||
26
|
||||
TABLE
|
||||
|
|
@ -574,6 +600,19 @@ n
|
|||
s
|
||||
e
|
||||
s
|
||||
istrue[getvar[portal]]
|
||||
i
|
||||
26
|
||||
TABLE
|
||||
2
|
||||
k
|
||||
v
|
||||
n
|
||||
n
|
||||
1
|
||||
s
|
||||
e
|
||||
s
|
||||
coordinatedistancewithz[getplayercoordinates[], wobjectgetphysicscoordinates[getvar[portal]]] <= 8
|
||||
i
|
||||
21
|
||||
|
|
@ -596,7 +635,7 @@ n
|
|||
s
|
||||
e
|
||||
s
|
||||
wobjectgetname[wobjectfindnearestbyobjectclass[14]]==Singularity Caul
|
||||
wobjectgetname[getvar[portal]]==Singularity Caul
|
||||
i
|
||||
21
|
||||
TABLE
|
||||
|
|
@ -618,7 +657,7 @@ n
|
|||
s
|
||||
e
|
||||
s
|
||||
wobjectgetname[wobjectfindnearestbyobjectclass[14]]#Destroyed.*
|
||||
wobjectgetname[getvar[portal]]#Destroyed.*
|
||||
i
|
||||
26
|
||||
TABLE
|
||||
|
|
@ -1549,7 +1588,7 @@ K
|
|||
V
|
||||
n
|
||||
n
|
||||
12
|
||||
13
|
||||
i
|
||||
26
|
||||
TABLE
|
||||
|
|
@ -1575,6 +1614,19 @@ n
|
|||
s
|
||||
e
|
||||
s
|
||||
istrue[getvar[portal]]
|
||||
i
|
||||
26
|
||||
TABLE
|
||||
2
|
||||
k
|
||||
v
|
||||
n
|
||||
n
|
||||
1
|
||||
s
|
||||
e
|
||||
s
|
||||
coordinatedistancewithz[getplayercoordinates[], wobjectgetphysicscoordinates[getvar[portal]]] <= 8
|
||||
i
|
||||
21
|
||||
|
|
@ -1597,7 +1649,7 @@ n
|
|||
s
|
||||
e
|
||||
s
|
||||
wobjectgetname[wobjectfindnearestbyobjectclass[14]]==Singularity Caul
|
||||
wobjectgetname[getvar[portal]]==Singularity Caul
|
||||
i
|
||||
21
|
||||
TABLE
|
||||
|
|
@ -1619,7 +1671,7 @@ n
|
|||
s
|
||||
e
|
||||
s
|
||||
wobjectgetname[wobjectfindnearestbyobjectclass[14]]#Destroyed.*
|
||||
wobjectgetname[getvar[portal]]#Destroyed.*
|
||||
i
|
||||
26
|
||||
TABLE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue