public bool ModifyName(string name) { Thread.Sleep(200); var pos = ImageHelper.FindImageFromTop(GetImg(), Mainform.ImgModels["modifyName"]); if (pos.X != -1) { MouseHelper.MouseLeftClick(PokeMMOClient, (int)((pos.X + 3) / Mainform.Settings.ScreenZoomRate), (int)((pos.Y + 3) / Mainform.Settings.ScreenZoomRate - 35)); Thread.Sleep(300); MouseHelper.SetText(PokeMMOClient, name); return(true); } return(false); }
public bool ClickOnImage(string img) { var pos = ImageHelper.FindImageFromTop(GetImg(), new Bitmap(Mainform.ImgModels[img]), 120); if (pos.X != -1) { MouseHelper.MouseLeftClick(PokeMMOClient, (int)((pos.X + 3) / Mainform.Settings.ScreenZoomRate), (int)((pos.Y + 3) / Mainform.Settings.ScreenZoomRate - 35)); Log?.Invoke(img + " Click On: " + pos.X + ", " + pos.Y); return(true); } else { Log?.Invoke(img + " Not Found!"); } return(false); }
public void LMouseClick(int x, int y) { MouseHelper.MouseLeftClick(PokeMMOClient, x, y); }