예제 #1
0
        public override Task LoadAsync()
        {
            Listen(Zone.OnPlayerLoad, async player =>
            {
                await UiHelper.AnnouncementAsync(player, "Not yet implemented",
                                                 "Block Yard is currently not implemented. You can return to Avant Gardens by sending <font color=\"#FF7F00\">/testmap 1100</font> in the chat.");
            });

            return(Task.CompletedTask);
        }
예제 #2
0
 public async Task Announce(string title, string message)
 {
     foreach (var zone in UchuServer.Zones)
     {
         foreach (var zonePlayer in zone.Players)
         {
             await UiHelper.AnnouncementAsync(zonePlayer, title, message);
         }
     }
 }
예제 #3
0
        public override Task LoadAsync()
        {
            var crashHelmut = Zone.GameObjects.First(g => g.Lot == Lot.CrashHelmutNpc);

            Listen(crashHelmut.GetComponent <MissionGiverComponent>().OnMissionOk, async tuple =>
            {
                var(missionId, _, _, player) = tuple;

                // 'go to block yard' mission
                if (missionId != (int)MissionId.BackupBulwark)
                {
                    return;
                }

                // small delay to make sure the mission has been added to the player's mission inventory and started
                await Task.Delay(1000);

                // complete 'go to block yard' mission
                var missionInventory = player.GetComponent <MissionInventoryComponent>();
                var bulwarkMission   = missionInventory.GetMission(MissionId.BackupBulwark);
                await bulwarkMission.CompleteAsync();

                // complete 'smash spider queen' mission
                var arachnophobiaMission = await missionInventory.AddMissionAsync((int)MissionId.Arachnophobia, player);
                await arachnophobiaMission.StartAsync();
                await arachnophobiaMission.CompleteAsync();

                // start 'talk to sky lane' mission
                var skyLaneMission = await missionInventory.AddMissionAsync((int)MissionId.CheckInwithSkyLane, player);
                await skyLaneMission.StartAsync();

                // show pop-up to player
                await UiHelper.AnnouncementAsync((Player)player, "Completed Missions",
                                                 "Block Yard is currently not implemented. The missions have been completed for you.");
            });

            return(Task.CompletedTask);
        }