Пример #1
0
        public void start()
        {
            // Looting class for better looting
            looting.loot();

            // Fight!
            skillsystem.skill_activation();
            keyusing.skill_activation();
        }
Пример #2
0
        private void attacking()
        {
            if (stats.player_targetid() != 0)
            {
                // Reduce the distance to the next position for ctm
                stats.player_ctm_distance(Properties.Settings.Default.attack_range - randomnr.create(0.0, 0.3));

                // Unstucking prewarm
                if (stats.player_ctm_push() == 2)
                {
                    // Prewarm for attack unstucking
                    unstucking_system_attack.Start();
                }
            }

            if (stats.player_targetid() != 0)
            {
                // Prewarm for normal unstucking
                unstucking_system_prewarm.Start(); // Start unstucking prewarm
            }

            if (TargetInfo.target_distance_toplayer > Properties.Settings.Default.attack_range && TargetInfo.target_id != 0) // Do this only if the target is out of range
            {
                // Set the ctm to the target's position
                stats.player_ctm_x(TargetInfo.target_position_x);
                stats.player_ctm_y(TargetInfo.target_position_y);

                // Interact/Push
                if (stats.player_ctm_push() != 2 && stats.player_targetid() != 0)
                {
                    stats.player_ctm_push(2);
                }
            }
            else if (TargetInfo.target_distance_toplayer < Properties.Settings.Default.attack_range | TargetInfo.target_id == 0)
            {
                stats.player_ctm_push(4294967295);
            }

            // Activate skills
            skillsystem.skill_activation();    // Skill system
            keyusingsystem.skill_activation(); // Key using

            // Move if mob is casting
            //castingmovement.move();

            if (TargetInfo.target_distance_toplayer < Properties.Settings.Default.attack_range && TargetInfo.target_id != 0 && Properties.Settings.Default.fight_movement_enabled)
            {
                // Fight movement
                fightmovement.move();
            }
        }
Пример #3
0
        public void attacking()
        {
            if (stats.player_targetid() != 0)
            {
                // Push CTM to target
                if (!unstucking_now)
                {
                    // Reduce the distance to the next position for ctm
                    stats.player_ctm_distance(Properties.Settings.Default.attack_range - randomNr.create(0.0, 0.3));

                    // Set the ctm to the target's position
                    stats.player_ctm_x(TargetInfo.target_position_x);
                    stats.player_ctm_y(TargetInfo.target_position_y);
                    stats.player_ctm_z(TargetInfo.target_position_z);

                    // Interact/Push
                    if (stats.player_ctm_push() != 2)
                    {
                        stats.player_ctm_push(2);
                    }
                }

                // Attack the target
                if (stats.player_aggro() == 0 && !Properties.Settings.Default.gathering_attack_target)
                {
                    stats.player_ctm_interact(1);
                }

                // Check if player got aggro
                if (stats.player_aggro() == 1)
                {
                    // Leave the target
                    if (TargetInfo.target_tid != stats.player_id() && TargetInfo.target_id != 0)
                    {
                        stats.player_targetid(0);
                        System.Threading.Thread.Sleep(1000);
                    }
                }

                // Unstucking prewarm
                if (stats.player_ctm_push() == 2)
                {
                    // Prewarm for attack unstucking
                    unstucking_system_attack.Start();

                    // Prewarm for normal unstucking
                    unstucking_system_prewarm.Start();
                }
            }

            // Move if mob is casting
            castingmovement.move();

            // Activate skills
            keyusingsystem.skill_activation(); // Key using
            skillsystem.skill_activation();    // Skill system

            if (TargetInfo.target_distance_toplayer < Properties.Settings.Default.attack_range && TargetInfo.target_id != 0 && Properties.Settings.Default.fight_movement_enabled)
            {
                if (!Blacklist.blacklist_npc_list.Contains(TargetInfo.target_name) | TargetInfo.target_aggro != 0)
                {
                    // Fight movement
                    fightmovement.move();
                }
            }
        }
Пример #4
0
        public void attacking()
        {
            if (stats.player_targetid() != 0)
            {
                // Unstucking prewarm
                if (stats.player_ctm_push() == 2)
                {
                    // Prewarm for attack unstucking
                    unstucking_system_attack.Start();

                    // Prewarm for normal unstucking
                    unstucking_system_prewarm.Start();
                }
            }

            // Move to the target
            if (TargetInfo.target_distance_toplayer > Properties.Settings.Default.attack_range && TargetInfo.target_id != 0)
            {
                // Reduce the distance to the next position for ctm
                stats.player_ctm_distance(Properties.Settings.Default.attack_range - randomNr.create(0.0, 0.3));

                // Set the ctm to the target's position
                stats.player_ctm_x(TargetInfo.target_position_x);
                stats.player_ctm_y(TargetInfo.target_position_y);
                stats.player_ctm_z(TargetInfo.target_position_z);

                // Interact/Push
                if (stats.player_ctm_push() != 2)
                {
                    stats.player_ctm_push(2);
                }

                //// Attack the target
                //if (TargetInfo.target_aggro == 0)
                //{
                //    stats.player_ctm_interact(1);
                //}
            }

            // Check if mob is bugged or blacklisted
            if (!mob_bugged_check)
            {
                if (TargetInfo.target_aggro != 0 && TargetInfo.target_id != 0)
                {
                    mob_bugged_check = true;
                }
            }
            else
            {
                if (TargetInfo.target_aggro == 0 && TargetInfo.target_id != 0)
                {
                    // Enable unstucking

                    // Stop walking
                    stats.player_ctm_push(4294967295);

                    // Enable unstucking system
                    unstucking_now = true;
                    unstucking_system.Start();

                    // Delete the target
                    stats.player_targetid(0);

                    mob_bugged_check = false; // Reset the check
                }

                if (TargetInfo.target_id == 0)
                {
                    mob_bugged_check = false; // Reset the check
                }
            }

            // Activate skills
            skillsystem.skill_activation();    // Skill system
            keyusingsystem.skill_activation(); // Key using

            if (TargetInfo.target_distance_toplayer < Properties.Settings.Default.attack_range && TargetInfo.target_id != 0 && Properties.Settings.Default.fight_movement_enabled)
            {
                // Move if mob is casting
                castingmovement.move();

                // Fight movement
                fightmovement.move();
            }

            // Enable unstucking again
            if (SkillsSystem.skills_counter > 8)
            {
                // Prewarm for attack unstucking
                unstucking_system_attack.Start();
            }
        }