rendered paste bodyobjectdef Testnet
{
variable point3f FeelPoint
variable int FeelAhead=5
variable int Slope=.5
variable int bearing
method Pulse()
{
This:CheckIt
}
method CheckIt()
{
bearing:Set[${Me.Heading}]
FeelPoint.X:Set[ ${Me.X} + ${Math.Cos[${Math.Calc[${bearing}]}].Round} * ${FeelAhead} ]
FeelPoint.Y:Set[ ${Me.Y} - ${Math.Sin[${Math.Calc[${bearing}]}].Round} * ${FeelAhead} ]
FeelPoint.Z:Set[${Me.Z}]
echo "LS CharLoc ${Me.Location}"
echo "LS Heading: ${Me.Heading} New Point: ${FeelPoint}"
if ${Math.Distance[${Me.X},${Me.Y},${Math.Calc[${Me.Z}]},${ISXWoW.IsPathObstructedOCD[${Me.X},${Me.Y},${Math.Calc[${Me.Z}]},${FeelPoint.X},${FeelPoint.Y},${Math.Calc[${FeelPoint.Z}+${Slope}]}]}]}<${Math.Calc[${FeelAhead}]}
{
echo "BLOCKED"
return
}
echo "clean"
}
}
function main()
{
declare testin Testnet
do
{
testin:Pulse
}
while 1
}