[HELP AOE spells and TerrainClick menu

User Tag List

Results 1 to 2 of 2
  1. #1
    hqvrrsc4's Avatar Contributor
    Reputation
    251
    Join Date
    Jan 2012
    Posts
    57
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [HELP AOE spells and TerrainClick

    Every time I tried to cast AOE spells at my position, I got an (out of range) error
    Here is my code (c#)

    Code:
    ClickTerrain(ObjectManager.LocalPlayer.XPosition, ObjectManager.LocalPlayer.YPosition, ObjectManager.LocalPlayer.ZPosition);
    Code:
     public static void ClickTerrain(float X, float Y, float Z)
            {
                BlackMagic wow = new BlackMagic();
                wow.OpenProcessAndThread(SProcess.GetProcessFromProcessName("Wow"));
                uint Address = wow.AllocateMemory(20);
                wow.WriteBytes(Address, BitConverter.GetBytes(0));
                wow.WriteBytes(Address + 4, BitConverter.GetBytes(0));
                wow.WriteBytes(Address + 8, BitConverter.GetBytes(X));
                wow.WriteBytes(Address + 12, BitConverter.GetBytes(Y));
                wow.WriteBytes(Address + 0x10, BitConverter.GetBytes(Z));
                wow.Asm.Clear();
                string[] asm = new string[] { 
                    "nop",
                    "nop", 
                    "mov eax, " + Address, 
                    "push eax", 
                    "call " + ((((uint)wow.MainModule.BaseAddress) + 0x4393c0)), 
                    "add esp, 4", 
                    "retn" 
                };
                foreach (string str in asm)
                {
                    wow.Asm.AddLine(str);
                }
                wow.Asm.InjectAndExecute(Address);
                wow.FreeMemory(Address);
                wow.Close();
    
            }
    I got the player position in this way : Wow.ReadFloat(PlayerBase +0x800);
    And I'm sure i got the right position such as (1835.851 -4438.183 108.5703)

    I guess the ClickTerrain code is right, but I don't know how did the (out of range) error message come

    EDIT: SOLVED
    Last edited by hqvrrsc4; 05-29-2013 at 06:23 PM.

    [HELP AOE spells and TerrainClick
  2. #2
    Frosttall's Avatar Active Member
    Reputation
    64
    Join Date
    Feb 2011
    Posts
    261
    Thanks G/R
    16/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1. Why do you have nops in your asm code?

    2. The ClickStruct looks like following:
    Code:
    [StructLayout(LayoutKind.Sequential)]
            internal struct ClickStruct
            {
                public ulong misc;
                //public uint misc;
                public EzLocation loc;
                [MarshalAs(UnmanagedType.U4)] public MouseButton button;
            }
    
            [Flags]
            internal enum MouseButton : uint
            {
                Left = 1,
                Middle = 2,
                None = 0,
                Right = 4,
                XButton1 = 8,
                XButton2 = 0x10
            }
            #endregion
    And you should call it like this:
    Code:
                var click = new ClickStruct
                                {misc = 0, loc = new EzLocation(x, y, z), button = MouseButton.None | MouseButton.Left};
                var ret = TerrainClickASM(click);
    You simply forgot the mousebutton-flag

Similar Threads

  1. Help! Cast aoe Spells
    By starfish99 in forum WoW Memory Editing
    Replies: 1
    Last Post: 11-21-2008, 04:36 AM
  2. Need help GM levels And changing commands will +rep
    By crazyc in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 11-30-2007, 01:11 PM
  3. Need help finding shrubs and bushes
    By blah7 in forum WoW ME Questions and Requests
    Replies: 3
    Last Post: 07-27-2007, 03:41 AM
  4. Few model changes. please help :) , tryed self and failed
    By luddo9 in forum WoW ME Questions and Requests
    Replies: 12
    Last Post: 07-04-2007, 12:32 PM
  5. Spells and skills model changing guide
    By Shaden in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 12-27-2006, 12:10 AM
All times are GMT -5. The time now is 12:02 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search