Exemple #1
0
        // Methods
        public static void actionSeq(string[] actionArray, int delay)
        {
            keyEvent event2 = new keyEvent();

            foreach (string str in actionArray)
            {
                if (str.Split(new char[] { ' ' })[0].Equals("A"))
                {
                    event2.alt(str.Split(new char[] { ' ' })[1]);
                }
                else if (str.Split(new char[] { ' ' })[0].Equals("S"))
                {
                    event2.shift(str.Split(new char[] { ' ' })[1]);
                }
                else
                {
                    event2.pressKey(str, 500);
                }
                Thread.Sleep(delay);
            }
        }
Exemple #2
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            bool flag = false;
            int  num  = 0x780;
            int  num2 = 0x438;
            int  num3 = aionUtil.getBaseAddr();

            string[]   actionArray         = this.pullSeq.Text.Split(new char[] { ',' });
            string[]   strArray2           = this.fightSeq1.Text.Split(new char[] { ',' });
            string[]   strArray3           = this.fightSeq2.Text.Split(new char[] { ',' });
            string[]   strArray4           = this.healSeq.Text.Split(new char[] { ',' });
            string[]   strArray5           = this.afterDeathSeq.Text.Split(new char[] { ',' });
            string[]   strArray6           = this.lootKey.Text.Split(new char[] { ',' });
            int        delay               = int.Parse(this.pullDelay.Text);
            int        num5                = int.Parse(this.fight1Delay.Text);
            int        millisecondsTimeout = int.Parse(this.fight2Delay.Text);
            int        num7                = int.Parse(this.healDelay.Text);
            int        num8                = int.Parse(this.afterDeathDelay.Text);
            int        num9                = int.Parse(this.minHealth.Text);
            int        num10               = int.Parse(this.fight_file_name.Text.Split(new char[] { 'x' })[0]);
            int        num11               = int.Parse(this.fight_file_name.Text.Split(new char[] { 'x' })[1]);
            int        x      = (num10 * 0x453) / num;
            int        y      = (num11 * 0x264) / num2;
            keyEvent   event2 = new keyEvent();
            mouseEvent event3 = new mouseEvent();

            Thread.Sleep(0x1388);
            while (this.fightCount == 0)
            {
                if (((aionUtil.hasTarget(num3) == 0) || (aionUtil.getTargetStatus(num3) == 8)) || flag)
                {
                    event2.tab();
                    Thread.Sleep(0x3e8);
                    flag = false;
                }
                if (aionUtil.getTargetStatus(num3) != 9)
                {
                    event2.pressLeft(400);
                    Thread.Sleep(0x7d0);
                    continue;
                }
                aionUtil.actionSeq(actionArray, delay);
                StartTimerCallBack method = new StartTimerCallBack(this.StartTimer);
                base.Invoke(method);
                int num14 = aionUtil.getPlayerHealth(num3);
                int num15 = aionUtil.getTargetHealth(num3);
                while ((aionUtil.getTargetStatus(num3) == 9) && (aionUtil.getPlayerHealth(num3) > 0))
                {
                    aionUtil.actionSeq(strArray2, num5);
                    if (aionUtil.getTargetStatus(num3) != 9)
                    {
                        break;
                    }
                    Thread.Sleep(millisecondsTimeout);
                    aionUtil.actionSeq(strArray3, num5);
                    if (aionUtil.getTargetStatus(num3) != 9)
                    {
                        break;
                    }
                    Thread.Sleep(millisecondsTimeout);
                    if (((this.timer > 400) && (aionUtil.getPlayerHealth(num3) >= num14)) && (aionUtil.getTargetHealth(num3) >= num15))
                    {
                        event2.pressRight(0x640);
                        Thread.Sleep(0x3e8);
                        event2.tab();
                        flag = true;
                        break;
                    }
                    StopTimerCallBack back2 = new StopTimerCallBack(this.StopTimer);
                    base.Invoke(back2);
                }
                StopTimerCallBack back3 = new StopTimerCallBack(this.StopTimer);
                base.Invoke(back3);
                Thread.Sleep(500);
                aionUtil.actionSeq(strArray6, 0x5dc);
                Thread.Sleep(0x3e8);
                if (aionUtil.getPlayerHealth(num3) == 0)
                {
                    Thread.Sleep(0x1388);
                    event3.leftClick(x, y);
                    Thread.Sleep(0x1388);
                    event2.pressKey(this.restKey.Text, 100);
                    Thread.Sleep(0x3a980);
                    event2.pressKey(this.restKey.Text, 100);
                    Thread.Sleep(0xbb8);
                    aionUtil.actionSeq(strArray5, num8);
                    Thread.Sleep(0x3e8);
                    aionUtil.followPath(num3, this.death_file_name.Text);
                }
                else if ((aionUtil.getPlayerHealth(num3) <= num9) && (aionUtil.hasTarget(num3) == 0))
                {
                    Thread.Sleep(0x3e8);
                    aionUtil.actionSeq(strArray4, num7);
                }
                else
                {
                    event2.pressLeft(300);
                }
            }
            this.fightCount = 0;
        }