コード例 #1
0
ファイル: EnableFlight.cs プロジェクト: 7h3Cub3/ExBuddy
        private async Task <bool> HandleDeath()
        {
            if (Poi.Current.Type != PoiType.Death)
            {
                // We are not dead, continue
                return(false);
            }

            var returnStrategy = Behaviors.GetReturnStrategy();

            await Coroutine.Wait(3000, () => ClientGameUiRevive.ReviveState == ReviveState.Dead);

            var ticks = 0;

            while (ClientGameUiRevive.ReviveState == ReviveState.Dead && ticks++ < 5)
            {
                ClientGameUiRevive.Revive();
                await Coroutine.Wait(5000, () => ClientGameUiRevive.ReviveState != ReviveState.Dead);
            }

            await Coroutine.Wait(15000, () => ClientGameUiRevive.ReviveState == ReviveState.None);

            Poi.Clear("We live!, now to get back to where we were. Using return strategy -> " + returnStrategy);

            await returnStrategy.ReturnToZone();

            if (EnableFlightSettings.Instance.ReturnToLocationOnDeath)
            {
                await returnStrategy.ReturnToLocation();
            }

            return(false);
        }
コード例 #2
0
        private async Task AcceptRaise()
        {
            Log($"We have Raise Aura.");
            Log($"Clicking Accept");
            await Coroutine.Sleep(500);

            ClientGameUiRevive.Revive();
            await Coroutine.Wait(-1, () => (CommonBehaviors.IsLoading));

            Log($"Waiting for loading to finish...");
            await Coroutine.Wait(-1, () => (Core.Me.IsAlive));

            if (OsirisSettings.Instance.ThankYouSir)
            {
                ChatManager.SendChat("/say Thanks for the raise.");
            }
            await Coroutine.Wait(15000, () => ClientGameUiRevive.ReviveState == ReviveState.None);

            Poi.Clear("We live!");
        }
コード例 #3
0
ファイル: Convenience.cs プロジェクト: akira0245/Kombatant
        private bool ExecuteAutoAcceptRaise()
        {
            //if (ClientGameUiRevive.ReviveState == ReviveState.Dead && Core.Me.HasAura(148))
            if (Core.Me.IsDead && Core.Me.HasAura(148) && SelectYesno.IsOpen)
            {
                var str = Core.Memory.ReadStringUTF8(new IntPtr(SelectYesno.___Elements[0].Data));
                if (str.Contains("的救助吗?") || str.Contains("Accept Raise from ") || str.Contains("からの蘇生を受けますか?"))
                {
                    //if (SelectYesno.___Elements[5].TrimmedData != 0)
                    //{
                    //	ClientGameUiRevive.Revive();
                    //	LogHelper.Instance.Log("Accepting Revive...");
                    //	return true;
                    //}
                    ClientGameUiRevive.Revive();
                    LogHelper.Instance.Log("Accepting Revive...");
                    return(true);
                }
            }

            return(false);
        }