public Position3D getPosition3D() { position3D.x = MemoryHandler.readFloat(X); position3D.y = MemoryHandler.readFloat(Y); position3D.z = MemoryHandler.readFloat(Z); return(position3D); }
public void takeOff() { ChatWriter.send(MemoryHandler.process.MainWindowHandle, "/run if IsMounted() == nil then CallCompanion('MOUNT', " + mountNum + ") end");//"/click MultiBarRightButton1" Thread.Sleep(2500); MemoryHandler.writeFloat(Offset.CTM_X, MemoryHandler.readFloat(X)); MemoryHandler.writeFloat(Offset.CTM_Y, MemoryHandler.readFloat(Y)); MemoryHandler.writeFloat(Offset.CTM_Z, MemoryHandler.readFloat(Z) + 800.0f); MemoryHandler.writeInt(Offset.CTM_Action, 4); //néha nem repül fel egyből, hanem megáll 1 méterre a föld felett, ezért ujra kell kattintani Thread.Sleep(1000); MemoryHandler.writeInt(Offset.CTM_Action, 4); Thread.Sleep(15000); }
public void clickToMove(Position3D position) { //az értékek beírása a memoriába MemoryHandler.writeFloat(Offset.CTM_X, position.x); MemoryHandler.writeFloat(Offset.CTM_Y, position.y); MemoryHandler.writeFloat(Offset.CTM_Z, position.z); MemoryHandler.writeInt(Offset.CTM_Action, 4); //MemoryHandler.writeFloat(CTM_Distance, 0.5f); //amíg az action 4, azaz mozgásban van, addig várok while ( Math.Abs(MemoryHandler.readFloat(X) - position.x) > 10.0f && Math.Abs(MemoryHandler.readFloat(Y) - position.y) > 10.0f ) { Thread.Sleep(200); } Thread.Sleep(400); }
public void clickToMove(Position position) { //az értékek beírása a memoriába MemoryHandler.writeFloat(Offset.CTM_X, position.x); MemoryHandler.writeFloat(Offset.CTM_Y, position.y); MemoryHandler.writeFloat(Offset.CTM_Z, MemoryHandler.readFloat(Z) - 10); MemoryHandler.writeInt(Offset.CTM_Action, 4); //MemoryHandler.writeFloat(CTM_Distance, 0.5f); //míg az x,y távolság nagyobb mint 1 várok while ( Math.Abs(MemoryHandler.readFloat(X) - position.x) > 10.0f && Math.Abs(MemoryHandler.readFloat(Y) - position.y) > 10.0f ) { Thread.Sleep(200); System.Console.WriteLine(MemoryHandler.readFloat(Offset.CTM_X) + ", " + MemoryHandler.readFloat(Offset.CTM_Y) + ", " + MemoryHandler.readFloat(Offset.CTM_Z)); //System.Console.WriteLine(position.x + ", " + position.y); System.Console.WriteLine(MemoryHandler.readFloat(X) + ", " + MemoryHandler.readFloat(Y)); } MemoryHandler.writeInt(Offset.CTM_Action, 11); Thread.Sleep(400); }
public void clickToMove(float x, float y, float z = 0.0f) { //ha nem adok meg z értéket, akkor marad a magasság ugyanaz if (z == 0.0f) { z = MemoryHandler.readFloat(Z - 10); } //az értékek beírása a memoriába MemoryHandler.writeFloat(Offset.CTM_X, x); MemoryHandler.writeFloat(Offset.CTM_Y, y); MemoryHandler.writeFloat(Offset.CTM_Z, z); MemoryHandler.writeInt(Offset.CTM_Action, 4); //amíg az action 4, azaz mozgásban van, addig várok while ( Math.Abs(MemoryHandler.readFloat(X) - position.x) > 10.0f && Math.Abs(MemoryHandler.readFloat(Y) - position.y) > 10.0f ) { Thread.Sleep(200); } Thread.Sleep(400); }
public float getZ() { return(MemoryHandler.readFloat(Z)); }
public float getY() { return(MemoryHandler.readFloat(Y)); }
public float getX() { return(MemoryHandler.readFloat(X)); }
public Position getPosition() { position.x = MemoryHandler.readFloat(X); position.y = MemoryHandler.readFloat(Y); return(position); }