Ejemplo n.º 1
0
 public void Update()
 {
     if ((int)this._iConsoleTime != 0 && this._iConsoleTime >= Game.Time())
     {
         Dialog dialog = Game.DialogList.GetDialog("chat_input_dialog", false);
         Thread.Sleep(500);
         if (dialog == null)
         {
             return;
         }
         if (!dialog.IsVisible())
         {
             this._iConsoleTime = 0U;
             return;
         }
         PlayerInput.PostMessage(Game.Process.ProcessWindowHandle, 256U, 13U, 0U);
     }
     if ((int)this._iClickTime == 0 || this._iClickTime >= Game.Time())
     {
         return;
     }
     PlayerInput.SendMessage(Game.Process.ProcessWindowHandle, 514U, 1U, 0U);
     Game.Process.SetByte(this._iBase + (ulong)Game.Resolver["ControllerSingleInput"]["ClickDisabler"].Value, (byte)2);
     this._iClickTime = 0U;
 }
Ejemplo n.º 2
0
        public bool Console(string zMessage)
        {
            Dialog dialog = Game.DialogList.GetDialog("chat_input_dialog", false);
            long   ticks  = DateTime.Now.Ticks;

            if (dialog == null || dialog.IsVisible())
            {
                return(false);
            }
            if ((long)this._iConsolePointer == 0L)
            {
                ulong address = dialog.GetAddress();
                uint  num     = Game.Resolver["ControllerSingleInput"]["ConsoleMap"].Value;
                ulong pointer = Game.Process.GetPointer(address + (ulong)num);
                if ((int)Game.Process.GetUnsignedInteger(pointer + (ulong)Game.Resolver["ControllerSingleInput"]["ConsoleMapLength"].Value) == 256)
                {
                    this._iConsolePointer = Game.Process.GetPointer(pointer + (ulong)Game.Resolver["ControllerSingleInput"]["ConsoleMapPointer"].Value);
                }
                else
                {
                    this._iConsolePointer = Game.Process.MemoryAllocate(512UL, MemoryProtection.ExecuteReadWrite, MemoryAllocationType.Commit);
                    if ((long)this._iConsolePointer == 0L)
                    {
                        return(false);
                    }
                    Game.Process.SetPointer(pointer + (ulong)Game.Resolver["ControllerSingleInput"]["ConsoleMapPointer"].Value, this._iConsolePointer);
                    Game.Process.SetUnsignedInteger(pointer + (ulong)Game.Resolver["ControllerSingleInput"]["ConsoleMapLength"].Value, 256U);
                }
            }
            Game.Process.SetString(this._iConsolePointer, zMessage, 512U, MessageHandlerString.Unicode);
            PlayerInput.PostMessage(Game.Process.ProcessWindowHandle, 256U, 13U, 0U);
            PlayerInput.PostMessage(Game.Process.ProcessWindowHandle, 256U, 13U, 0U);
            while ((int)Game.Process.GetByte(this._iConsolePointer) != 0)
            {
                if ((DateTime.Now.Ticks - ticks) / 10000L >= 500L)
                {
                    this._iConsoleTime = Game.Time() + 30000U;
                    break;
                }
                Thread.Sleep(10);
            }
            return(true);
        }
Ejemplo n.º 3
0
 protected override void WndProc(ref Message m)
 {
     if (m.Msg == 786)
     {
         Keys         hKey             = (Keys)((int)m.LParam >> 16 & (int)ushort.MaxValue);
         KeysModifier hModifier        = (KeysModifier)((int)m.LParam & (int)ushort.MaxValue);
         uint         foregroundWindow = PlayerKey.GetForegroundWindow();
         Dialog       dialog           = Game.DialogList == null ? (Dialog)null : Game.DialogList.GetDialog("chat_input_dialog", false);
         for (int index = 0; index < PlayerKey._hHotKey.Count; ++index)
         {
             if (PlayerKey._hHotKey[index] != null && (Keys)PlayerKey._hHotKey[index][1] == hKey && (KeysModifier)PlayerKey._hHotKey[index][2] == hModifier)
             {
                 if ((int)foregroundWindow == (int)Game.Process.ProcessWindowHandle && (dialog == null || !dialog.IsVisible()))
                 {
                     if ((bool)PlayerKey._hHotKey[index][3])
                     {
                         ((AionEventKeyHandler)PlayerKey._hHotKey[index][0])(hKey, hModifier);
                         break;
                     }
                     ((AionEventHandler)PlayerKey._hHotKey[index][0])();
                     break;
                 }
                 PlayerKey.UnregisterHotKey(this.Handle, index + 1);
                 PlayerKey.keybd_event((byte)hKey, (byte)69, 1U, UIntPtr.Zero);
                 PlayerKey.keybd_event((byte)hKey, (byte)69, 3U, UIntPtr.Zero);
                 PlayerKey.RegisterHotKey(this.Handle, index + 1, (uint)hModifier, (uint)hKey);
                 break;
             }
         }
     }
     else
     {
         base.WndProc(ref m);
     }
 }
