Exemple #1
0
        public void KeyPressed(int key)
        {
            try
            {
                if (key != (int)VirtualKeys.LeftButton)
                {
                    return;
                }

                oCNpc player = oCNpc.Player(process);
                if (player.Address == 0)
                {
                    return;
                }
                oCAniCtrl_Human aniCtrl = player.AniCtrl;
                if (aniCtrl.Address == 0)
                {
                    return;
                }
                String str = aniCtrl.GetWalkModeString();
                if (str == null)
                {
                    return;
                }

                if (str.Trim().ToLower() != "SNEAK".ToLower() || player.GetTalentSkill(6) == 0 || player.Enemy.Address == 0 ||
                    player.Enemy.CanSee(new zCVob(process, player.Address), 0) == 1 || process.ReadInt(0x00AB27D0) == 2)
                {
                    return;
                }

                player.OpenSteal();
            }
            catch (Exception ex)
            {
                //System.Windows.Forms.MessageBox.Show(ex.Message+" StealContainer failure");
            }
        }