Code:
Func FlyUp($DesiredHeight)
local $currentX, $currentZ, $FlyMountId
$currentX = memread(memread(memread($GameAdress) + 0x20) + 0x3c, 'float')
$currentZ = memread(memread(memread($GameAdress) + 0x20) + 0x44, 'float')
$FlyMountId = memread(memread(memread($GameAdress) +0x20) + 0x534)
if memread(memread(memread($GameAdress) + 0x20) + 0x5e0) = 0 then
useItem(12,$FlyMountId,$pid,1)
sleep(2000)
endif
MoveTo($currentX,$DesiredHeight*10.0,$currentZ,1)
EndFunc
Func MoveTo($x,$y,$z,$flyornot)
local $ActionStruct,$ActionList, $MoveAction
$ActionStruct = memread(memread(memread($GameAdress) + 0x20) + 0xbb8)
$ActionList = memread($ActionStruct + 0x30)
$MoveAction = memread($ActionList + 0x4)
memwrite($MoveAction + 0x8, 0x0); //action finished = 0
memwrite($MoveAction + 0x14,0x1); //Action start = 1
memwrite($MoveAction + 0x20, $x,'float'); // Set X coord
memwrite($MoveAction + 0x24, $y,'float'); // Set Y coord
memwrite($MoveAction + 0x28, $z,'float'); // Set Z coord
memwrite($MoveAction + 0x64, 26624); //Set 1st var for not flying up
memwrite($MoveAction + 0x6c, 65536); // Set 2nd var for not flying up
memwrite($MoveAction + 0x2c, $flyornot); //movetype for flying 1 for ground run 0
memwrite($ActionStruct + 0xc, $MoveAction);
memwrite($ActionStruct + 0x18, 1);
memwrite($ActionStruct + 0x14, $MoveAction);
EndFunc
Works like a charm for me. Never tested it on official servers though.
Code:
memwrite($MoveAction + 0x64, 26624); //Set 1st var for not flying up
memwrite($MoveAction + 0x6c, 65536); // Set 2nd var for not flying up
Didn't notice this values influenced on smth. Set it just in case.