static void waitForRespawn() { while (Hack.ReadInt(MainWindow.process, MainWindow.MobCountBaseAdr, MainWindow.MobCountOffset) < 10) { Thread.Sleep(1); } }
private void Window_Loaded(object sender, RoutedEventArgs e) { if (File.Exists(".\\" + filename)) { try { Keys key; textBox_Attack.Text = Hack.iniReader(".\\" + filename, MainWindow.InGameName, "KeyAttack", false, "", out MainWindow.keyAttack); textBox_Teleport.Text = Hack.iniReader(".\\" + filename, MainWindow.InGameName, "KeyTeleport", false, "", out MainWindow.keyTeleport); textBox_PickUp.Text = Hack.iniReader(".\\" + filename, MainWindow.InGameName, "KeyPickUp", false, "", out MainWindow.keyPickUp); textBox_Jump.Text = Hack.iniReader(".\\" + filename, MainWindow.InGameName, "KeyJump", false, "", out MainWindow.keyJump); //textBox_Door.Text = Hack.iniReader(".\\" + filename, MainWindow.InGameName, "KeyDoor", false, "", out MainWindow.keyDoor); textBox_Skill.Text = Hack.iniReader(".\\" + filename, MainWindow.InGameName, "KeySkill", false, "", out MainWindow.keySkill); textBox_Combo1.Text = Hack.iniReader(".\\" + filename, MainWindow.InGameName, "KeyCombo1", false, "", out MainWindow.keyCombo1); textBox_Combo2.Text = Hack.iniReader(".\\" + filename, MainWindow.InGameName, "KeyCombo2", false, "", out MainWindow.keyCombo2); textBox_Combo1Delay.Text = Hack.iniReader(".\\" + filename, MainWindow.InGameName, "KeyCombo1Delay", true, "3000", out key); int.TryParse(textBox_Combo1Delay.Text, out MainWindow.delayComboKey1); textBox_Combo2Delay.Text = Hack.iniReader(".\\" + filename, MainWindow.InGameName, "KeyCombo2Delay", true, "3000", out key); int.TryParse(textBox_Combo2Delay.Text, out MainWindow.delayComboKey2); textBox_AttackParam.Text = Hack.iniReader(".\\" + filename, MainWindow.InGameName, "AttackParam", true, "50", out key); int.TryParse(textBox_AttackParam.Text, out MainWindow.attackParam); } catch { System.Windows.MessageBox.Show("設定檔錯誤,請刪除data.ini後再嘗試一次"); } } }
internal static void selling() { int firstItemIconScreenX, firstItemIconScreenY; int firstItemScreenX, firstItemScreenY; int sureSellScreenX, sureSellScreenY; Hack.ClientToScreen(WindowHwnd, 421, 274, out firstItemIconScreenX, out firstItemIconScreenY); Hack.ClientToScreen(WindowHwnd, 540, 274, out firstItemScreenX, out firstItemScreenY); Hack.ClientToScreen(WindowHwnd, 297, 271, out sureSellScreenX, out sureSellScreenY); while (!(Hack.CompareColor(IntPtr.Zero, firstItemIconScreenX, firstItemIconScreenY, "DDDDDD", "222222") && (Hack.CompareColor(IntPtr.Zero, firstItemIconScreenX + 10, firstItemIconScreenY - 10, "DDDDDD", "222222")))) { Hack.MoveTo(firstItemScreenX, firstItemScreenY); Hack.LeftDoubleClick(); //sureSellColor1 = dmBotting.DM.GetColor(297 + windowX, 271 + windowY); //sureSellColor2 = dmBotting.DM.GetColor(481 + windowX, 271 + windowY); if (Hack.CompareColor(IntPtr.Zero, sureSellScreenX, sureSellScreenY, "4488BB", "000000")) { Hack.KeyPress(WindowHwnd, Keys.Enter); } } while (Hack.CompareColor(WindowHwnd, 580, 174, "EE8844", "111111")) { Hack.KeyPress(WindowHwnd, Keys.Enter); } }
internal static void botting()//黑肥肥 { int counter = 0; if (isOnRope() && getCharacterX() != 834) { RopeExiting(true); } //training start while (true) { if (counter % 3 == 0) { //go to position start if (Hack.ReadInt(MainWindow.process, MainWindow.CharacterYBaseAdr, MainWindow.CharacterYOffset) > 2055) { RopeClimbing(1380, true, 2055, 2205, -60, 60); } RopeClimbing(834, false, 1845, 2205, 60, 60); //go to position end AutoKey.mre_PickUp.Reset(); if (counter % 6 == 0) { for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo1); } Thread.Sleep(MainWindow.delayComboKey1); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo2); } Thread.Sleep(MainWindow.delayComboKey2); } else { for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keySkill); } Thread.Sleep(1000); } AutoKey.mre_PickUp.Set(); RopeClimbing(834, true, 1695, 2205, 60, 60); GoToX(750); Attack(1); } GoToX(-164); Attack(1); GoToX(653); Attack(1); GoToX(1585); Attack(1); GoToX(653); Attack(1); counter++; } }
internal static void PickUp() { while (true) { Hack.KeyDown(MainWindow.WindowHwnd, MainWindow.keyPickUp); Thread.Sleep(50); mre_PickUp.WaitOne(); } }
internal static void KeyPresser() { while (MainWindow.keyWantToPress != System.Windows.Forms.Keys.None) { Hack.KeyDown(MainWindow.WindowHwnd, MainWindow.keyWantToPress); Thread.Sleep(50); mre_KeyPresser.WaitOne(); } }
static void SpecialRopeClimbing(int coorX, bool isClimbToTop, int topBoundary, int floorY, int leftDistance, int rightDistance, DateTime time_start) { int CharacterX, CharacterY, CharacterStatus; CharacterStatus = Hack.ReadInt(MainWindow.process, MainWindow.CharacterStatusBaseAdr, MainWindow.CharacterStatusOffset); DateTime time_end = DateTime.Now; //計時結束 取得目前時間 //後面的時間減前面的時間後 轉型成TimeSpan即可印出時間差 double result = ((time_end - time_start)).TotalMilliseconds; if (result >= 5000 && isStand()) { if (_threadOfTraining.Name == "Petri1hit") { Attack(1); } else { Attack(2); } time_start = DateTime.Now; } if (CharacterStatus < 14 || CharacterStatus > 17) { GoToNearX(coorX, leftDistance, rightDistance); Hack.KeyPress(WindowHwnd, MainWindow.keyJump); GoToXInAir(coorX, 4, true, true); } while (true) { CharacterX = Hack.ReadInt(MainWindow.process, MainWindow.CharacterXBaseAdr, MainWindow.CharacterXOffset); CharacterY = Hack.ReadInt(MainWindow.process, MainWindow.CharacterYBaseAdr, MainWindow.CharacterYOffset); CharacterStatus = Hack.ReadInt(MainWindow.process, MainWindow.CharacterStatusBaseAdr, MainWindow.CharacterStatusOffset); if (CharacterY > floorY) { break; } else if ((isClimbToTop && (CharacterY <= topBoundary) && ((CharacterStatus < 14) || (CharacterStatus > 17))) || (isClimbToTop == false) && (CharacterY <= topBoundary)) { Thread.Sleep(1); Hack.KeyUp(WindowHwnd, Keys.Up); Hack.KeyUp(WindowHwnd, Keys.Right); Hack.KeyUp(WindowHwnd, Keys.Left); return; } else if (CharacterX >= coorX - 20 && CharacterX <= coorX + 20 && CharacterY <= floorY) { Hack.KeyDown(WindowHwnd, Keys.Up); } else { RopeClimbing(coorX, isClimbToTop, topBoundary, floorY, leftDistance, rightDistance); } } }
static void GoToFloor(int targetFloor) { if (targetFloor == 2) { while (nowFloor != 2) { Hack.KeyDown(WindowHwnd, Keys.Down); Thread.Sleep(50); Hack.KeyPress(WindowHwnd, MainWindow.keyTeleport); Thread.Sleep(30); Hack.KeyUp(WindowHwnd, Keys.Down); } } }
internal static void Skill5() { while (MainWindow.keySkill5 != System.Windows.Forms.Keys.None && MainWindow.delaySkill5 > 0 && MainWindow.timeSkill5 > 0) { mre_KeyPresser.Reset(); mre_PickUp.Reset(); Thread.Sleep(500); Hack.KeyPress(MainWindow.WindowHwnd, MainWindow.keySkill5); Thread.Sleep(MainWindow.delaySkill5); mre_KeyPresser.Set(); mre_PickUp.Set(); Thread.Sleep(MainWindow.timeSkill5 * 1000 - MainWindow.delaySkill5); } }
static void GoToFloor(int targetFloor) //腳踩地才能CALL { if (targetFloor - nowFloor == 0) { return; } else if (targetFloor - nowFloor > 1) { GoToFloor(targetFloor - 1); } else if (targetFloor - nowFloor < -1) { GoToFloor(targetFloor + 1); } if (targetFloor - nowFloor == 1) { int originFloor = nowFloor; while (originFloor == nowFloor) { Hack.KeyDown(WindowHwnd, Keys.Down); Thread.Sleep(50); Hack.KeyPress(WindowHwnd, MainWindow.keyJump); Thread.Sleep(30); Hack.KeyUp(WindowHwnd, Keys.Down); } } else if (targetFloor - nowFloor == -1) { int originFloor = nowFloor; while (originFloor == nowFloor) { if (targetFloor == 4) { RopeClimbing(-498, true, 792, 1032, 60, 60); } else if (targetFloor == 3) { RopeClimbing(-766, true, 552, 792, 60, 60); } else if (targetFloor == 2) { RopeClimbing(-498, true, 312, 552, 60, 60); } else if (targetFloor == 1) { RopeClimbing(-766, true, 72, 312, 60, 60); } } } }
internal static void bossing() { int CharacterX, CharacterY, CharacterStatus; int originX = getCharacterX(); int originY = getCharacterY(); while (true) { CharacterX = getCharacterX(); CharacterY = getCharacterY(); CharacterStatus = getCharacterStatus(); if (Distance(0, CharacterY, 0, originY) > 100) { SystemSounds.Beep.Play(); //Thread.Sleep(200); break; } AutoKey.mre_KeyPresser.Reset(); if (Distance(CharacterX, CharacterY, originX, originY) > 50) { GoToX(originX, 8, false, false, 0); } if (bossingFaceTo == 1) { while (CharacterStatus % 2 != 1) { CharacterStatus = getCharacterStatus(); Hack.KeyDown(WindowHwnd, Keys.Left); Thread.Sleep(20); Hack.KeyUp(WindowHwnd, Keys.Left); Thread.Sleep(100); } } else if (bossingFaceTo == 2) { while (CharacterStatus % 2 != 0) { CharacterStatus = getCharacterStatus(); Hack.KeyDown(WindowHwnd, Keys.Right); Thread.Sleep(20); Hack.KeyUp(WindowHwnd, Keys.Right); Thread.Sleep(100); } } AutoKey.mre_KeyPresser.Set(); Thread.Sleep(1); } }
static void GoToFloor(int targetFloor)//腳踩地才能CALL { if (targetFloor - nowFloor == 0) { return; } else if (targetFloor - nowFloor > 1) { GoToFloor(targetFloor - 1); } else if (targetFloor - nowFloor < -1) { GoToFloor(targetFloor + 1); } if (targetFloor - nowFloor == 1) { int originFloor = nowFloor; while (originFloor == nowFloor) { Hack.KeyDown(WindowHwnd, Keys.Down); Thread.Sleep(50); Hack.KeyPress(WindowHwnd, MainWindow.keyTeleport); Thread.Sleep(30); Hack.KeyUp(WindowHwnd, Keys.Down); } } else if (targetFloor - nowFloor == -1) { int originFloor = nowFloor; while (originFloor == nowFloor) { if (targetFloor == 3) { SpecialRopeClimbing(631, true, -136, 104, 60, 60, DateTime.Now); } else if (targetFloor == 2) { SpecialRopeClimbing(765, true, -376, -136, 60, 60, DateTime.Now); } else if (targetFloor == 1) { SpecialRopeClimbing(572, true, 572, -510, 60, 60, DateTime.Now); } } } }
private void timer1_Tick(object sender, EventArgs e) { if (MainWindow.isBind) { label_AttackCount.Content = "攻擊次數: " + Hack.ReadInt(MainWindow.process, MainWindow.AttackCountBaseAdr, MainWindow.AttackCountOffset); label_HpAlert.Content = "HP警告: " + Hack.ReadInt(MainWindow.process, MainWindow.HpAlarmBaseAdr, MainWindow.HpAlarmOffset); label_MpAlert.Content = "MP警告: " + Hack.ReadInt(MainWindow.process, MainWindow.MpAlarmBaseAdr, MainWindow.MpAlarmOffset); label_HpValue.Content = "HP值: " + (double)Hack.ReadInt(MainWindow.process, MainWindow.HpValueBaseAdr, MainWindow.HpValueOffset) / Hack.ReadInt(MainWindow.process, MainWindow.HpAlarmBaseAdr, MainWindow.HpAlarmOffset) * 20; label_MpValue.Content = "MP值: " + (double)Hack.ReadInt(MainWindow.process, MainWindow.MpValueBaseAdr, MainWindow.MpValueOffset) / Hack.ReadInt(MainWindow.process, MainWindow.MpAlarmBaseAdr, MainWindow.MpAlarmOffset) * 20; label_Exp.Content = "經驗值: " + Math.Round(Hack.ReadDouble(MainWindow.process, MainWindow.ExpPercentBaseAdr, MainWindow.ExpPercentOffset), 2) + "%"; label_PlayerCount.Content = "地圖玩家數量: " + Hack.ReadInt(MainWindow.process, MainWindow.PlayerCountBaseAdr, MainWindow.PlayerCountOffset); label_MobCount.Content = "地圖怪物數量: " + Hack.ReadInt(MainWindow.process, MainWindow.MobCountBaseAdr, MainWindow.MobCountOffset); label_CharacterStates.Content = "角色狀態: " + Hack.ReadInt(MainWindow.process, MainWindow.CharacterStatusBaseAdr, MainWindow.CharacterStatusOffset); label_CharacterX.Content = "角色X座標: " + Hack.ReadInt(MainWindow.process, MainWindow.CharacterXBaseAdr, MainWindow.CharacterXOffset); label_CharacterY.Content = "角色Y座標: " + Hack.ReadInt(MainWindow.process, MainWindow.CharacterYBaseAdr, MainWindow.CharacterYOffset); //int a = Hack.ReadInt(MainWindow.process, MainWindow.CharacterYBaseAdr, MainWindow.CharacterYOffset); //if (a < 53) Debug.Write(a + " "); label_MapID.Content = "地圖編號: " + Hack.ReadInt(MainWindow.process, MainWindow.MapIDBaseAdr, MainWindow.MapIDOffset); } }
internal static void selling() { int clientX = 544, clientY = 434; int screenX, screenY, nowX, nowY, sureSellScreenX, sureSellScreenY; Hack.ClientToScreen(MainWindow.WindowHwnd, clientX, clientY, out screenX, out screenY); nowX = screenX; nowY = screenY; Hack.MoveTo(screenX, screenY); Hack.ClientToScreen(MainWindow.WindowHwnd, 297, 271, out sureSellScreenX, out sureSellScreenY); while (nowX == screenX && nowY == screenY) { Hack.GetMousePosition(out nowX, out nowY); Hack.LeftDoubleClick(); if (Hack.CompareColor(IntPtr.Zero, sureSellScreenX, sureSellScreenY, "4488BB", "000000")) { Hack.KeyPress(MainWindow.WindowHwnd, Keys.Enter); } } }
static void gotoFloor(int targetFloor) { while (nowFloor != targetFloor) { if (targetFloor == 3) { while (nowFloor != 3) { GoToX(0); Hack.KeyDown(WindowHwnd, Keys.Down); Thread.Sleep(50); Hack.KeyPress(WindowHwnd, MainWindow.keyJump); Thread.Sleep(30); Hack.KeyUp(WindowHwnd, Keys.Down); } } if (Math.Abs(targetFloor - nowFloor) > 1) { gotoFloor(targetFloor - 1); gotoFloor(targetFloor + 1); } else if (targetFloor == 2 && nowFloor == 3) { GoToX(-290, 0, true, true, 2); } else if (targetFloor == 4 && nowFloor == 3) { GoToX(290, 0, true, true, 4); } else if (targetFloor == 1 && nowFloor == 2) { GoToX(-825, 0, true, true, 1); } else if (targetFloor == 5 && nowFloor == 4) { GoToX(770, 0, true, true, 5); } } }
static void gotoFloor(int targetFloor) { while (nowFloor != targetFloor) { if (nowFloor == 0) { return; } else if (targetFloor - nowFloor > 1) { gotoFloor(targetFloor - 1); } else if (targetFloor - nowFloor < -1) { gotoFloor(targetFloor + 1); } else if (targetFloor == 2 && nowFloor == 1) { Hack.KeyDown(WindowHwnd, Keys.Down); Thread.Sleep(50); Hack.KeyPress(WindowHwnd, MainWindow.keyJump); Thread.Sleep(30); Hack.KeyUp(WindowHwnd, Keys.Down); } else if (targetFloor == 3 && nowFloor == 2) { Hack.KeyDown(WindowHwnd, Keys.Down); Thread.Sleep(50); Hack.KeyPress(WindowHwnd, MainWindow.keyJump); Thread.Sleep(30); Hack.KeyUp(WindowHwnd, Keys.Down); } else if (targetFloor == 2 && nowFloor == 3) { RopeClimbing(-330, false, -196, 104, 60, 60); } } }
internal static void SpecialRopeClimbing(int coorX, bool isClimbToTop, int topBoundary, int floorY, int leftDistance, int rightDistance) { int CharacterX, CharacterY, CharacterStatus; CharacterStatus = Hack.ReadInt(MainWindow.process, MainWindow.CharacterStatusBaseAdr, MainWindow.CharacterStatusOffset); if (isStand()) { GoToNearX(coorX, leftDistance, rightDistance); if (nowFloor == 3) { Hack.KeyPress(WindowHwnd, MainWindow.keyJump); GoToXInAir(coorX, 4, true, true); } } CharacterX = Hack.ReadInt(MainWindow.process, MainWindow.CharacterXBaseAdr, MainWindow.CharacterXOffset); CharacterY = Hack.ReadInt(MainWindow.process, MainWindow.CharacterYBaseAdr, MainWindow.CharacterYOffset); CharacterStatus = Hack.ReadInt(MainWindow.process, MainWindow.CharacterStatusBaseAdr, MainWindow.CharacterStatusOffset); if (CharacterY > floorY) { return; } else if ((isClimbToTop && (CharacterY <= topBoundary) && ((CharacterStatus < 14) || (CharacterStatus > 17))) || (isClimbToTop == false) && (CharacterY <= topBoundary)) { Thread.Sleep(1); Hack.KeyUp(WindowHwnd, Keys.Up); Hack.KeyUp(WindowHwnd, Keys.Right); Hack.KeyUp(WindowHwnd, Keys.Left); return; } else if (CharacterX >= coorX - 20 && CharacterX <= coorX + 20 && CharacterY <= floorY) { Hack.KeyDown(WindowHwnd, Keys.Up); } }
internal static void botting()//大幽靈 { int counter = 0; if (isOnRope() && getCharacterX() != -92) { RopeExiting(true); } //training start while (true) { if (counter % 6 == 0) { //go to position start RopeClimbing(-92, false, 36, 198, 60, 60); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo1); } Thread.Sleep(MainWindow.delayComboKey1); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo2); } Thread.Sleep(MainWindow.delayComboKey2); AutoKey.mre_PickUp.Set(); RopeExiting(false); } else if (counter % 3 == 0) { //go to position start RopeClimbing(-92, false, 36, 198, 60, 60); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keySkill); } Thread.Sleep(1000); AutoKey.mre_PickUp.Set(); RopeExiting(false); } GoToX(438); upstairTeleport(73); Attack(1); upstairTeleport(-47); GoToX(1214); upstairTeleport(73); Attack(1); upstairTeleport(-17); GoToX(1732); Attack(1); JumpingOver(1800, false); GoToX(2428); upstairTeleport(73); Attack(1); GoToX(1648); Attack(1); GoToX(904); upstairTeleport(73); Attack(1); counter++; } }
internal static void bottingPlatoonChronosTraining() { int counter = 0; Thread.Sleep(500); if (isOnRope() && getCharacterX() != -766) { RopeExiting(true); } //training start while (true) { if (counter % 10 == 0) { //go to position start if (getCharacterX() != -766) { GoToFloor(4); } RopeClimbing(-766, false, 656, 792, 60, 60); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo1); } Thread.Sleep(MainWindow.delayComboKey1); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo2); } Thread.Sleep(MainWindow.delayComboKey2); AutoKey.mre_PickUp.Set(); RopeClimbing(-766, true, 552, 792, 60, 60); } else if (counter % 5 == 0) { //go to position start if (getCharacterX() != -766) { GoToFloor(4); } RopeClimbing(-766, false, 656, 792, 60, 60); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keySkill); } Thread.Sleep(1000); AutoKey.mre_PickUp.Set(); RopeClimbing(-766, true, 552, 792, 60, 60); } GoToFloor(3); GoToX(-498); Attack(1); GoToX(-54); Attack(1); GoToFloor(4); GoToX(226); Attack(1); GoToX(-498); Attack(1); counter++; } }
static void training2hit() { int counter = 0; if (isOnRope() && getCharacterX() != 294) { RopeExiting(true); } //training start while (true) { if (counter % 6 == 0) { //go to position start GoToLocationInWater(294, 920, 8, true, true, 0); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo1); } Thread.Sleep(MainWindow.delayComboKey1); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo2); } Thread.Sleep(MainWindow.delayComboKey2); AutoKey.mre_PickUp.Set(); RopeExiting(true); GoToLocationInWater(50, 887); } else if (counter % 3 == 0) { //go to position start GoToLocationInWater(294, 920, 8, true, true, 0); //go to position end AutoKey.mre_PickUp.Reset(); //for (int i = 0; i < 25; i++) Hack.KeyDown(WindowHwnd, MainWindow.keySkill); Thread.Sleep(1000); Hack.KeyUp(WindowHwnd, MainWindow.keySkill); AutoKey.mre_PickUp.Set(); RopeExiting(true); GoToLocationInWater(50, 887); } GoToLocationInWater(-141, -141); Attack(1); GoToLocationInWater(-50, -110); Attack(1); GoToLocationInWater(-50, 185); Attack(2); GoToLocationInWater(-50, 561); Attack(1); GoToLocationInWater(-50, 776); Attack(1); GoToLocationInWater(-50, 996); Attack(1); GoToLocationInWater(-200, 1225); Attack(3); counter++; } }
internal static void training() { int counter = 0; Thread.Sleep(500); //training start while (true) { if (counter % 4 == 0) { //go to position start gotoFloor(3); GoToX(-325, 0, true, false, 0); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo1); } Thread.Sleep(MainWindow.delayComboKey1); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo2); } Thread.Sleep(MainWindow.delayComboKey2); AutoKey.mre_PickUp.Set(); } else if (counter % 2 == 0) { //go to position start gotoFloor(3); GoToX(-325, 0, true, false, 0); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keySkill); } Thread.Sleep(1500); AutoKey.mre_PickUp.Set(); } gotoFloor(2); Attack(1); gotoFloor(1); GoToX(-1300); Attack(1); GoToX(-810); Attack(1); GoToX(-345); Attack(1); GoToX(0); Attack(2); gotoFloor(4); Attack(1); gotoFloor(5); GoToX(1300); Attack(1); GoToX(810); Attack(1); GoToX(345); Attack(1); GoToX(0); Attack(2); counter++; } }
static void training1hit() { int counter = 0; Thread.Sleep(500); if (isOnRope() && getCharacterX() != -330) { RopeExiting(true); } //training start while (true) { if (counter % 8 == 0) { //go to position start int CharacterStatus = getCharacterStatus(); if (nowFloor != 3 && (CharacterStatus < 14 || CharacterStatus > 17)) { gotoFloor(3); } RopeClimbing(-330, false, -46, 104, 60, 60); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo1); } Thread.Sleep(MainWindow.delayComboKey1); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo2); } Thread.Sleep(MainWindow.delayComboKey2); AutoKey.mre_PickUp.Set(); RopeExiting(true); /* * RopeClimbing(-330, false, -196, 104, 60, 60); * GoToX(117, 20, false, false, 0); * //Attack(1); * GoToX(738, 20, false, false, 0); * gotoFloor(3); * Attack(1); * GoToX(117); * Attack(2); */ } else if (counter % 4 == 0) { //go to position start int CharacterStatus = getCharacterStatus(); if (nowFloor != 3 && (CharacterStatus < 14 || CharacterStatus > 17)) { gotoFloor(3); } RopeClimbing(-330, false, -46, 104, 60, 60); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keySkill); } Thread.Sleep(1500); AutoKey.mre_PickUp.Set(); RopeExiting(true); /* * RopeClimbing(-330, false, -196, 104, 60, 60); * GoToX(117, 20, false, false, 0); * //Attack(1); * GoToX(738, 20, false, false, 0); * gotoFloor(3); * Attack(1); * GoToX(117); * Attack(2); */ } GoToX(-494); Attack(1); GoToX(117); Attack(1); GoToX(738); Attack(1); GoToX(117); Attack(1); counter++; } }
internal static new void GoToX(int coorX, int deviation, bool isTeleport, bool isWithUp, int targetFloor) { int CharacterX; int leftBoundary = coorX - deviation; int rightBoundary = coorX + deviation; int leftFarBoundary = coorX - 150; int rightFarBoundary = coorX + 150; while (true) { CharacterX = Hack.ReadInt(MainWindow.process, MainWindow.CharacterXBaseAdr, MainWindow.CharacterXOffset); if (nowFloor == targetFloor) { return; } else if (CharacterX >= leftBoundary && CharacterX <= rightBoundary) { Hack.KeyUp(WindowHwnd, Keys.Up); Hack.KeyUp(WindowHwnd, Keys.Down); Hack.KeyUp(WindowHwnd, Keys.Left); Hack.KeyUp(WindowHwnd, Keys.Right); return; } else if (CharacterX < leftFarBoundary) { Hack.KeyUp(WindowHwnd, Keys.Left); Hack.KeyDown(WindowHwnd, Keys.Right); if (isTeleport) { Hack.KeyPress(WindowHwnd, MainWindow.keyTeleport); } } else if (CharacterX > rightFarBoundary) { Hack.KeyUp(WindowHwnd, Keys.Right); Hack.KeyDown(WindowHwnd, Keys.Left); if (isTeleport) { Hack.KeyPress(WindowHwnd, MainWindow.keyTeleport); } } else if (CharacterX > leftFarBoundary && CharacterX < leftBoundary) { Hack.KeyUp(WindowHwnd, Keys.Left); Hack.KeyDown(WindowHwnd, Keys.Right); if (isWithUp) { Hack.KeyDown(WindowHwnd, Keys.Up); } } else if (CharacterX > rightBoundary && CharacterX < rightFarBoundary) { Hack.KeyUp(WindowHwnd, Keys.Right); Hack.KeyDown(WindowHwnd, Keys.Left); if (isWithUp) { Hack.KeyDown(WindowHwnd, Keys.Up); } } Thread.Sleep(10); } }
internal static void training() { int counter = 0; Thread.Sleep(500); if (isOnRope() && getCharacterX() != 869) { RopeExiting(true); } //training start while (true) { if (counter % 6 == 0) { //go to position start int CharacterStatus = getCharacterStatus(); if (nowFloor != 3 && nowFloor != 4 && (CharacterStatus < 14 || CharacterStatus > 17)) { gotoFloor(4); } RopeClimbing(869, false, -574, -346, -60, 60); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo1); } Thread.Sleep(MainWindow.delayComboKey1); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo2); } Thread.Sleep(MainWindow.delayComboKey2); AutoKey.mre_PickUp.Set(); RopeClimbing(869, true, -727, -346, -60, 60); GoToX(750); Attack(1); gotoFloor(2); Attack(1); gotoFloor(3); GoToX(533); Attack(1); } else if (counter % 3 == 0) { int CharacterStatus = getCharacterStatus(); if (nowFloor != 3 && nowFloor != 4 && (CharacterStatus < 14 || CharacterStatus > 17)) { gotoFloor(4); } RopeClimbing(869, false, -574, -346, -60, 60); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keySkill); } Thread.Sleep(1500); AutoKey.mre_PickUp.Set(); RopeClimbing(869, true, -727, -346, -60, 60); GoToX(750); Attack(1); gotoFloor(2); Attack(1); gotoFloor(3); GoToX(533); Attack(1); } gotoFloor(4); GoToX(490); Attack(1); GoToX(-128); Attack(1); GoToX(490); Attack(1); gotoFloor(3); GoToX(500); Attack(1); gotoFloor(2); Attack(1); gotoFloor(3); GoToX(500); Attack(1); counter++; } }
internal static void bottingGhostShip2Training() { int counter = 0; Thread.Sleep(500); if (isOnRope() && getCharacterX() != 740) { RopeExiting(true); } //training start while (true) { if (counter % 10 == 0) { //go to position start if (getCharacterX() != 740) { GoToFloor(2); } RopeClimbing(740, false, -691, -565, 60, 60); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo1); } Thread.Sleep(MainWindow.delayComboKey1); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo2); } Thread.Sleep(MainWindow.delayComboKey2); AutoKey.mre_PickUp.Set(); RopeExiting(true); } else if (counter % 5 == 0) { //go to position start RopeClimbing(740, false, -691, -565, 60, 60); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keySkill); } Thread.Sleep(1000); AutoKey.mre_PickUp.Set(); RopeExiting(true); } GoToX(537); waitForRespawn(); GoToX(537); Attack(1); GoToX(1242); Attack(1); GoToX(1242); waitForRespawn(); GoToX(1242); Attack(1); GoToX(537); Attack(1); counter++; } }
static void gotoFloor(int targetFloor) { while (nowFloor != targetFloor) { if (nowFloor == 0) { return; } else if (targetFloor - nowFloor > 1) { gotoFloor(targetFloor - 1); } else if (targetFloor - nowFloor < -1) { gotoFloor(targetFloor + 1); } else if (targetFloor == 2 && nowFloor == 1) { GoToX(-39); } else if (targetFloor == 3 && nowFloor == 2) { GoToX(-50); Hack.KeyDown(WindowHwnd, Keys.Down); Thread.Sleep(50); Hack.KeyPress(WindowHwnd, MainWindow.keyTeleport); Thread.Sleep(30); Hack.KeyUp(WindowHwnd, Keys.Down); } else if (targetFloor == 4 && nowFloor == 3) { GoToX(533); Hack.KeyDown(WindowHwnd, Keys.Down); Thread.Sleep(50); Hack.KeyPress(WindowHwnd, MainWindow.keyTeleport); Thread.Sleep(30); Hack.KeyUp(WindowHwnd, Keys.Down); } else if (targetFloor == 5 && nowFloor == 4) { GoToX(-128); Hack.KeyDown(WindowHwnd, Keys.Down); Thread.Sleep(50); Hack.KeyPress(WindowHwnd, MainWindow.keyTeleport); Thread.Sleep(30); Hack.KeyUp(WindowHwnd, Keys.Down); } else if (targetFloor == 4 && nowFloor == 5) { GoToX(-128); Hack.KeyDown(WindowHwnd, Keys.Up); Thread.Sleep(50); Hack.KeyPress(WindowHwnd, MainWindow.keyTeleport); Thread.Sleep(30); Hack.KeyUp(WindowHwnd, Keys.Up); } else if (targetFloor == 3 && nowFloor == 4) { GoToX(615); Hack.KeyDown(WindowHwnd, Keys.Up); Thread.Sleep(50); Hack.KeyPress(WindowHwnd, MainWindow.keyTeleport); Thread.Sleep(30); Hack.KeyUp(WindowHwnd, Keys.Up); } else if (targetFloor == 2 && nowFloor == 3) { GoToX(-50); Hack.KeyDown(WindowHwnd, Keys.Up); Thread.Sleep(50); Hack.KeyPress(WindowHwnd, MainWindow.keyTeleport); Thread.Sleep(30); Hack.KeyUp(WindowHwnd, Keys.Up); } else if (targetFloor == 1 && nowFloor == 2) { int CharacterY = getCharacterY(); if (CharacterY > -616) { GoToX(-50); Hack.KeyDown(WindowHwnd, Keys.Up); Thread.Sleep(50); Hack.KeyPress(WindowHwnd, MainWindow.keyTeleport); Thread.Sleep(30); Hack.KeyUp(WindowHwnd, Keys.Up); } GoToX(290); } } }
static void training1hit() { int counter = 0; Thread.Sleep(500); if (isOnRope() && getCharacterX() != -58) { RopeExiting(true); } //training start while (true) { if (counter % 8 == 0) { //go to position start while (getCharacterStatus() < 14 || getCharacterStatus() > 17 || CharacterX != -58 || getCharacterY() > 979) { if (getCharacterStatus() >= 14 && getCharacterStatus() <= 17 && CharacterX != -58) { RopeExiting(true); } GoToFloor(3); if (CharacterX < 0) { SpecialRopeClimbing(-58, false, 979, 1180, 60, -60); } else if (CharacterX > 0) { SpecialRopeClimbing(-58, false, 979, 1180, -75, 75); } } Hack.KeyUp(WindowHwnd, Keys.Up); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo1); } Thread.Sleep(MainWindow.delayComboKey1); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo2); } Thread.Sleep(MainWindow.delayComboKey2); AutoKey.mre_PickUp.Set(); GoToFloor(2); } else if (counter % 4 == 0) { //go to position start while (getCharacterStatus() < 14 || getCharacterStatus() > 17 || CharacterX != -58 || getCharacterY() > 979) { if (getCharacterStatus() >= 14 && getCharacterStatus() <= 17 && CharacterX != -58) { RopeExiting(true); } GoToFloor(3); if (CharacterX < 0) { SpecialRopeClimbing(-58, false, 979, 1180, 60, -60); } else if (CharacterX > 0) { SpecialRopeClimbing(-58, false, 979, 1180, -75, 75); } } Hack.KeyUp(WindowHwnd, Keys.Up); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 50; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keySkill); } AutoKey.mre_PickUp.Set(); GoToFloor(2); } else { while (nowFloor != 2) { GoToFloor(2); } } GoToX(180); Attack(1); GoToX(650); GoToX(878, 20, false, false, 0); Attack(1); if (CharacterX >= 773) { GoToX(878); } GoToX(380); while (getCharacterY() > 1140 && nowFloor == 3) { JumpingOver(350, true); } GoToX(25); Attack(1); /* if (counter % 6 == 0 && counter > 0) * { * GoToFloor(1); * GoToX(-183); * }*/ counter++; } }
internal static void botting()//發條熊 { int CharacterX, CharacterY, counter = 0; if (isOnRope() && getCharacterX() != -320) { RopeExiting(true); } //training start while (true) { if (counter % 5 == 0) { //go to position start do { GoToX(-179); upstairTeleport(6); RopeClimbing(-320, false, -213, 6, -70, 70); CharacterX = Hack.ReadInt(MainWindow.process, MainWindow.CharacterXBaseAdr, MainWindow.CharacterXOffset); CharacterY = Hack.ReadInt(MainWindow.process, MainWindow.CharacterYBaseAdr, MainWindow.CharacterYOffset); } while (CharacterX != -320 && CharacterY > -213); //go to position end AutoKey.mre_PickUp.Reset(); if (counter % 10 == 0) { for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo1); } Thread.Sleep(MainWindow.delayComboKey1); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo2); } Thread.Sleep(MainWindow.delayComboKey2); } else { for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keySkill); } Thread.Sleep(1000); } AutoKey.mre_PickUp.Set(); RopeExiting(true); } GoToX(-607); Attack(1); GoToX(-80); Attack(1); GoToX(598); Attack(1); GoToX(-80); Attack(1); counter++; } }
static void GoToFloor(int targetFloor)//腳踩地才能CALL { if (targetFloor - nowFloor == 0) { return; } else if (targetFloor - nowFloor > 1) { GoToFloor(targetFloor - 1); } else if (targetFloor - nowFloor < -1) { GoToFloor(targetFloor + 1); } if (targetFloor - nowFloor == 1) { int originFloor = nowFloor; while (originFloor == nowFloor) { GoToX(35, 8, true, false, 0); if (originFloor == nowFloor) { Hack.KeyDown(WindowHwnd, Keys.Down); Thread.Sleep(50); Hack.KeyPress(WindowHwnd, MainWindow.keyJump); Thread.Sleep(30); Hack.KeyUp(WindowHwnd, Keys.Down); } } } else if (targetFloor - nowFloor == -1) { int originFloor = nowFloor; while (originFloor == nowFloor) { if (targetFloor == 3) { RopeClimbing(-316, true, 1247, 1480, 60, 60); if (nowFloor == 3) { upstairTeleport(1098); } } else if (targetFloor == 2) { while (getCharacterY() > 875 && nowFloor == 3) { if (CharacterX < 0) { SpecialRopeClimbing(-58, true, 875, 1257, 60, -60); } else if (CharacterX >= 0) { SpecialRopeClimbing(-58, true, 875, 1257, -75, 75); } } if (nowFloor == 2) { upstairTeleport(774); } } else if (targetFloor == 1) { RopeClimbing(-21, true, 481, 780, 60, 60); } } } }
internal static void bottingMasterChronosTraining() { int counter = 0; Thread.Sleep(500); if (isOnRope() && getCharacterX() != -604) { RopeExiting(true); } //training start while (true) { if (counter % 8 == 0) { //go to position start if (getCharacterX() != -604) { GoToFloor(4); } RopeClimbing(-604, false, 826, 1032, 60, 60); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo1); } Thread.Sleep(MainWindow.delayComboKey1); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keyCombo2); } Thread.Sleep(MainWindow.delayComboKey2); AutoKey.mre_PickUp.Set(); RopeClimbing(-604, true, 732, 1032, 60, 60); } else if (counter % 4 == 0) { //go to position start if (getCharacterX() != -604) { GoToFloor(4); } RopeClimbing(-604, false, 826, 1032, 60, 60); //go to position end AutoKey.mre_PickUp.Reset(); for (int i = 0; i < 25; i++) { Hack.KeyPress(WindowHwnd, MainWindow.keySkill); } Thread.Sleep(1000); AutoKey.mre_PickUp.Set(); RopeClimbing(-604, true, 732, 1032, 60, 60); } GoToFloor(2); GoToX(-415); Attack(1); GoToX(-271); JumpingOver(-271, false); GoToX(114); Attack(1); GoToX(416); GoToFloor(4); GoToX(314); Attack(1); GoToX(-604); Attack(1); counter++; } }