#include "${LavishScript.HomeDirectory}/Scripts/mr/common/Api.iss"
objectdef RelayApi
{
    method SetMoveSpot()
    {
        
        variable point3f location
        location:Set[${Context.Get["parameters", "location", "X"]}, ${Context.Get["parameters", "location", "Y"]}, ${Context.Get["parameters", "location", "Z"]}]
        ;MRApi:MoveTo["${Context.Get["parameters","ForWho"]}", "${location}", ${Context.Get["parameters", "minDistance"]}]
        
    }
}

variable(global) RelayApi MRRelayApi

function main()
{
    if !${Script[Movement](exists)}
    {
        RunScript "${LavishScript.HomeDirectory}/Scripts/mr/common/Navigation/Movement"
    }

    while 1
    {
        wait 100
    }
}