Beispiel #1
0
        public MessageResult Message(Message message)
        {
            var id = message.Id;

            if (id == Events.Messages.PlayerResurrected)
            {
                _toMap = true;
                return(MessageResult.Processed);
            }
            if (id == Events.Messages.AreaChanged)
            {
                var newArea = message.GetInput <DatWorldAreaWrapper>(3);
                if (newArea.IsMap)
                {
                    _toMap = false;
                    return(MessageResult.Processed);
                }
                var oldArea = message.GetInput <DatWorldAreaWrapper>(2);
                if (oldArea != null && !oldArea.IsMap && newArea.IsMapRoom)
                {
                    _toMap = true;
                }
                return(MessageResult.Processed);
            }
            return(MessageResult.Unprocessed);
        }
Beispiel #2
0
        private static void FinishGridning()
        {
            var bot = BotManager.Current;

            if (!bot.Name.Contains("QuestBot"))
            {
                return;
            }

            var msg = new Message("QB_get_current_quest");

            if (bot.Message(msg) != MessageResult.Processed)
            {
                GlobalLog.Debug("[EnterIncursionTask] \"QB_get_current_quest\" message was not processed.");
                return;
            }

            var questName = msg.GetOutput <string>();

            if (questName != "Grinding")
            {
                return;
            }

            msg = new Message("QB_finish_grinding");
            if (bot.Message(msg) != MessageResult.Processed)
            {
                GlobalLog.Debug("[EnterIncursionTask] \"QB_finish_grinding\" message was not processed.");
            }
        }
        public MessageResult Message(Loki.Bot.Message message)
        {
            var id = message.Id;

            if (id == Events.Messages.ItemStashedEvent)
            {
                var itemName = message.GetInput <CachedItem>()?.Name;

                if (!_hasWhiteSextants && itemName == CurrencyNames.SextantApprentice)
                {
                    GlobalLog.Info("[SextantTask] Apprentice Sextant has been stashed. Now marking them as available.");
                    _hasWhiteSextants = true;
                    return(MessageResult.Processed);
                }
                if (!_hasYellowSextants && itemName == CurrencyNames.SextantJourneyman)
                {
                    GlobalLog.Info("[SextantTask] Journeyman Sextant has been stashed. Now marking them as available.");
                    _hasYellowSextants = true;
                    return(MessageResult.Processed);
                }
                if (!_hasRedSextants && itemName == CurrencyNames.SextantMaster)
                {
                    GlobalLog.Info("[SextantTask] Master Sextant has been stashed. Now marking them as available.");
                    _hasRedSextants = true;
                    return(MessageResult.Processed);
                }
                return(MessageResult.Unprocessed);
            }
            if (id == Events.Messages.CombatAreaChanged)
            {
                ResetErrors();
                return(MessageResult.Processed);
            }
            return(MessageResult.Unprocessed);
        }
Beispiel #4
0
 public MessageResult Message(Message message)
 {
     if (message.Id == Events.Messages.IngameBotStart)
     {
         _shouldAssign = !IsMoveSkillAssigned;
         return(MessageResult.Processed);
     }
     return(MessageResult.Unprocessed);
 }
Beispiel #5
0
        public MessageResult Message(Message message)
        {
            var id = message.Id;

            if (id == Events.Messages.AreaChanged || id == Events.Messages.PlayerResurrected)
            {
                CombatAreaCache.IsInIncursion = false;
                return(MessageResult.Processed);
            }
            return(MessageResult.Unprocessed);
        }
 public MessageResult Message(Message message)
 {
     return(MessageResult.Unprocessed);
 }
Beispiel #7
0
 public MessageResult Message(Loki.Bot.Message message)
 {
     return(MessageResult.Processed);
 }