private void cbHG_SelectionChangeCommitted(object sender, EventArgs e) { int index = cbHG.SelectedIndex; string actionName = GetCurHuntingGround(); ActionData ad = dActionData[actionName]; List <PointData> hg = macro[MacroType.eReturn]; for (int i = 0; i < hg.Count; i++) { PointData pd = hg[i]; if (pd.actionName.IndexOf("사냥터") != -1) { pd.actionName = ad.name; pd.pt = ad.pt; hg[i] = pd; break; } } }
public bool CheckUserInfo_Shop() { // qc2 Check string shop = imgMacro.ScreenCapture(ssInventory, null); try { if (shop.Contains("모두") || shop.Contains("장비") || shop.Contains("소모") || shop.Contains("음식") || shop.Contains("재료") || shop.Contains("기타")) { ActionData ad = dActionData["종료"]; imgMacro.InClick(ad.pt.X, ad.pt.Y); return(true); } } catch { } return(false); }
private void LoadXMl() { macro.Clear(); XmlTextReader reader = new XmlTextReader("Setting.xml"); XmlDocument xdoc = new XmlDocument(); xdoc.Load(reader); // default XmlNode defaultResulution = xdoc.DocumentElement.SelectSingleNode("Config/DefaultResolution"); if (defaultResulution != null) { defaultResolutionX = int.Parse(defaultResulution.Attributes["x"].Value); defaultResolutionY = int.Parse(defaultResulution.Attributes["y"].Value); } // current XmlNode resolution = xdoc.DocumentElement.SelectSingleNode("Config/Resolution"); if (resolution != null) { resolutionX = int.Parse(resolution.Attributes["x"].Value); resolutionY = int.Parse(resolution.Attributes["y"].Value); } // Action XmlNodeList menu = xdoc.DocumentElement.SelectNodes("Config/Menu"); if (menu != null) { XmlNodeList list = menu[0].ChildNodes; maxHGCnt = 0; foreach (XmlNode action in list) { ActionData ad = new ActionData(); ad.name = action.Attributes["name"].Value; ad.pt = new Point(); ad.pt.X = int.Parse(action.Attributes["x"].Value); ad.pt.Y = int.Parse(action.Attributes["y"].Value); GetCurrentPoint(ref ad.pt); dActionData.Add(ad.name, ad); if (ad.name.IndexOf("사냥터") != -1) { int cnt = int.Parse(ad.name.Substring(3)); if (maxHGCnt < cnt) { maxHGCnt = cnt; } } } } // itemBreak AddMacro(xdoc, "IteamBreak", MacroType.eItemBreak); // Quest AddMacro(xdoc, "Quest", MacroType.eQuest); // Return AddMacro(xdoc, "Return", MacroType.eReturn); // Hunting AddMacro(xdoc, "Hunting", MacroType.eHunting); // Scroll Quest AddMacro(xdoc, "ScrollQuest", MacroType.eSQuest); // Click AddMacro(xdoc, "Click", MacroType.eClick); // Cancle AddMacro(xdoc, "Cancle", MacroType.eCancle); // ReQuest AddMacro(xdoc, "ReQuest", MacroType.eReQuest); // Confirm AddMacro(xdoc, "Confirm", MacroType.eConfirm); // Shop AddMacro(xdoc, "Shop", MacroType.eShop); // Safe Mode AddMacro(xdoc, "SafeMode", MacroType.eSafeMode); reader.Close(); AddLog("데이터 로드 완료"); }