internal override void Parser(string message) { base.Parser(message); if (Regex.IsMatch(message, "免费竞技场机会已用完或正在冷却")) { IsContinue = false; } else if (Regex.IsMatch(message, "缓缓走进场地")) { new Thread(() => { FightController.GetInstance().Fight(this); }).Start(); } else if (Regex.IsMatch(message, "你要对谁施展")) { FightController.GetInstance().FightComplete(); } else if (Regex.IsMatch(message, "轮竞技将于30秒后开始")) { new Thread(() => { FightController.GetInstance().FightComplete(); FightController.GetInstance().CheckStatusNoFighting(this); int.TryParse(Regex.Match(message, @"第.*【 (?<turn>\d+) 】.*30秒后开始").Groups["turn"].Value, out turn); Send("leave"); }).Start(); } else if (Regex.IsMatch(message, "化作一股青烟散去")) { } else if (Regex.IsMatch(message, "你尚有未兑换的奖励")) { new Thread(() => { Send("ask_reward"); Send("enter_arena"); }).Start(); } else if (Regex.IsMatch(message, "你已经完成了该级别所有竞技")) { turn = 10; } else if (Regex.IsMatch(message, "全身的流光溢彩渐渐消去了")) { FightController.GetInstance().Buff(); } else if (Regex.IsMatch(message, "拉着你不让走")) { UtilFunction.DealWithDaoDanGui(this); Console.WriteLine("==============================================捣蛋鬼出现了"); } }
public override void Run() { base.Run(); Send("huanchao"); Send("move /d/changan/nbridge"); FightController.GetInstance().CheckStatusNoFighting(this); Send("enter_arena"); turn = 1; WaitForFinish(); Send("ask_reward"); base.Complete(); Console.WriteLine("==============================================完成竞技场"); }
void GoFight(string direction) { while (isDaoDan) { Thread.Sleep(1000); } int time = Global.BUSY_TIME > 0 ? Global.BUSY_TIME : 0; Thread.Sleep(time * 1000); Console.WriteLine("==============================================走向" + direction); Send("go " + direction); FightController.GetInstance().Fight(this); FightController.GetInstance().CheckStatusNoFighting(this); }
internal override void Parser(string message) { base.Parser(message); if (Regex.IsMatch(message, "你要对谁施展") || Regex.IsMatch(message, "你要用金砖砸谁")) { FightController.GetInstance().FightComplete(); isKillNPC = false; } else if (Regex.IsMatch(message, "全身的流光溢彩渐渐消去了")) { FightController.GetInstance().Buff(); } else if (Regex.IsMatch(message, "\"p\":\"任务给予")) { target = Regex.Match(message, @"任务目标.*?31m(?<yg>.*?)\(").Groups["yg"].Value; Console.WriteLine("==============================================接到灭妖任务,去杀" + target); } else if (Regex.IsMatch(message, "无可奈何,化做一道青光,直冲云霄去了")) { Console.WriteLine("========================================================消灭了妖怪了!"); isFindYG = true; } else if (Regex.IsMatch(message, "看起来.*想杀死你!")) { fight.Fight(this); string name = Regex.Match(message, "看起来(?<name>.*?)想杀死你!").Groups["name"].Value; Console.WriteLine("==============================================有人要杀我,名字是" + name); if (name.Contains(target)) { isFindYG = true; } else { isKillNPC = true; } } else if (Regex.IsMatch(message, "拉着你不让走")) { isDaoDan = true; UtilFunction.DealWithDaoDanGui(this); Console.WriteLine("==============================================捣蛋鬼出现了"); isDaoDan = false; } else if (Regex.IsMatch(message, "老夫不是派你去")) { isFail = true; } }
public override void Run() { isFindYG = false; isDaoDan = false; isFail = false; base.Run(); Send("huanchao"); Send("move /d/dntg/yunlou/yunloutai"); FightController.GetInstance().CheckStatusNoFighting(this); string resp = UtilFunction.GetResponse(this, "ask li jing about 灭妖", "老夫不是派你"); if (!string.IsNullOrEmpty(resp)) { SendWaitMessage("ask li jing about 失败", 1000); SendWaitMessage("ask li jing about 灭妖", 1000); } Thread.Sleep(3000); if (FindYaoGuaiOrder()) { FightController.GetInstance().Fight(this); Console.WriteLine("==============================================完成一轮灭妖"); } else { Console.WriteLine("==============================================顺序找妖怪失败,开始随机找妖怪"); if (FindYaoGuaiRnd()) { FightController.GetInstance().Fight(this); Console.WriteLine("==============================================完成一轮灭妖"); } else { Console.WriteLine("==============================================未找到灭妖,灭妖失败"); Send("huanchao"); Send("move /d/dntg/yunlou/yunloutai"); Send("ask li jing about 放弃"); } } base.Complete(); isFindYG = false; isKillNPC = false; }
internal override void Parser(string message) { base.Parser(message); if (Regex.IsMatch(message, "你要对谁施展") || Regex.IsMatch(message, "你要用金砖砸谁")) { FightController.GetInstance().FightComplete(); } else if (Regex.IsMatch(message, "全身的流光溢彩渐渐消去了")) { FightController.GetInstance().Buff(); } else if (Regex.IsMatch(message, "拉着你不让走")) { isDaoDan = true; UtilFunction.DealWithDaoDanGui(this); Console.WriteLine("==============================================捣蛋鬼出现了"); isDaoDan = false; } else if (Regex.IsMatch(message, "免费副本机会已用完或正在冷却")) { IsContinue = false; } }
public override void Run() { base.Run(); Send("huanchao"); Send("move /d/changan/nbridge"); Send("go south"); Send("go enter"); Send("callguard"); Thread.Sleep(UtilFunction.GetBusyTime()); FightController.GetInstance().CheckStatusNoFighting(this); Send("enter_fuben"); try { for (int i = 0; i < func.Length; i++) { Console.WriteLine("======================================进入层数为:" + i.ToString()); func[i](); } } catch (Exception e) { if (IsContinue) { Check(); } } Send("look"); if (Global.INV_LIST != null && Global.INV_LIST.Count > 0) { string corp = Global.INV_LIST[0].Id; Send("get all from " + corp); Console.WriteLine("======================================收刮尸体了"); } Send("chuqu"); Console.WriteLine("======================================完成地府副本了"); base.Complete(); }
internal Robot() { fight = FightController.GetInstance(); }