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
40
bore/bore.af
40
bore/bore.af
|
|
@ -79,12 +79,14 @@ STATE: {hunt} ~~ {
|
|||
DO: SetWatchdog 3 600 {really_stuck}
|
||||
IF: DistToRteGE 1000
|
||||
DO: SetState {really_stuck}
|
||||
IF: All
|
||||
Expr {coordinatedistancewithz[getplayercoordinates[], wobjectgetphysicscoordinates[wobjectfindnearestbyobjectclass[14]]]<=4}
|
||||
Not Expr {wobjectgetname[wobjectfindnearestbyobjectclass[14]]==Singularity Caul}
|
||||
DO: DoAll
|
||||
ChatExpr {\/me is to close to +wobjectgetname[wobjectfindnearestbyobjectclass[14]]}
|
||||
ChatExpr {\/me at +coordinatetostring[getplayercoordinates[]]}
|
||||
IF: All
|
||||
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[getvar[nearPortal]]}
|
||||
ChatExpr {\/me at +coordinatetostring[getplayercoordinates[]]}
|
||||
IF: All
|
||||
Any
|
||||
Expr {getvar[mobsClose] == 0}
|
||||
|
|
@ -100,12 +102,13 @@ STATE: {hunt} ~~ {
|
|||
DO: DoAll
|
||||
Chat {/vt opt set enablecombat true}
|
||||
SetState {loot}
|
||||
IF: All
|
||||
Expr {setvar[portal, wobjectfindnearestbyobjectclass[14]]}
|
||||
Expr {coordinatedistancewithz[getplayercoordinates[], wobjectgetphysicscoordinates[getvar[portal]]] <= 8}
|
||||
Not Expr {wobjectgetname[wobjectfindnearestbyobjectclass[14]]==Singularity Caul}
|
||||
Not Expr {wobjectgetname[wobjectfindnearestbyobjectclass[14]]#Destroyed.*}
|
||||
Expr {wobjectisvalid[getvar[portal]]}
|
||||
IF: All
|
||||
Expr {setvar[portal, wobjectfindnearestbyobjectclass[14]]}
|
||||
Expr {istrue[getvar[portal]]}
|
||||
Expr {coordinatedistancewithz[getplayercoordinates[], wobjectgetphysicscoordinates[getvar[portal]]] <= 8}
|
||||
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[]]]}
|
||||
Expr {setvar[relativeAngle, abs[getvar[portalHeading] - getvar[playerHeading]]]}
|
||||
|
|
@ -241,12 +244,13 @@ STATE: {loot} ~~ {
|
|||
DoExpr {setvar[lootclock,stopwatchcreate[]]}
|
||||
DoExpr {stopwatchstart[getvar[lootclock]]}
|
||||
SetState {hunt}
|
||||
IF: All
|
||||
Expr {setvar[portal, wobjectfindnearestbyobjectclass[14]]}
|
||||
Expr {coordinatedistancewithz[getplayercoordinates[], wobjectgetphysicscoordinates[getvar[portal]]] <= 8}
|
||||
Not Expr {wobjectgetname[wobjectfindnearestbyobjectclass[14]]==Singularity Caul}
|
||||
Not Expr {wobjectgetname[wobjectfindnearestbyobjectclass[14]]#Destroyed.*}
|
||||
Expr {wobjectisvalid[getvar[portal]]}
|
||||
IF: All
|
||||
Expr {setvar[portal, wobjectfindnearestbyobjectclass[14]]}
|
||||
Expr {istrue[getvar[portal]]}
|
||||
Expr {coordinatedistancewithz[getplayercoordinates[], wobjectgetphysicscoordinates[getvar[portal]]] <= 8}
|
||||
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[]]]}
|
||||
Expr {setvar[relativeAngle, abs[getvar[portalHeading] - getvar[playerHeading]]]}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue