int Init
int Hidden
short InInterior
long ArrayCell
long ArrayInterior
long ArrayMarker
long ArrayRotation
long ArrayX
long ArrayY
long ArrayZ
long Count
long Index
float Rotation
float PositionX
float PositionY
float PositionZ
ref Cell
ref Marker
Begin Gamemode
if ( Init )
if ;;(GetItemCountblock)
if ( Hidden )
set Index to 0
SaveIP
if ( Index < ArraySize ArrayMarker )
set Cell to GetInArray ArrayCell Index
set InInterior to GetInArray ArrayInterior Index
set Marker to GetInArray ArrayMarker Index
set Rotation to GetInArray ArrayRotation Index
set PositionX to GetInArray ArrayX Index
set PositionY to GetInArray ArrayY Index
set PositionZ to GetInArray ArrayZ Index
if ( InInterior )
Marker.PositionCell PositionX, PositionY, PositionZ, Rotation, Cell
else
Marker.PositionWorld PositionX, PositionY, PositionZ, Rotation, Cell
endif
set Index to ( Index + 1 )
RestoreIP
endif
set Hidden to 0
endif
else
set Hidden to 1
set Count to 0
SaveIP
set rTemp to Player
if ( Count < GetNumRefs 28 2 )
if ( Count )
set Marker to GetNextRef
else
set Marker to GetFirstRef 28 2
endif
if ( Marker.GetIsID MapMarker )
if ( FindRefInArray ArrayMarker Marker )
if ( Marker.IsInInterior )
set Cell to Marker.GetParentCell
SetRefInArray ArrayCell 0 Cell 1 0 1
SetInArray ArrayInterior 0 1 1 0 1
else
set Cell to [B][I][CurrentWorldspace][/I][/B]
SetRefInArray ArrayCell 0 Cell 1 0 1
SetInArray ArrayInterior 0 0 1 0 1
endif
SetRefInArray ArrayMarker 0 Marker 1 0 1
set Rotation to Marker.GetAngle z
SetFloatInArray ArrayRotation 0 Rotation 1 0 1
set PositionX to Marker.GetPos x
SetFloatInArray ArrayX 0 PositionX 1 0 1
set PositionY to Marker.GetPos y
SetFloatInArray ArrayY 0 PositionY 1 0 1
set PositionZ to Marker.GetPos z
SetFloatInArray ArrayZ 0 PositionZ 1 0 1
endif
Marker.PositionCell 0, 0, 0, 0, DummyCell
endif
set Count to ( Count + 1 )
RestoreIP
endif
endif
else
set Init to 1
set ArrayCell to CreateArray -1 0 1 1
set ArrayInterior to CreateArray -1 0 1 1
set ArrayMarker to CreateArray -1 0 1 1
set ArrayRotation to CreateArray -1 0 1 1
set ArrayX to CreateArray -1 0 1 1
set ArrayY to CreateArray -1 0 1 1
set ArrayZ to CreateArray -1 0 1 1
endif
End