Beispiel #1
0
        public void writeToFile()
        {
            int currObjPtr = objectManager + FIRST_OBJECT;
            int currObj    = MemoryHandler.readInt(currObjPtr);

            System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\például Lilian\Desktop\akarmi.txt");

            int X = 0x97C1;
            int Y = 0x97DA;

            while (currObj != 0)
            {
                currObj = MemoryHandler.readInt(currObjPtr);
                if (MemoryHandler.readInt(currObj + 0x14) == 5)
                {
                    Position p = Zone.getRelativePosition(MemoryHandler.readFloat(currObj + X), MemoryHandler.readFloat(currObj + Y));
                    file.WriteLine(p.x + ", " + p.y);
                }

                /*for (int i = 0; i < 100000; ++i) {
                 *  file.WriteLine(MemoryReader.readFloat(0x0C632968 + 0x1 * i));
                 * }*/

                currObjPtr = currObj + NEXT_OBJECT;
            }
            file.Close();
        }
Beispiel #2
0
        public static Position getRelativePosition(double x, double y)
        {
            if (zones == null)
            {
                createZones();
            }
            Zone zone = getZoneById(MemoryHandler.readInt(ZONE_ID));

            return(new Position(zone.getRelativeX(x), zone.getRelativeY(y)));
        }
Beispiel #3
0
        public void flyTo(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);
            }

            //az értékek beírása a memoriába
            MemoryHandler.writeFloat(CTM_X, x);
            MemoryHandler.writeFloat(CTM_Y, y);
            MemoryHandler.writeFloat(CTM_Z, z);
            MemoryHandler.writeInt(CTM_Action, 4);

            //amíg az action 4, azaz mozgásban van, addig várok
            while (MemoryHandler.readInt(CTM_Action) == 4)
            {
                Thread.Sleep(200);
            }
        }
Beispiel #4
0
        public int getPlayerAdress()
        {
            writeToFile();
            int    LocalGUID  = 0xC0;
            String playerGUID = MemoryHandler.readHexAsString(objectManager + LocalGUID);

            int currObjPtr = objectManager + FIRST_OBJECT;
            int currObj    = MemoryHandler.readInt(currObjPtr);

            while (currObj != 0)
            {
                currObj = MemoryHandler.readInt(currObjPtr);
                String GUID = MemoryHandler.readHexAsString(currObj + 0x30);

                if (GUID == playerGUID)
                {
                    return(currObj);
                }
                currObjPtr = currObj + NEXT_OBJECT;
            }
            return(0);
        }
Beispiel #5
0
 public int getMaxMana()
 {
     return(MemoryHandler.readInt(MAX_MANA));
 }
Beispiel #6
0
 public int getCurrMana()
 {
     return(MemoryHandler.readInt(CURR_MANA));
 }
Beispiel #7
0
 public int getMaxHP()
 {
     return(MemoryHandler.readInt(MAX_HP));
 }
Beispiel #8
0
 public int getCurrHP()
 {
     return(MemoryHandler.readInt(CURR_HP));
 }
Beispiel #9
0
        private ObjectManager()
        {
            int CurMgr = MemoryHandler.readInt(CUR_MGR_PTR);;

            objectManager = MemoryHandler.readInt(CurMgr + CUR_MGR_OFFSET);
        }