Ejemplo n.º 4
0
        public Player Update()
        {
            Dialog dialog = Game.DialogList == null ? (Dialog)null : Game.DialogList.GetDialog("target_dialog", true);
            ProcessCommunicationPointer communicationPointer = Game.Process[this._iBase + (ulong)Game.Resolver["ControllerSingle"]["Brand"].Value].ToBuffered(56UL);

            this.UpdateCamera();
            this.UpdatePosition();
            this._iID = this.GetID(this._iBase);
            if (this._zName == null)
            {
                this._zName = this.GetName(this._iBase);
            }
            if ((int)this._bLevel == 0)
            {
                this._bLevel = Game.Process.GetByte(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["Level"].Value);
            }
            Entity entity;

            if (Game.EntityList != null && (entity = Game.EntityList.GetEntity(this._iID)) != null)
            {
                this._iEntityNode = entity.GetAddress(1);
                base.Update();
                Game.DialogList.GetDialog("skill_delay_dialog", false);
                if (this.IsMoving() && this._iMoveTime < Game.Time())
                {
                    if (this._hMoveCheck.Equals((object)this._hPosition))
                    {
                        this._eActionPending = this._eAction;
                        this.SetAction(eAction.None);
                        this._iActionPending = Game.Time() + 500U;
                    }
                    this._hMoveCheck = this._hPosition;
                    this._iMoveTime  = Game.Time() + 1000U;
                }
                this._eAction = (eAction)Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["Action"].Value);
                if ((int)this._iActionPending != 0 && this._iActionPending < Game.Time())
                {
                    if ((this._eAction == eAction.MoveForward && this._eActionPending == eAction.MoveForward || this._eAction == eAction.None) && this._eActionPending == eAction.MoveForward)
                    {
                        Player.PostMessage(Game.Process.ProcessWindowHandle, 256U, 144U, 0U);
                        Player.PostMessage(Game.Process.ProcessWindowHandle, 257U, 144U, 0U);
                    }
                    else
                    {
                        this.SetAction(this._eActionPending);
                    }
                    this._iActionPending = 0U;
                }
            }
            try
            {
                uint num = Game.Resolver["ControllerSingleCheat"]["GravitySkills"].Value;
                if (Game.Resolver["ControllerSingleCheat"]["GravityFlying"] != null)
                {
                    if (Game.Resolver["ControllerSingleCheat"]["GravitySkills"] != null)
                    {
                        if (this._iGravityPatchTimer >= Game.Time())
                        {
                            if (!this._bGravityLock)
                            {
                                if (Game.Player.GetStance() != eStance.Normal)
                                {
                                    if (Game.Player.GetStance() != eStance.Combat)
                                    {
                                        goto label_29;
                                    }
                                }
                                Game.Process.SetUnsignedInteger(Game.Player.GetAddress(0) + (ulong)Game.Resolver["ActorSingle"]["Stance"].Value, Game.Player.GetStance() == eStance.Combat ? 5U : 4U);
                                Game.Process.SetByte(Game.Base() + (ulong)Game.Resolver["ControllerSingleCheat"]["GravityFlying"].Value, (byte)0);
                                if ((int)num != 0)
                                {
                                    Game.Process.SetUnsignedShort(Game.Base() + (ulong)num, (ushort)37008);
                                }
                                this._bGravityLock = true;
                            }
                        }
                        else if (this._bGravityLock)
                        {
                            Game.Process.SetUnsignedInteger(Game.Player.GetAddress(0) + (ulong)Game.Resolver["ActorSingle"]["Stance"].Value, Game.Player.GetStance() == eStance.FlyingCombat ? 1U : 0U);
                            Game.Process.SetByte(Game.Base() + (ulong)Game.Resolver["ControllerSingleCheat"]["GravityFlying"].Value, (byte)1);
                            if ((int)num != 0)
                            {
                                Game.Process.SetUnsignedShort(Game.Base() + (ulong)num, (ushort)49203);
                            }
                            this._bGravityLock = false;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }
label_29:
            this._fAttackRange           = Game.Process.GetFloat(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["AttackRange"].Value);
            this._hMoveClick             = new Vector3D(0.0f, 0.0f, 0.0f);
            this._iManaMaximum           = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["ManaMaximum"].Value);
            this._iManaCurrent           = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["ManaCurrent"].Value);
            this._iFlightTimeCurrent     = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["FlightTimeCurrent"].Value);
            this._iFlightTimeMaximum     = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["FlightTimeMaximum"].Value);
            this._iExperienceCurrent     = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["ExperienceCurrent"].Value);
            this._iExperienceRecoverable = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["ExperienceRecoverable"].Value);
            this._iExperienceRequired    = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["ExperienceMaximum"].Value);
            this._iFlightCooldown        = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["FlightCooldownRemainingTime"].Value);
            this._iWorld  = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["WorldId"].Value) / 10000U * 10000U;
            this._zMarked = Game.Process.GetString(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["NameSearch"].Value, 128U, MessageHandlerString.Unicode);
            for (uint index = 0; index < 14U; ++index)
            {
                this._hBrand[index + 1U] = communicationPointer.GetUnsignedInteger((ulong)(index * 4U));
            }
            if (dialog != null && dialog.IsVisible())
            {
                ulong address = dialog.GetAddress();
                this._iTargetID = Game.Process.GetUnsignedInteger(address + (ulong)Game.Resolver["ControllerSingle"]["TargetOffset"].Value);
            }
            return(this);
        }