public override async Task <bool> BehaviorRoutine() { if (await base.BehaviorRoutine()) { return(true); } if (IsDone) { return(false); } //Inject our lua addon code for mission success function if (!LuaEvents.LuaAddonInjected) { if (LuaCommands.TestLuaInjectionCode()) {//Prevent multiple injections by checking simple function return! LuaEvents.LuaAddonInjected = true; } else { await LuaEvents.InjectLuaAddon(); return(true); } } if (await StartMovement.MoveTo()) { return(true); } if (await Movement()) { return(true); } if (await Interaction()) { return(true); } return(false); }