Function MoveTo

12/03/2012 14:15 xortexx#1
hello,
I have a problem with the MoveTo function :

Code:
        public void MoveTo(float X, float Y, float Z, float height = -1.0F)
        {        
            int addr1 = MemFunctions.MemReadInt(0xB8FBCC);
            int addr2 = MemFunctions.MemReadInt(addr1 + 0x1C);
            int addr3 = MemFunctions.MemReadInt(addr2 + 0x34);
            int actionStruct = MemFunctions.MemReadInt(addr3 + 0x10C4);
            int actionList = MemFunctions.MemReadInt(actionStruct + 0x30);
            int moveAction = MemFunctions.MemReadInt(actionList + 0x4);

            MemFunctions.MemWriteInt(moveAction + 0x8, 0);  //action finished = 0
            MemFunctions.MemWriteInt(moveAction + 0x14, 1); //Action start = 1
            MemFunctions.MemWriteFloat(moveAction + 0x20, X); // Set X coord
            MemFunctions.MemWriteFloat(moveAction + 0x28, Y); // Set Y coord
            MemFunctions.MemWriteFloat(moveAction + 0x24, Z); // Set Z coord
            MemFunctions.MemWriteFloat(moveAction + 0x68, height); // Set height
            if (height >= 0.0)
            {
                MemFunctions.MemWriteInt(moveAction + 0x64, 26625); //Set 1st var for flying up
                MemFunctions.MemWriteInt(moveAction + 0x6C, 256); // Set 2nd var for flying up
            }
            else
            {
                MemFunctions.MemWriteInt(moveAction + 0x64, 26624); //Set 1st var for not flying up
                MemFunctions.MemWriteInt(moveAction + 0x6C, 65536); // Set 2nd var for not flying up
            }
            MemFunctions.MemWriteInt(moveAction + 0x2C, 0); // Set moveType
            MemFunctions.MemWriteInt(moveAction + 0x34, 0); // Set error
            MemFunctions.MemWriteInt(moveAction + 0x3C, 0); // Set error
            MemFunctions.MemWriteInt(actionStruct + 0xC, moveAction); // Set new actionType
            MemFunctions.MemWriteInt(actionStruct + 0x18, 1); // Set next action position to 1
            MemFunctions.MemWriteInt(actionStruct + 0x14, moveAction); // Set new actionType
        }
Obviously not move the character, i think i have bad offset.
Can you tell me what is the problem?

For Perfect World International
12/03/2012 18:30 Shareen#2
Quote:
int actionStruct = MemFunctions.MemReadInt(addr3 + 0x10C4);
As far as offsets go, this should be 0x1128 I believe
12/03/2012 18:54 xortexx#3
That's right, thank you very much