i would like to pay if someone can solve my problem menu

User Tag List

Results 1 to 9 of 9
  1. #1
    ranassa's Avatar Member
    Reputation
    1
    Join Date
    Oct 2010
    Posts
    37
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    i would like to pay if someone can solve my problem

    my bot is use to select realm and enterworld,move character to somewhere to do something,an addon implement logout,then continue to change another realm and do the same things,loop again and again.

    I use blackmagic to hook,and a different GetLocalizedText to get GluxScreen State without character logging,and LuaDoString to do such as login,selectrealm,enterworld etc,the problem is:
    when i use F5 it works perfectly,but get problem with CTRL+F5.
    when i run it with CTRL+F5,it usually cause client crashed at EnterWorld().


    i don't have too much time in bot researching these days,but i need this bot urgently,if someone can point me and help me work out with winform(windows xp sp3,derectx 9.0c),i would like to pay,i accept paypal.

    i think it's not against the section rule,but i am going to post some my code here


    EnterWold lua
    Code:
    CharacterSelect_SaveCharacterOrder()
    StopGlueAmbience()
    EnterWorld()
    GetLocalizedText
    Code:
    public string GetApiReturn(string variable)
            {
                // Write variable in the allocated memory
                uint codeCave = Memory.AllocateMemory(Encoding.UTF8.GetBytes(variable).Length + 1);
                Memory.WriteBytes(codeCave, Encoding.UTF8.GetBytes(variable));
    
                String[] asm = new String[] 
                {
                    "push 0",
                    "push -1",
                    "mov edx, " + codeCave + "",
                    "push edx",
                    "call " + Script_GetLocalizedTest,
                    "add esp, 0Ch",
                    "retn",
                };
    
                // get value
                string varResult = Encoding.ASCII.GetString(InjectAndExecute(asm));
                Memory.FreeMemory(codeCave);
    
                return varResult;
            }
    some Main Thread code in Form1 class
    Code:
    private void MainThread()
    {
    hook = new FunctionHook(wowPid);
    while (true) { TimerExecute(); }
    }
    
    private void TimerExecute()
    {
    hook.LuaDoString(WowOperater.GetGlueFrameValue());
    frameName = hook.GetApiReturn("glueFrame");
    
    switch (frameName)
    {
    case "login":
    ....
    case "charselect":
    ....
    .......
    }
    Thread.Sleep(500)
    }
    hook,unhook,luadostring,and GetLocalizedText here,i guess problem might be here
    Code:
    using System;
    using System.Collections.Generic;
    using System.Text;
    using Magic;
    using System.Threading;
    
    namespace FlyingWowAssistant
    {
        public class FunctionHook
        {
            public static BlackMagic Memory = new BlackMagic();
            private int _processId = 0;
            private bool hookedFlag = false;
            private static bool injectionFlag = false;
    
            private static uint hookCodeCave = 0;
            private static uint addrCodeCave = 0;
            private static uint retnCodeCave = 0;
    
            #region Offset
            //offset
            private bool initNeeded = true;
            private static uint wowBaseAddr = 0;
            private static uint pEndScene = 0;
    
            private static uint DX_DEVICE = 0xABF2FC;
            private static uint DX_DEVICE_IDX = 0x27F8;
            private static uint ENDSCENE_IDX = 0xA8;
    
            private static uint FrameScript_ExecuteBuffer = 0x43C010;
            private static uint FrameScript__GetLocalizedText = 0x1BB0C0;
            private static uint Script_GetLocalizedTest = 0x43D0F0;
            private static uint ClntObjMgrGetActivePlayerObj = 0x3410;
            private static uint CGPlayer_C__ClickToMove = 0x997E38;
            #endregion
    
            public FunctionHook(int processId)
            {
                _processId = processId;
                Hooking();
            }
    
            public string ReadUint(uint offset)
            {
                return Memory.ReadASCIIString(wowBaseAddr+offset, 50);
    
            }
    
            public string GetApiText(string variable)
            {
                // Write variable in the allocated memory
                uint codeCave = Memory.AllocateMemory(Encoding.UTF8.GetBytes(variable).Length + 1);
                Memory.WriteBytes(codeCave, Encoding.UTF8.GetBytes(variable));
    
                String[] asm = new String[] 
                {
                    "push 0",
                    "push -1",
                    "mov edx, " + codeCave + "",
                    "push edx",
                    "call " + Script_GetLocalizedTest,
                    "add esp, 0Ch",
                    "retn",
                };
    
                // get value
                string varResult = Encoding.ASCII.GetString(InjectAndExecute(asm));
                Memory.FreeMemory(codeCave);
    
                return varResult;
            }
    
            public string GetLocalizedText(string variable)
            {
                // Write variable in the allocated memory
                uint codeCave = Memory.AllocateMemory(Encoding.UTF8.GetBytes(variable).Length + 1);
                Memory.WriteBytes(codeCave, Encoding.UTF8.GetBytes(variable));
    
                String[] asm = new String[] 
                {
                    "call " + ClntObjMgrGetActivePlayerObj,
                    "mov ecx, eax",
                    "push -1",
                    "mov edx, " + codeCave + "",
                    "push edx",
                    "call " + FrameScript__GetLocalizedText,
                    "retn",
                };
    
                // get value
                string varResult = Encoding.ASCII.GetString(InjectAndExecute(asm));
                Memory.FreeMemory(codeCave);
    
                return varResult;
            }
    
            public void LuaDoString(string command)
            {
                // Write value:
                uint codeCave = Memory.AllocateMemory(Encoding.UTF8.GetBytes(command).Length + 1);
                Memory.WriteBytes(codeCave, Encoding.UTF8.GetBytes(command));
    
                // Write the asm stuff for Lua_DoString
                String[] asm = new String[] 
                {
                    "mov eax, " + codeCave,
                    "push 0",
                    "push eax",
                    "push eax",
                    "mov eax, " + (uint)FrameScript_ExecuteBuffer,                          // Lua_DoString
                    "call eax",
                    "add esp, 0xC",
                    "retn",    
                };
    
                // Inject
                InjectAndExecute(asm);
                Memory.FreeMemory(codeCave);
            }
    
            public void ClickToMove(float newX, float newY)
            {
                uint CTM_PUSH = CGPlayer_C__ClickToMove + 0x1C;
                uint CTM_X = CGPlayer_C__ClickToMove + 0x8C;
                uint CTM_Y = CGPlayer_C__ClickToMove + 0x4;
                uint CTM_Z = CGPlayer_C__ClickToMove + 0x4;
    
                Memory.WriteFloat(CTM_X, newX);
                Memory.WriteFloat(CTM_Y, newY);
                Memory.WriteUInt(CTM_PUSH, 4);
            }
    
            //Inir wow BaseAddr;
            private static void InitHook()
            {
                wowBaseAddr = (uint)Memory.MainModule.BaseAddress;
    
                FrameScript_ExecuteBuffer = wowBaseAddr + FrameScript_ExecuteBuffer;
                ClntObjMgrGetActivePlayerObj = wowBaseAddr + ClntObjMgrGetActivePlayerObj;
                FrameScript__GetLocalizedText = wowBaseAddr + FrameScript__GetLocalizedText;
                Script_GetLocalizedTest = wowBaseAddr + Script_GetLocalizedTest;
                CGPlayer_C__ClickToMove = wowBaseAddr + CGPlayer_C__ClickToMove;
    
                uint pDevice = Memory.ReadUInt(wowBaseAddr + DX_DEVICE);
                uint pEnd = Memory.ReadUInt(pDevice + DX_DEVICE_IDX);
                uint pScene = Memory.ReadUInt(pEnd);
                pEndScene = Memory.ReadUInt(pScene + ENDSCENE_IDX);
            }
    
            public void Hooking()
            {
                // Process Connect:
                if (!Memory.IsProcessOpen)
                {
                    Memory.OpenProcessAndThread(_processId);
                }
    
                if (Memory.IsProcessOpen)
                {
                    if (initNeeded)
                    {
                        InitHook();
                        initNeeded = false;
                    }                
    
                    if (Memory.ReadByte(pEndScene) == 0xE9 && (hookCodeCave == 0 || addrCodeCave == 0)) // check if wow is already hooked and dispose Hook
                    {
                        DisposeHooking();
                    }
    
                    if (Memory.ReadByte(pEndScene) != 0xE9) // check if wow is already hooked
                    {
                        try
                        {
                            hookedFlag = false;
                            // allocate memory to store injected code:
                            hookCodeCave = Memory.AllocateMemory(2048);
                            // allocate memory the new injection code pointer:
                            addrCodeCave = Memory.AllocateMemory(0x4);
                            Memory.WriteInt(addrCodeCave, 0);
                            // allocate memory the pointer return value:
                            retnCodeCave = Memory.AllocateMemory(0x4);
                            Memory.WriteInt(retnCodeCave, 0);
    
                            // Generate the STUB to be injected
                            Memory.Asm.Clear(); // $Asm
    
                            // save regs
                            Memory.Asm.AddLine("pushad");
                            Memory.Asm.AddLine("pushfd");
    
                            // Test if you need launch injected code:
                            Memory.Asm.AddLine("mov eax, [" + addrCodeCave + "]");
                            Memory.Asm.AddLine("test eax, eax");
                            Memory.Asm.AddLine("je @out");
    
                            // Launch Fonction:
                            Memory.Asm.AddLine("mov eax, [" + addrCodeCave + "]");
                            Memory.Asm.AddLine("call eax");
    
                            // Copie pointer return value:
                            Memory.Asm.AddLine("mov [" + retnCodeCave + "], eax");
    
                            // Enter value 0 of addresse func inject
                            Memory.Asm.AddLine("mov edx, " + addrCodeCave);
                            Memory.Asm.AddLine("mov ecx, 0");
                            Memory.Asm.AddLine("mov [edx], ecx");
    
                            // Close func
                            Memory.Asm.AddLine("@out:");
    
                            // load reg
                            Memory.Asm.AddLine("popfd");
                            Memory.Asm.AddLine("popad");
    
    
                            // injected code
                            uint sizeAsm = (uint)(Memory.Asm.Assemble().Length);
                            Memory.Asm.Inject(hookCodeCave);
    
                            // Size asm jumpback
                            int sizeJumpBack = 5;
    
                            // copy and save original instructions
                            Memory.Asm.Clear();
                            Memory.Asm.AddLine("mov edi, edi");
                            Memory.Asm.AddLine("push ebp");
                            Memory.Asm.AddLine("mov ebp, esp");
                            Memory.Asm.Inject(hookCodeCave + sizeAsm);
    
                            // create jump back stub
                            Memory.Asm.Clear();
                            Memory.Asm.AddLine("jmp " + (pEndScene + sizeJumpBack));
                            Memory.Asm.Inject(hookCodeCave + sizeAsm + (uint)sizeJumpBack);
    
                            // create hook jump
                            Memory.Asm.Clear(); // $jmpto
                            Memory.Asm.AddLine("jmp " + (hookCodeCave));
                            Memory.Asm.Inject(pEndScene);
                        }
                        catch { hookedFlag = false; return; }
                    }
                    hookedFlag = true;
                }
            }
    
            public void DisposeHooking()
            {
                try
                {
                    if (Memory.ReadByte(pEndScene) == 0xE9) // check if wow is already hooked and dispose Hook
                    {
                        // Restore origine endscene:
                        Memory.Asm.Clear();
                        Memory.Asm.AddLine("mov edi, edi");
                        Memory.Asm.AddLine("push ebp");
                        Memory.Asm.AddLine("mov ebp, esp");
                        Memory.Asm.Inject(pEndScene);
                    }
    
                    // free memory:
                    Memory.FreeMemory(hookCodeCave);
                    Memory.FreeMemory(addrCodeCave);
                    Memory.FreeMemory(retnCodeCave);
    
                } catch {}
            }
    
            public byte[] InjectAndExecute(string[] asm)
            {
                int returnLength = 0;
    
                Hooking();
    
                while (injectionFlag){ Thread.Sleep(5); }            
                injectionFlag = true;
    
                byte[] tempsByte = new byte[0];
    
                // reset return value pointer
                Memory.WriteInt(retnCodeCave, 0);
    
                if (Memory.IsProcessOpen && hookedFlag)
                {
                    // Write the asm stuff
                    Memory.Asm.Clear();
                    foreach (string tempLineAsm in asm)
                    {
                        Memory.Asm.AddLine(tempLineAsm);
                    }
    
                    // Allocation Memory
                    uint codeCave = Memory.AllocateMemory(Memory.Asm.Assemble().Length);
    
                    try
                    {
                        // Inject
                        Memory.Asm.Inject(codeCave);
                        Memory.WriteInt(addrCodeCave, (int)codeCave);
                        while (Memory.ReadInt(addrCodeCave) > 0) { Thread.Sleep(5); } // Wait to launch code
    
                        if (returnLength == 1)
                        {
                            tempsByte = Memory.ReadBytes(retnCodeCave, returnLength);
                        }
                        if (returnLength > 1)
                        {
                            tempsByte = Memory.ReadBytes(Memory.ReadUInt(retnCodeCave), returnLength);
                        }
                        if (returnLength == 0)
                        {
                            byte Buf = new Byte();
                            List<byte> retnByte = new List<byte>();
                            uint dwAddress = Memory.ReadUInt(retnCodeCave);
                            Buf = Memory.ReadByte(dwAddress);
                            while (Buf != 0)
                            {
                                retnByte.Add(Buf);
                                dwAddress = dwAddress + 1;
                                Buf = Memory.ReadByte(dwAddress);
                            }
                            tempsByte = retnByte.ToArray();
                        }
                    }
                    catch { }
                    
                    // Free memory allocated 
                    Memory.FreeMemory(codeCave);
                }
    
                injectionFlag = false;
                return tempsByte;
            }
        }
    }
    Last edited by ranassa; 12-03-2011 at 09:44 PM.

    i would like to pay if someone can solve my problem
  2. #2
    junsen313's Avatar Private
    Reputation
    1
    Join Date
    Feb 2011
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    may be you can try this:
    DoString("CharacterSelect_EnterWorld()")

  3. #3
    ranassa's Avatar Member
    Reputation
    1
    Join Date
    Oct 2010
    Posts
    37
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    have tried it but still thanks,

    i got warning:Referenced assembly "bin\debug\fasmdll_managed.dll"targets a different processor than the application
    i use x86,it that because of i use a x64 fasmdll_managed.dll?where to get the x86 fasmdll_managed.dll?

  4. #4
    ranassa's Avatar Member
    Reputation
    1
    Join Date
    Oct 2010
    Posts
    37
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anyone here?bump

  5. #5
    ranassa's Avatar Member
    Reputation
    1
    Join Date
    Oct 2010
    Posts
    37
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i choose x86 for my project,the warning"Referenced assembly "bin\debug\fasmdll_managed.dll"targets a different processor than the application" disappears,but the problem is now still here
    Last edited by ranassa; 12-05-2011 at 03:06 AM.

  6. #6
    ranassa's Avatar Member
    Reputation
    1
    Join Date
    Oct 2010
    Posts
    37
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anyone have time to do it please just tell me

  7. #7
    streppel's Avatar Active Member
    Reputation
    78
    Join Date
    Mar 2007
    Posts
    196
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try commenting out
    Code:
    /*if (Memory.ReadByte(pEndScene) == 0xE9 && (hookCodeCave == 0 || addrCodeCave == 0)) // check if wow is already hooked and dispose Hook                 {                     DisposeHooking();                 }*/
    already wrote in the other thread that this was my problem....and stop creating several threads on the same topic aswell as pushing it 3 times a day. seriously i'm no mod,but i'm sure they wouldn't want to see something like this either

  8. #8
    ranassa's Avatar Member
    Reputation
    1
    Join Date
    Oct 2010
    Posts
    37
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you run it in debug mode,i mean press F5 to run it,is that ok?

  9. #9
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ranassa View Post
    when i run it with CTRL+F5,it usually cause client crashed at EnterWorld().
    So attach a debugger when it crashes to see where and why.

Similar Threads

  1. [Buying] Hey im paying 5$ through paypal if someone can help me out!
    By faridpob in forum World of Warcraft Buy Sell Trade
    Replies: 6
    Last Post: 03-06-2011, 09:32 PM
  2. LF Someone who would like a a 1-70 thing on hes account [EU]
    By ThunderSS in forum World of Warcraft General
    Replies: 5
    Last Post: 03-30-2008, 07:34 AM
  3. I would like peoples opinion here if you can
    By wizardlord in forum World of Warcraft Emulator Servers
    Replies: 14
    Last Post: 01-25-2008, 12:08 PM
  4. +rep if you can solve this problem with my rev
    By mafiaboy in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 12-09-2007, 01:06 AM
All times are GMT -5. The time now is 07:17 PM. 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